@@ -, +, @@
page
+ resolve a git merge conflict
=> A warning should appear in the "Guarantees" section with the total due
---
.../prog/en/modules/members/moremember.tt | 54 +++++++++++++++++--
members/moremember.pl | 5 ++
2 files changed, 54 insertions(+), 5 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -212,6 +212,13 @@
Guarantees:
[% END %]
+ [% IF ( guarantees_fines ) %]
+
+ Guarantees' charges ([% guarantees_fines | $Price %])
+
+ [% END %]
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
Holds ([% holds_count || 0 | html %])
@@ -742,11 +754,38 @@
[% END %]
- [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
-
- Loading...
-
- [% END %]
+ [% IF ( guarantees_fines ) %]
+
+
+
+
+ Guarantee |
+ Amount outstanding |
+
+
+ [% FOREACH guarantee IN guarantees %]
+
+ [% INCLUDE 'patron-title.inc' patron=guarantee hide_patron_infos_if_needed=1 %] |
+ [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
+ [% guarantee.account.balance | $Price %] |
+ [% ELSE %]
+ - |
+ [% END %]
+
+ [% END %]
+
+ Total due |
+ [% guarantees_fines | $Price %] |
+
+
+
+ [% END %]
+
+ [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
+
+ Loading...
+
+ [% END %]
[% INCLUDE borrower_debarments.inc %]
@@ -912,6 +951,11 @@
$("#view_restrictions").on("click",function(){
$('#debarments-tab-link').click();
});
+
+ $("#view-guarantees-finesandcharges").on("click",function(){
+ $('#guarantees-finestab a').click();
+ });
+
});
function uncheck_sibling(me){
nodename=me.getAttribute("name");
--- a/members/moremember.pl
+++ a/members/moremember.pl
@@ -117,6 +117,11 @@ $template->param(
my $relatives_issues_count =
Koha::Checkouts->count({ borrowernumber => \@relatives });
+if ( @guarantees ) {
+ my $total_amount = $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 1, include_this_patron => 1 });
+ $template->param( guarantees_fines => $total_amount );
+}
+
# Calculate and display patron's age
if ( !$patron->is_valid_age ) {
$template->param( age_limitations => 1 );
--