my $line = Koha::Account::Line->new(
{
borrowernumber => $patron->{borrowernumber},
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
interface => 'commandline',
{
borrowernumber => $patron->{borrowernumber},
itemnumber => $item->itemnumber,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
interface => 'commandline',
my $debit_1 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
amountoutstanding => 10,
my $debit_2 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
amountoutstanding => 10,
my $credit_1 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => -10,
amountoutstanding => -10,
my $credit_2 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => -10,
amountoutstanding => -10,
my $credit_3 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => -100,
amountoutstanding => -100,
my $debit = Koha::Account::Line->new(
{
borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
interface => 'commandline',
my $debit_1 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
amountoutstanding => 10,
my $debit_2 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 100,
amountoutstanding => 100,
my $credit_2 = $account->add_credit({ amount => 20, interface => 'commandline' });
my $debit_3 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 100,
amountoutstanding => 100,
borrowernumber => $patron->borrowernumber,
manager_id => $staff->borrowernumber,
itemnumber => $item->itemnumber,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
interface => 'commandline',
my $debit_1 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "RETURNED",
amount => 10,
amountoutstanding => 10,
my $debit_2 = Koha::Account::Line->new(
{ borrowernumber => $patron->id,
- accounttype => "OVERDUE",
+ debit_type_code => "OVERDUE",
status => "UNRETURNED",
amount => 100,
amountoutstanding => 100,
qr/Update type not recognised/, 'Exception thrown for unrecognised type';
throws_ok { $debit_1->adjust( { amount => 50, type => 'overdue_update', interface => 'commandline' } ) }
- qr/Update type not allowed on this accounttype/,
+ qr/Update type not allowed on this debit_type/,
'Exception thrown for type conflict';
# Increment an unpaid fine