@@ -, +, @@
page
=> A warning should appear in the "Guarantees" section with the total due
---
.../prog/en/modules/members/moremember.tt | 44 +++++++++++++++++++
members/moremember.pl | 8 ++++
2 files changed, 52 insertions(+)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -281,6 +281,13 @@
Guarantees:
[% END %]
+ [% IF ( guarantees_fines ) %]
+
+ Guarantees' charges ([% guarantees_fines | $Price %])
+
+ [% END %]
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
[% IF ( holds_count ) %]
@@ -814,6 +826,34 @@
[% END %]
+ [% IF ( guarantees_fines ) %]
+
+
+
+
+ Guarantee |
+ Amount outstanding |
+
+
+ [% FOREACH guarantee IN guarantees %]
+
+ [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
+ [% guarantee.firstname | html %] [% guarantee.surname | html %] |
+ [% guarantee.account.balance | $Price %] |
+ [% ELSE %]
+ [% guarantee.firstname | html %] [% guarantee.surname | html %] |
+ - |
+ [% END %]
+
+ [% END %]
+
+ Total due |
+ [% guarantees_fines | $Price %] |
+
+
+
+ [% END %]
+
[% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
Loading...
@@ -998,6 +1038,10 @@
$("#picture-upload, #show-picture-upload").toggle();
});
+ $("#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
@@ -116,6 +116,14 @@ $template->param(
my $relatives_issues_count =
Koha::Checkouts->count({ borrowernumber => \@relatives });
+if ( @guarantees ) {
+ my $total_amount = 0;
+ foreach my $guarantee (@guarantees){
+ $total_amount += $guarantee->account->balance;
+ }
+ $template->param( guarantees_fines => $total_amount );
+}
+
# Calculate and display patron's age
if ( !$patron->is_valid_age ) {
$template->param( age_limitations => 1 );
--