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

(-)a/circ/circulation.pl (-10 lines)
Lines 263-272 if ($findborrower) { Link Here
263
# get the borrower information.....
263
# get the borrower information.....
264
if ($borrowernumber) {
264
if ($borrowernumber) {
265
    $patron = Koha::Patrons->find( $borrowernumber );
265
    $patron = Koha::Patrons->find( $borrowernumber );
266
    my $overdues = $patron->get_overdues;
267
    my $issues = $patron->checkouts;
268
    my $balance = $patron->account->balance;
269
270
266
271
    # if the expiry date is before today ie they have expired
267
    # if the expiry date is before today ie they have expired
272
    if ( $patron->is_expired ) {
268
    if ( $patron->is_expired ) {
Lines 286-296 if ($borrowernumber) { Link Here
286
            $template->param("returnbeforeexpiry" => 1);
282
            $template->param("returnbeforeexpiry" => 1);
287
        }
283
        }
288
    }
284
    }
289
    $template->param(
290
        overduecount => $overdues->count,
291
        issuecount   => $issues->count,
292
        finetotal    => $balance,
293
    );
294
285
295
    if ( $patron and $patron->is_debarred ) {
286
    if ( $patron and $patron->is_debarred ) {
296
        $template->param(
287
        $template->param(
Lines 415-421 if (@$barcodes) { Link Here
415
        );
406
        );
416
    }
407
    }
417
408
418
419
    # FIXME If the issue is confirmed, we launch another time checkouts->count, now display the issue count after issue
409
    # FIXME If the issue is confirmed, we launch another time checkouts->count, now display the issue count after issue
420
    $patron = Koha::Patrons->find( $borrowernumber );
410
    $patron = Koha::Patrons->find( $borrowernumber );
421
    $template_params->{issuecount} = $patron->checkouts->count;
411
    $template_params->{issuecount} = $patron->checkouts->count;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc (-8 / +14 lines)
Lines 1-13 Link Here
1
[% USE Price %]
1
<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
2
[% SET NoIssuesCharge = Koha.Preference('noissuescharge') %]
2
<script type="text/javascript">
3
[% IF fines and fines > 0 %]
3
KOHA.Checkouts.BorrowerNumber = [% borrowernumber %];
4
    <li>
4
KOHA.Checkouts.NoIssuesCharge = [% Koha.Preference('noissuescharge') || "null" %];
5
[% IF Koha.Preference('AllowFineOverride') %] KOHA.Checkouts.AllowFineOverride = true; [% END %]
6
[% IF noissues && !forceallow %] KOHA.Checkouts.DisallowIssue = true; [% END %]
7
[% IF Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') %] KOHA.Checkouts.ForceOnSiteCheckouts = true; [% END %]
8
</script>
9
    <li id="outstanding-fees" style="display: none;">
5
        <span class="circ-hlt">Fees &amp; Charges:</span>
10
        <span class="circ-hlt">Fees &amp; Charges:</span>
6
        Patron has outstanding fees &amp; charges of [% fines | $Price %].
11
        Patron has outstanding fees &amp; charges of <span id="outstanding-fees-amount"></span>
7
        [% IF !Koha.Preference('AllowFineOverride') && NoIssuesCharge && fines > NoIssuesCharge %]
12
        </a>.
8
           <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
13
14
        [% IF !Koha.Preference('AllowFineOverride') %]
15
            <span class="circ-hlt" id="outstanding-fees-over-limit" style="display: none;">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
9
        [% END %]
16
        [% END %]
10
        <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]" class="btn btn-default btn-xs" >Make payment</a>
17
        <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]" class="btn btn-default btn-xs" >Make payment</a>
11
        <a href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% borrowernumber %]" class="btn btn-default btn-xs" >Pay all fines</a></li>
18
        <a href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% borrowernumber %]" class="btn btn-default btn-xs" >Pay all fines</a></li>
12
    </li>
19
    </li>
13
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc (-4 / +3 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
<div id="checkouts">
2
<div id="checkouts">
3
    [% IF ( issuecount ) %]
3
    <div class="has-checkouts" style="display: none;">
4
        <div id="issues-table-loading-message">
4
        <div id="issues-table-loading-message">
5
            <p>
5
            <p>
6
                <a id="issues-table-load-now-button" href="#" class="btn btn-default"><i class="fa fa-book"></i> Show checkouts</a>
6
                <a id="issues-table-load-now-button" href="#" class="btn btn-default"><i class="fa fa-book"></i> Show checkouts</a>
Lines 77-83 Link Here
77
                [% END %]
77
                [% END %]
78
            </div>
78
            </div>
79
        </form>
79
        </form>
80
    [% ELSE %]
80
    </div>
81
        <p>Patron has nothing checked out.</p>
81
    <p class="no-checkouts" style="display: none;">Patron has nothing checked out.</p>
82
    [% END %]
83
</div>
82
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-50 / +26 lines)
Lines 20-31 Link Here
20
[% INCLUDE 'strings.inc' %]
20
[% INCLUDE 'strings.inc' %]
21
[% INCLUDE 'datatables.inc' %]
21
[% INCLUDE 'datatables.inc' %]
22
[% INCLUDE 'columns_settings.inc' %]
22
[% INCLUDE 'columns_settings.inc' %]
23
[% show_barcode_input = (Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce')) || !noissues || forceallow %]
24
<style>
25
.issue-allow, .issue-disallow {display: none;}
26
[% IF !show_barcode_input %]#mainform {display: none;}[% END %]
27
</style>
23
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
28
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
24
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
29
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
25
[% INCLUDE 'timepicker.inc' %]
30
[% INCLUDE 'timepicker.inc' %]
26
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
31
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
27
<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
32
<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
28
<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
29
<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
33
<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
30
<script type="text/javascript">
34
<script type="text/javascript">
31
//<![CDATA[
35
//<![CDATA[
Lines 84-89 function toggle_onsite_checkout(){ Link Here
84
function Dopop(link) {
88
function Dopop(link) {
85
    var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
89
    var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
86
}
90
}
91
87
$(document).ready(function() {
92
$(document).ready(function() {
88
    $('#mainform').on('submit',function() {
93
    $('#mainform').on('submit',function() {
89
        if ($("#barcode") && $("#barcode").val()) {
94
        if ($("#barcode") && $("#barcode").val()) {
Lines 412-420 $(document).ready(function() { Link Here
412
</form>
417
</form>
413
418
414
[% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
419
[% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
415
    [% UNLESS noissues %]
420
        <button class="issue-allow" type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
416
        <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
417
    [% END %]
418
[% END %]
421
[% END %]
419
</div></div>
422
</div></div>
420
[% END %] <!-- NEEDSCONFIRMATION -->
423
[% END %] <!-- NEEDSCONFIRMATION -->
Lines 581-587 No patron matched <span class="ex">[% message | html %]</span> Link Here
581
    <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
584
    <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
582
[% END %]
585
[% END %]
583
586
584
[% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
585
<div class="yui-u first">
587
<div class="yui-u first">
586
588
587
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
589
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
Lines 618-624 No patron matched <span class="ex">[% message | html %]</span> Link Here
618
620
619
    <div class="checkout-settings">
621
    <div class="checkout-settings">
620
622
621
        [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
622
            [% IF ( SpecifyDueDate ) %]
623
            [% IF ( SpecifyDueDate ) %]
623
                <div id="specify-due-date" class="checkout-setting">
624
                <div id="specify-due-date" class="checkout-setting">
624
                    <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
625
                    <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
Lines 636-645 No patron matched <span class="ex">[% message | html %]</span> Link Here
636
                    <button class="btn btn-default btn-sm action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
637
                    <button class="btn btn-default btn-sm action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
637
                </div>
638
                </div>
638
            [% END %]
639
            [% END %]
639
        [% END %]
640
640
641
        [% UNLESS ( noissues ) %]
641
            <div id="set-automatic-renewal" class="checkout-setting issue-allow">
642
            <div id="set-automatic-renewal" class="checkout-setting">
643
                [% IF NEEDSCONFIRMATION %]
642
                [% IF NEEDSCONFIRMATION %]
644
                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
643
                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
645
                [% ELSE %]
644
                [% ELSE %]
Lines 666-684 No patron matched <span class="ex">[% message | html %]</span> Link Here
666
                    <label for="override_high_holds">Don't decrease checkout length based on holds</label>
665
                    <label for="override_high_holds">Don't decrease checkout length based on holds</label>
667
                </div>
666
                </div>
668
            [% END %]
667
            [% END %]
669
        [% END %]
670
668
671
        [% IF Koha.Preference('OnSiteCheckouts') %]
669
        [% IF Koha.Preference('OnSiteCheckouts') %]
672
            <div id="onsite_checkout-select" class="checkout-setting">
670
            <div id="onsite_checkout-select" class="checkout-setting">
673
                [% IF noissues %]
671
                    <div class="onsite-checkout-only issue-disallow">
674
                    <div class="onsite-checkout-only">
675
                        <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
672
                        <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
676
                        <input type="text" name="duedatespec" id="duedatespec" />
673
                        <input type="text" name="duedatespec" id="duedatespec" />
677
                        <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
674
                        <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
678
                    </div>
675
                    </div>
679
                [% ELSE %]
676
                    <div class="issue-allow">
680
                    <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
677
                    <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
681
                [% END %]
678
                    </div>
682
            </div>
679
            </div>
683
        [% END %]
680
        [% END %]
684
681
Lines 700-734 No patron matched <span class="ex">[% message | html %]</span> Link Here
700
[% END %]
697
[% END %]
701
</form></div>
698
</form></div>
702
699
703
[% END %]<!-- /unless noissues -->
704
705
[% IF ( noissues ) %]
706
    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
707
        <div class="yui-u">
708
    [% ELSE %]
709
        <div>
710
    [% END %]
711
[% ELSE %]
712
    <div class="yui-u">
700
    <div class="yui-u">
713
[% END %]
701
        <div id="circmessages" class="circmessage attention">
714
702
            <h3>Attention:</h3>
715
        [% IF ( noissues ) %]
703
            <div class="issue-disallow">
716
            [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
704
            [% IF !( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
717
                <div id="circmessages" class="circmessage attention">
718
            [% ELSE %]
719
                <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
705
                <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
720
                <div id="circmessages" class="circmessage warning">
721
            [% END %]
706
            [% END %]
722
            <h3>
707
                <h3>
723
                Cannot check out!
708
                    Cannot check out!
724
                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
709
                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
725
                    <span class="circ-hlt">Only on-site checkouts are allowed</span>
710
                        <span class="circ-hlt">Only on-site checkouts are allowed</span>
726
                [% END %]
711
                    [% END %]
727
            </h3>
712
                </h3>
728
        [% ELSE %]
713
            </div>
729
            <div id="circmessages" class="circmessage attention">
730
                <h3>Attention:</h3>
731
        [% END %]
732
714
733
		<ul>
715
		<ul>
734
716
Lines 787-794 No patron matched <span class="ex">[% message | html %]</span> Link Here
787
                   [% END %]
769
                   [% END %]
788
                   <br/>
770
                   <br/>
789
                   <a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
771
                   <a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
790
                    [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
772
                    [% IF (borrowernumber && CAN_user_circulate_force_checkout) %]
791
                        <span class="override_debarment">
773
                        <span class="override_debarment issue-disallow">
792
                            <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
774
                            <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
793
                        </span>
775
                        </span>
794
                    [% END %]
776
                    [% END %]
Lines 798-806 No patron matched <span class="ex">[% message | html %]</span> Link Here
798
                [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li>
780
                [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li>
799
            [% END %]
781
            [% END %]
800
782
801
            [% IF ( charges ) %]
783
            [% INCLUDE 'blocked-fines.inc' %]
802
                [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
803
            [% END %]
804
784
805
            [% IF ( charges_guarantees ) %]
785
            [% IF ( charges_guarantees ) %]
806
                <li>
786
                <li>
Lines 886-896 No patron matched <span class="ex">[% message | html %]</span> Link Here
886
866
887
<ul>
867
<ul>
888
    <li>
868
    <li>
889
        [% IF ( issuecount ) %]
869
            <a href="#checkouts"><span id="issuecount">0</span> Checkout(s)</a>
890
            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
891
        [% ELSE %]
892
            <a href="#checkouts">0 Checkouts</a>
893
        [% END %]
894
    </li>
870
    </li>
895
871
896
    [% IF relatives_issues_count %]
872
    [% IF relatives_issues_count %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-4 / +1 lines)
Lines 22-28 Link Here
22
[% INCLUDE 'timepicker.inc' %]
22
[% INCLUDE 'timepicker.inc' %]
23
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
23
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
24
<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
24
<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
25
<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
26
<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
25
<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
27
<script type="text/JavaScript">
26
<script type="text/JavaScript">
28
//<![CDATA[
27
//<![CDATA[
Lines 183-195 function validate1(date) { Link Here
183
[% ELSE %]
182
[% ELSE %]
184
    [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
183
    [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
185
184
186
    [% IF fines %]
187
    <div id="circmessages" class="circmessage attention">
185
    <div id="circmessages" class="circmessage attention">
188
      <ul>
186
      <ul>
189
        [% INCLUDE 'blocked-fines.inc' %]
187
        [% INCLUDE 'blocked-fines.inc' %]
190
      </ul>
188
      </ul>
191
    </div>
189
    </div>
192
    [% END %]
193
190
194
    [% IF ( flagged ) %]
191
    [% IF ( flagged ) %]
195
    <div id="circmessages" class="circmessage attention">
192
    <div id="circmessages" class="circmessage attention">
Lines 511-517 function validate1(date) { Link Here
511
508
512
<div id="finesholdsissues" class="toptabs">
509
<div id="finesholdsissues" class="toptabs">
513
    <ul>
510
    <ul>
514
        <li><a href="#checkouts">[% issuecount %] Checkout(s)</a></li>
511
        <li><a href="#checkouts"><span id="issuecount">0</span> Checkout(s)</a></li>
515
        [% IF relatives_issues_count %]
512
        [% IF relatives_issues_count %]
516
            <li><a href="#relatives-issues" id="relatives-issues-tab">Relatives' checkouts</a></li>
513
            <li><a href="#relatives-issues" id="relatives-issues-tab">Relatives' checkouts</a></li>
517
        [% END %]
514
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (+40 lines)
Lines 1-6 Link Here
1
if ( KOHA === undefined ) var KOHA = {};
2
KOHA.Checkouts = {
3
    BorrowerNumber: null,
4
    NoIssuesCharge: null,
5
    AllowFineOverride: false,
6
    DisallowIssue: false,
7
    ForceOnSiteCheckouts: false,
8
    ToggleInput: function( allow_issue ) {
9
        if (KOHA.Checkouts.AllowFineOverride) allow_issue = true;
10
        if (KOHA.Checkouts.DisallowIssue) allow_issue = false;
11
12
        $(".issue-allow").toggle(allow_issue);
13
        $(".issue-disallow").toggle(!allow_issue);
14
        $("#mainform").toggle(allow_issue || KOHA.Checkouts.ForceOnSiteCheckouts);
15
16
        if (!allow_issue) {
17
            $(".circmessage.attention").removeClass("attention").addClass("warning");
18
        }
19
    },
20
    UpdateCheckoutsAndFees: function(checkouts_only=false) {
21
        $.get( "/cgi-bin/koha/svc/patron/fines", {borrowernumber: KOHA.Checkouts.BorrowerNumber}, function( data ) {
22
            $("#issuecount").text(data.issuecount);
23
            var has_checkouts = data.issuecount > 0;
24
            $(".has-checkouts").toggle(has_checkouts);
25
            $(".no-checkouts").toggle(!has_checkouts);
26
            if (checkouts_only) return;
27
28
            var noissue = KOHA.Checkouts.NoIssuesCharge !== null && data.owing >= KOHA.Checkouts.NoIssuesCharge;
29
            $("#outstanding-fees").toggle(data.owing > 0);
30
            $("#outstanding-fees-amount").text(data.owing_formatted);
31
            $("#outstanding-fees-over-limit").toggle(noissue);
32
            KOHA.Checkouts.ToggleInput(!noissue);
33
        } );
34
    }
35
}
36
1
$(document).ready(function() {
37
$(document).ready(function() {
2
    $.ajaxSetup ({ cache: false });
38
    $.ajaxSetup ({ cache: false });
3
39
40
    KOHA.Checkouts.UpdateCheckoutsAndFees();
41
4
    var barcodefield = $("#barcode");
42
    var barcodefield = $("#barcode");
5
    var issuesTable;
43
    var issuesTable;
6
44
Lines 75-80 $(document).ready(function() { Link Here
75
113
76
                content = "";
114
                content = "";
77
                if ( data.returned ) {
115
                if ( data.returned ) {
116
                    KOHA.Checkouts.UpdateCheckoutsAndFees(true);
78
                    content = CIRCULATION_RETURNED;
117
                    content = CIRCULATION_RETURNED;
79
                    $(id).parent().parent().addClass('ok');
118
                    $(id).parent().parent().addClass('ok');
80
                    $('#date_due_' + data.itemnumber).html(CIRCULATION_RETURNED);
119
                    $('#date_due_' + data.itemnumber).html(CIRCULATION_RETURNED);
Lines 110-115 $(document).ready(function() { Link Here
110
149
111
                var content = "";
150
                var content = "";
112
                if ( data.renew_okay ) {
151
                if ( data.renew_okay ) {
152
                    KOHA.Checkouts.UpdateCheckoutsAndFees();
113
                    issuesTable.api().ajax.reload();
153
                    issuesTable.api().ajax.reload();
114
                    content = CIRCULATION_RENEWED_DUE + " " + data.date_due;
154
                    content = CIRCULATION_RENEWED_DUE + " " + data.date_due;
115
                    $('#date_due_' + data.itemnumber).replaceWith( data.date_due );
155
                    $('#date_due_' + data.itemnumber).replaceWith( data.date_due );
(-)a/members/moremember.pl (-2 lines)
Lines 127-136 unless ( $patron ) { Link Here
127
}
127
}
128
128
129
my $issues        = $patron->checkouts;
129
my $issues        = $patron->checkouts;
130
my $balance       = $patron->account->balance;
131
$template->param(
130
$template->param(
132
    issuecount => $issues->count,
131
    issuecount => $issues->count,
133
    fines      => $balance,
134
);
132
);
135
133
136
my $category_type = $patron->category->category_type;
134
my $category_type = $patron->category->category_type;
(-)a/svc/patron/fines (-1 / +45 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright 2016 CatalystIT
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use strict;
21
use warnings;
22
23
use C4::Service;
24
use Koha::Patrons;
25
use Koha::Number::Price;
26
27
my ( $query, $response ) = C4::Service->init( borrowers => '*' );
28
29
my $borrowernumber = $query->param('borrowernumber')
30
  or return C4::Service->return_error('input', "No 'borrowernumber'");
31
my $patron = Koha::Patrons->find( $borrowernumber )
32
  or return C4::Service->return_error('input', "Invalid 'borrowernumber'", borrowernumber => $borrowernumber);
33
34
my $od     = $patron->get_overdues->count;
35
my $issues = $patron->checkouts->count;
36
my $owing  = $patron->account->balance;
37
38
$response->param(
39
    overduecount    => $od,
40
    issuecount      => $issues,
41
    owing           => $owing || 0.00,
42
    owing_formatted => Koha::Number::Price->new( $owing )->format,
43
);
44
45
C4::Service->return_success( $response );

Return to bug 14803