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

(-)a/C4/SIP/ILS.pm (-7 / +9 lines)
Lines 123-129 sub offline_ok { Link Here
123
#
123
#
124
sub checkout {
124
sub checkout {
125
    my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account, $no_block_due_date ) = @_;
125
    my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account, $no_block_due_date ) = @_;
126
    my ( $patron, $item, $circ );
126
    my ( $patron, $item, $circ, $message );
127
    my @blocked_item_types;
127
    my @blocked_item_types;
128
    if (defined $account->{blocked_item_types}) {
128
    if (defined $account->{blocked_item_types}) {
129
        @blocked_item_types = split /\|/, $account->{blocked_item_types};
129
        @blocked_item_types = split /\|/, $account->{blocked_item_types};
Lines 144-155 sub checkout { Link Here
144
        } elsif ($patron->expired) {
144
        } elsif ($patron->expired) {
145
            $circ->screen_msg("Patron expired on " . output_pref({ dt => dt_from_string( $patron->dateexpiry_iso, 'iso' ), dateonly => 1 }));
145
            $circ->screen_msg("Patron expired on " . output_pref({ dt => dt_from_string( $patron->dateexpiry_iso, 'iso' ), dateonly => 1 }));
146
        } elsif ($patron->fine_blocked) {
146
        } elsif ($patron->fine_blocked) {
147
            my $message = "Patron has fines";
147
            if ( !C4::Context->preference("IssuingInProcess") ) {
148
            if ($account->{show_outstanding_amount}) {
148
                $message = "Patron has fines";
149
                my $patron_account = Koha::Account->new( { patron_id => $patron->{borrowernumber} });
149
                if ($account->{show_outstanding_amount}) {
150
                my $balance = $patron_account->balance;
150
                    my $patron_account = Koha::Account->new( { patron_id => $patron->{borrowernumber} });
151
                if ($balance) {
151
                    my $balance = $patron_account->balance;
152
                    $message .= (" - You owe " . Koha::Number::Price->new( $balance )->format({ with_symbol => 1}) . ".");
152
                    if ($balance) {
153
                        $message .= (" - You owe " . Koha::Number::Price->new( $balance )->format({ with_symbol => 1}) . ".");
154
                    }
153
                }
155
                }
154
            }
156
            }
155
            $circ->screen_msg($message);
157
            $circ->screen_msg($message);
(-)a/C4/SIP/ILS/Patron.pm (-3 / +5 lines)
Lines 87-94 sub new { Link Here
87
    my $fine_blocked = 0;
87
    my $fine_blocked = 0;
88
    my $noissueschargeguarantees = C4::Context->preference('NoIssuesChargeGuarantees');
88
    my $noissueschargeguarantees = C4::Context->preference('NoIssuesChargeGuarantees');
89
    if( $fines_amount > $fee_limit ){
89
    if( $fines_amount > $fee_limit ){
90
        $fine_blocked = 1;
90
        if ( !C4::Context->preference("IssuingInProcess") ) {
91
        $fines_msg .= " -- " . "Patron blocked by fines" if $fine_blocked;
91
            $fine_blocked = 1;
92
            $fines_msg .= " -- " . "Patron blocked by fines" if $fine_blocked;
93
        }
92
    } elsif ( $noissueschargeguarantorswithguarantees ) {
94
    } elsif ( $noissueschargeguarantorswithguarantees ) {
93
        $fines_amount += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 0 });
95
        $fines_amount += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 0 });
94
        $fine_blocked ||= $fines_amount > $noissueschargeguarantorswithguarantees;
96
        $fine_blocked ||= $fines_amount > $noissueschargeguarantorswithguarantees;
Lines 158-164 sub new { Link Here
158
        if ($_ ne 'NOTES' and $flags->{$_}->{message}) {
160
        if ($_ ne 'NOTES' and $flags->{$_}->{message}) {
159
            $ilspatron{screen_msg} .= " -- " . $flags->{$_}->{message};  # show all but internal NOTES
161
            $ilspatron{screen_msg} .= " -- " . $flags->{$_}->{message};  # show all but internal NOTES
160
        }
162
        }
161
        if ($flags->{$_}->{noissues}) {
163
        if ($flags->{$_}->{noissues} && !C4::Context->preference("IssuingInProcess")) {
162
            foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) {
164
            foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) {
163
                $ilspatron{$toggle} = 0;    # if we get noissues, disable everything
165
                $ilspatron{$toggle} = 0;    # if we get noissues, disable everything
164
            }
166
            }
(-)a/C4/SIP/ILS/Transaction/Checkout.pm (-2 / +1 lines)
Lines 141-147 sub do_checkout { Link Here
141
        }
141
        }
142
    }
142
    }
143
143
144
    if ( $noerror == 0 && !$no_block_due_date ) {
144
    if ( $noerror == 0 && !$no_block_due_date && !C4::Context->preference('IssuingInProcess') ) {
145
		$self->ok(0);
145
		$self->ok(0);
146
		return $self;
146
		return $self;
147
	}
147
	}
148
- 

Return to bug 32602