|
Lines 1183-1188
sub _set_found_trigger {
Link Here
|
| 1183 |
} |
1183 |
} |
| 1184 |
)->single; |
1184 |
)->single; |
| 1185 |
|
1185 |
|
|
|
1186 |
# refund processing charge made for lost book |
| 1187 |
my $processing_charge = Koha::Account::Lines->search( |
| 1188 |
{ |
| 1189 |
itemnumber => $self->itemnumber, |
| 1190 |
debit_type_code => 'PROCESSING', |
| 1191 |
status => [ undef, { '<>' => 'FOUND' } ] |
| 1192 |
}, |
| 1193 |
{ |
| 1194 |
order_by => { -desc => [ 'date', 'accountlines_id' ] }, |
| 1195 |
rows => 1 |
| 1196 |
} |
| 1197 |
)->single; |
| 1198 |
|
| 1186 |
if ( $lost_charge ) { |
1199 |
if ( $lost_charge ) { |
| 1187 |
|
1200 |
|
| 1188 |
my $patron = $lost_charge->patron; |
1201 |
my $patron = $lost_charge->patron; |
|
Lines 1256-1261
sub _set_found_trigger {
Link Here
|
| 1256 |
$lost_charge->status('FOUND'); |
1269 |
$lost_charge->status('FOUND'); |
| 1257 |
$lost_charge->store(); |
1270 |
$lost_charge->store(); |
| 1258 |
|
1271 |
|
|
|
1272 |
if ( $processing_charge && $processing_charge->borrowernumber == $lost_charge->borrowernumber ) { |
| 1273 |
$processing_charge->status('FOUND')->store; |
| 1274 |
} |
| 1275 |
|
| 1259 |
# Reconcile balances if required |
1276 |
# Reconcile balances if required |
| 1260 |
if ( C4::Context->preference('AccountAutoReconcile') ) { |
1277 |
if ( C4::Context->preference('AccountAutoReconcile') ) { |
| 1261 |
$account->reconcile_balance; |
1278 |
$account->reconcile_balance; |
|
Lines 1286-1291
sub _set_found_trigger {
Link Here
|
| 1286 |
# Update status of fine |
1303 |
# Update status of fine |
| 1287 |
$lost_overdue->status('FOUND')->store(); |
1304 |
$lost_overdue->status('FOUND')->store(); |
| 1288 |
|
1305 |
|
|
|
1306 |
if ( $processing_charge && $processing_charge->borrowernumber == $lost_charge->borrowernumber ) { |
| 1307 |
$processing_charge->status('FOUND')->store; |
| 1308 |
} |
| 1309 |
|
| 1289 |
# Find related forgive credit |
1310 |
# Find related forgive credit |
| 1290 |
my $refund = $lost_overdue->credits( |
1311 |
my $refund = $lost_overdue->credits( |
| 1291 |
{ |
1312 |
{ |
| 1292 |
- |
|
|