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); |