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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-5 / +49 lines)
Lines 212-217 Link Here
212
                                            <li>
212
                                            <li>
213
                                                <span class="label">Guarantees:</span>
213
                                                <span class="label">Guarantees:</span>
214
                                                <ul>
214
                                                <ul>
215
                                                    [% IF guarantees_fines and guarantees_fines > 0 %]
216
                                                        <li class="guarantees-fines">
217
                                                            <span class="circ-hlt">Charges:</span>
218
                                                            Patron's guarantees collectively owe [% guarantees_fines | $Price %].
219
                                                            <a id="view-guarantees-finesandcharges" href="#guarantees-finesandcharges" >See all charges.</a>
220
                                                        </li>
221
                                                    [% END %]
215
                                                    [% FOREACH guarantee IN guarantees %]
222
                                                    [% FOREACH guarantee IN guarantees %]
216
                                                        [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
223
                                                        [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
217
                                                            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li>
224
                                                            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li>
Lines 667-672 Link Here
667
                                    <a href="#finesandcharges" aria-controls="finesandcharges" role="tab" data-toggle="tab">Charges ([% fines | $Price %])</a>
674
                                    <a href="#finesandcharges" aria-controls="finesandcharges" role="tab" data-toggle="tab">Charges ([% fines | $Price %])</a>
668
                                </li>
675
                                </li>
669
                            [% END %]
676
                            [% END %]
677
                            [% IF ( guarantees_fines ) %]
678
                                <li id="guarantees-finestab">
679
                                    <a href="#guarantees-finesandcharges">Guarantees' charges ([% guarantees_fines | $Price %])</a>
680
                                </li>
681
                            [% END %]
670
                            [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
682
                            [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
671
                                <li role="presentation">
683
                                <li role="presentation">
672
                                        <a href="#reserves" id="holds-tab" aria-controls="reserves" role="tab" data-toggle="tab">Holds ([% holds_count || 0 | html %])</a>
684
                                        <a href="#reserves" id="holds-tab" aria-controls="reserves" role="tab" data-toggle="tab">Holds ([% holds_count || 0 | html %])</a>
Lines 742-752 Link Here
742
                                </div>
754
                                </div>
743
                            [% END %]
755
                            [% END %]
744
756
745
                            [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
757
                        [% IF ( guarantees_fines ) %]
746
                                <div id="clubs-tab" role="tabpanel" class="tab-pane">
758
                            <div id="guarantees-finesandcharges">
747
                                    Loading...
759
                                <table id="tguaranteesfines">
748
                                </div>
760
                                    <thead>
749
                            [% END %]
761
                                        <tr>
762
                                            <th>Guarantee</th>
763
                                            <th>Amount outstanding</th>
764
                                        </tr>
765
                                    </thead>
766
                                    [% FOREACH guarantee IN guarantees %]
767
                                        <tr>
768
                                            <td>[% INCLUDE 'patron-title.inc' patron=guarantee hide_patron_infos_if_needed=1 %]</td>
769
                                            [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
770
                                                <td>[% guarantee.account.balance | $Price %]</td>
771
                                            [% ELSE %]
772
                                                <td>-</td>
773
                                            [% END %]
774
                                        </tr>
775
                                    [% END %]
776
                                    <tfoot>
777
                                        <td>Total due</td>
778
                                        <td>[% guarantees_fines | $Price %]</td>
779
                                    </tfoot>
780
                                </table>
781
                            </div>
782
                        [% END %]
783
784
                        [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
785
                            <div id="clubs-tab">
786
                                Loading...
787
                            </div>
788
                        [% END %]
750
789
751
                            [% INCLUDE borrower_debarments.inc %]
790
                            [% INCLUDE borrower_debarments.inc %]
752
791
Lines 912-917 Link Here
912
            $("#view_restrictions").on("click",function(){
951
            $("#view_restrictions").on("click",function(){
913
                $('#debarments-tab-link').click();
952
                $('#debarments-tab-link').click();
914
            });
953
            });
954
955
            $("#view-guarantees-finesandcharges").on("click",function(){
956
                $('#guarantees-finestab a').click();
957
            });
958
915
         });
959
         });
916
        function uncheck_sibling(me){
960
        function uncheck_sibling(me){
917
            nodename=me.getAttribute("name");
961
            nodename=me.getAttribute("name");
(-)a/members/moremember.pl (-1 / +5 lines)
Lines 117-122 $template->param( Link Here
117
my $relatives_issues_count =
117
my $relatives_issues_count =
118
    Koha::Checkouts->count({ borrowernumber => \@relatives });
118
    Koha::Checkouts->count({ borrowernumber => \@relatives });
119
119
120
if ( @guarantees ) {
121
    my $total_amount = $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 1, include_this_patron => 1 });
122
    $template->param( guarantees_fines => $total_amount );
123
}
124
120
# Calculate and display patron's age
125
# Calculate and display patron's age
121
if ( !$patron->is_valid_age ) {
126
if ( !$patron->is_valid_age ) {
122
    $template->param( age_limitations => 1 );
127
    $template->param( age_limitations => 1 );
123
- 

Return to bug 26598