- } elsif ($dropbox && $accountline->lastincrement) {
- my $outstanding = $accountline->amountoutstanding - $accountline->lastincrement;
- my $amt = $accountline->amount - $accountline->lastincrement;
-
- Koha::Account::Offset->new(
- {
- debit_id => $accountline->id,
- type => 'Dropbox',
- amount => $accountline->lastincrement * -1,
- }
- )->store();
-
- if ( C4::Context->preference("FinesLog") ) {
- &logaction( "FINES", 'MODIFY', $borrowernumber,
- "Dropbox adjustment $amt, item $item" );
- }
-
- $accountline->accounttype('F');
-
- if ( $outstanding >= 0 && $amt >= 0 ) {
- $accountline->amount($amt);
- $accountline->amountoutstanding($outstanding);
- }
-