View | Details | Raw Unified | Return to bug 26598
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+45 lines)
Lines 197-202 Link Here
197
                                            <li>
197
                                            <li>
198
                                                <span class="label">Guarantees:</span>
198
                                                <span class="label">Guarantees:</span>
199
                                                <ul>
199
                                                <ul>
200
                                                    [% IF guarantees_fines and guarantees_fines > 0 %]
201
                                                        <li class="guarantees-fines">
202
                                                            <span class="circ-hlt">Charges:</span>
203
                                                            Patron's guarantees collectively owe [% guarantees_fines | $Price %].
204
                                                            <a id="view-guarantees-finesandcharges" href="#guarantees-finesandcharges" >See all charges.</a>
205
                                                        </li>
206
                                                    [% END %]
200
                                                    [% FOREACH guarantee IN guarantees %]
207
                                                    [% FOREACH guarantee IN guarantees %]
201
                                                        [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
208
                                                        [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
202
                                                            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li>
209
                                                            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li>
Lines 652-657 Link Here
652
                                    <a href="#finesandcharges">Charges ([% fines | $Price %])</a>
659
                                    <a href="#finesandcharges">Charges ([% fines | $Price %])</a>
653
                                </li>
660
                                </li>
654
                            [% END %]
661
                            [% END %]
662
                            [% IF ( guarantees_fines ) %]
663
                                <li id="guarantees-finestab">
664
                                    <a href="#guarantees-finesandcharges">Guarantees' charges ([% guarantees_fines | $Price %])</a>
665
                                </li>
666
                            [% END %]
655
                            [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
667
                            [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
656
                                <li>
668
                                <li>
657
                                        <a href="#reserves" id="holds-tab">Holds ([% holds_count || 0 | html %])</a>
669
                                        <a href="#reserves" id="holds-tab">Holds ([% holds_count || 0 | html %])</a>
Lines 726-731 Link Here
726
                            </div>
738
                            </div>
727
                        [% END %]
739
                        [% END %]
728
740
741
                        [% IF ( guarantees_fines ) %]
742
                            <div id="guarantees-finesandcharges">
743
                                <table id="tguaranteesfines">
744
                                    <thead>
745
                                        <tr>
746
                                            <th>Guarantee</th>
747
                                            <th>Amount outstanding</th>
748
                                        </tr>
749
                                    </thead>
750
                                    [% FOREACH guarantee IN guarantees %]
751
                                        <tr>
752
                                            [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
753
                                                <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></td>
754
                                                <td>[% guarantee.account.balance | $Price %]</td>
755
                                            [% ELSE %]
756
                                                <td>[% guarantee.firstname | html %] [% guarantee.surname | html %]</td>
757
                                                <td>-</td>
758
                                            [% END %]
759
                                        </tr>
760
                                    [% END %]
761
                                    <tfoot>
762
                                        <td>Total due</td>
763
                                        <td>[% guarantees_fines | $Price %]</td>
764
                                    </tfoot>
765
                                </table>
766
                            </div>
767
                        [% END %]
768
729
                        [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
769
                        [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
730
                            <div id="clubs-tab">
770
                            <div id="clubs-tab">
731
                                Loading...
771
                                Loading...
Lines 903-908 Link Here
903
            $("#view_restrictions").on("click",function(){
943
            $("#view_restrictions").on("click",function(){
904
                $('#debarments-tab-link').click();
944
                $('#debarments-tab-link').click();
905
            });
945
            });
946
947
            $("#view-guarantees-finesandcharges").on("click",function(){
948
                $('#guarantees-finestab a').click();
949
            });
950
906
         });
951
         });
907
        function uncheck_sibling(me){
952
        function uncheck_sibling(me){
908
            nodename=me.getAttribute("name");
953
            nodename=me.getAttribute("name");
(-)a/members/moremember.pl (-1 / +5 lines)
Lines 112-117 $template->param( Link Here
112
my $relatives_issues_count =
112
my $relatives_issues_count =
113
    Koha::Checkouts->count({ borrowernumber => \@relatives });
113
    Koha::Checkouts->count({ borrowernumber => \@relatives });
114
114
115
if ( @guarantees ) {
116
    my $total_amount = $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 1, include_this_patron => 1 });
117
    $template->param( guarantees_fines => $total_amount );
118
}
119
115
# Calculate and display patron's age
120
# Calculate and display patron's age
116
if ( !$patron->is_valid_age ) {
121
if ( !$patron->is_valid_age ) {
117
    $template->param( age_limitations => 1 );
122
    $template->param( age_limitations => 1 );
118
- 

Return to bug 26598