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

(-)a/C4/Circulation.pm (-3 / +3 lines)
Lines 864-874 sub CanBookBeIssued { Link Here
864
        }
864
        }
865
865
866
        if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees && !$inprocess && !$allowfineoverride) {
866
        if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees && !$inprocess && !$allowfineoverride) {
867
            $issuingimpossible{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges );
867
            $issuingimpossible{DEBT_GUARANTEES} = $guarantees_non_issues_charges;
868
        } elsif ( $guarantees_non_issues_charges > $no_issues_charge_guarantees && !$inprocess && $allowfineoverride) {
868
        } elsif ( $guarantees_non_issues_charges > $no_issues_charge_guarantees && !$inprocess && $allowfineoverride) {
869
            $needsconfirmation{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges );
869
            $needsconfirmation{DEBT_GUARANTEES} = $guarantees_non_issues_charges;
870
        } elsif ( $allfinesneedoverride && $guarantees_non_issues_charges > 0 && $guarantees_non_issues_charges <= $no_issues_charge_guarantees && !$inprocess ) {
870
        } elsif ( $allfinesneedoverride && $guarantees_non_issues_charges > 0 && $guarantees_non_issues_charges <= $no_issues_charge_guarantees && !$inprocess ) {
871
            $needsconfirmation{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges );
871
            $needsconfirmation{DEBT_GUARANTEES} = $guarantees_non_issues_charges;
872
        }
872
        }
873
    }
873
    }
874
874
(-)a/C4/Members.pm (-1 / +1 lines)
Lines 343-349 sub patronflags { Link Here
343
        if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees ) {
343
        if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees ) {
344
            my %flaginfo;
344
            my %flaginfo;
345
            $flaginfo{'message'} = sprintf 'patron guarantees owe %.02f', $guarantees_non_issues_charges;
345
            $flaginfo{'message'} = sprintf 'patron guarantees owe %.02f', $guarantees_non_issues_charges;
346
            $flaginfo{'amount'}  = sprintf "%.02f", $guarantees_non_issues_charges;
346
            $flaginfo{'amount'}  = $guarantees_non_issues_charges;
347
            $flaginfo{'noissues'} = 1 unless C4::Context->preference("allowfineoverride");
347
            $flaginfo{'noissues'} = 1 unless C4::Context->preference("allowfineoverride");
348
            $flags{'CHARGES_GUARANTEES'} = \%flaginfo;
348
            $flags{'CHARGES_GUARANTEES'} = \%flaginfo;
349
        }
349
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +2 lines)
Lines 3-8 Link Here
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE ColumnsSettings %]
4
[% USE ColumnsSettings %]
5
[% USE ItemTypes %]
5
[% USE ItemTypes %]
6
[% USE Price %]
6
[% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
7
[% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
7
   [% SET exports_enabled = 1 %]
8
   [% SET exports_enabled = 1 %]
8
[% END %]
9
[% END %]
Lines 231-237 $(document).ready(function() { Link Here
231
[% END %]
232
[% END %]
232
233
233
[% IF ( DEBT_GUARANTEES ) %]
234
[% IF ( DEBT_GUARANTEES ) %]
234
    <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES %].</li>
235
    <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES | $Price %].</li>
235
[% END %]
236
[% END %]
236
237
237
[% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %]
238
[% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-1 / +10 lines)
Lines 1-5 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Price %]
3
[% IF ( export_remove_fields OR export_with_csv_profile ) %]
4
[% IF ( export_remove_fields OR export_with_csv_profile ) %]
4
   [% SET exports_enabled = 1 %]
5
   [% SET exports_enabled = 1 %]
5
[% END %]
6
[% END %]
Lines 62-68 $(document).ready(function() { Link Here
62
  <div class="dialog alert">
63
  <div class="dialog alert">
63
    Cannot check out!
64
    Cannot check out!
64
    [% IF charges_is_blocker %]
65
    [% IF charges_is_blocker %]
65
      Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
66
      <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
67
    [% END %]
68
    [% IF charges_guarantees_is_blocker %]
69
        <li>
70
            <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
71
        </li>
72
        <li>
73
            <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
74
        </li>
66
    [% END %]
75
    [% END %]
67
  </div>
76
  </div>
68
[% ELSIF NOT checkout_infos %]
77
[% ELSIF NOT checkout_infos %]
(-)a/t/db_dependent/Patron.t (-19 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 15;
20
use Test::More tests => 13;
21
use Test::Warn;
21
use Test::Warn;
22
22
23
use C4::Context;
23
use C4::Context;
Lines 44-66 $object->surname("Test Surname"); Link Here
44
$object->store();
44
$object->store();
45
45
46
is( $object->in_storage, 1, "Object is now stored" );
46
is( $object->in_storage, 1, "Object is now stored" );
47
my $guarantee1 = Koha::Patron->new(
48
    {
49
        categorycode => $categorycode,
50
        branchcode   => $branchcode,
51
        guarantorid  => $object->id
52
    }
53
)->store();
54
my $guarantee2 = Koha::Patron->new(
55
    {
56
        categorycode => $categorycode,
57
        branchcode   => $branchcode,
58
        guarantorid  => $object->id
59
    }
60
)->store();
61
my @guarantees = $object->guarantees();
62
is( $guarantees[0]->id, $guarantee1->id, "First guarantee matchs" );
63
is( $guarantees[1]->id, $guarantee2->id, "Second guarantee matchs" );
64
47
65
my $borrowernumber = $object->borrowernumber;
48
my $borrowernumber = $object->borrowernumber;
66
49
67
- 

Return to bug 14577