use C4::Log; # logaction
use C4::Debug;
use Koha::DateUtils;
-use Koha::Account::Line;
use Koha::Account::Lines;
+use Koha::Account::Offsets;
use Koha::IssuingRules;
use Koha::Libraries;
accounttype => 'FU',
}
)->store();
+
+ Koha::Account::Offset->new(
+ {
+ debit_id => $accountline->id,
+ type => 'Fine Update',
+ amount => $diff,
+ }
+ )->store();
}
} else {
if ( $amount ) { # Don't add new fines with an amount of 0
issue_id => $issue_id,
}
)->store();
+
+ Koha::Account::Offset->new(
+ {
+ debit_id => $accountline->id,
+ type => 'Fine',
+ amount => $amount,
+ }
+ )->store();
}
}
# logging action
my $patron = Koha::Patrons->find( $params->{borrowernumber} );
my $substitute = $params->{'substitute'} || {};
- $substitute->{today} ||= output_pref( { dt => dt_from_string, dateonly => 1} );
my %tables = ( 'borrowers' => $params->{'borrowernumber'} );
if ( my $p = $params->{'branchcode'} ) {
branchcode => $params->{'branchcode'},
lang => $patron->lang,
tables => \%tables,
+ loops => {
+ overdues => [ map { $_->{items}->{itemnumber} } @item_tables ],
+ },
substitute => $substitute,
repeat => { item => \@item_tables },
message_transport_type => $params->{message_transport_type},