);
$debit_type can be any of:
- - account
- - account_renew
+ - ACCOUNT
+ - ACCOUNT_RENEW
- hold_expired
- lost_item
- sundry
'lost_item_return' => 'Lost Item',
'payment' => 'Payment',
'writeoff' => 'Writeoff',
- 'account' => 'Account Fee',
- 'account_renew' => 'Account Fee',
+ 'ACCOUNT' => 'Account Fee',
+ 'ACCOUNT_RENEW' => 'Account Fee',
'RESERVE' => 'Reserve Fee',
'PROCESSING' => 'Processing Fee',
'lost_item' => 'Lost Item',
=cut
our $account_type_debit = {
- 'account' => 'ACCOUNT',
- 'account_renew' => 'ACCOUNT_RENEW',
+ 'ACCOUNT' => 'ACCOUNT',
+ 'ACCOUNT_RENEW' => 'ACCOUNT_RENEW',
'hold_expired' => 'HE',
'lost_item' => 'LOST',
'sundry' => 'M',
my $account = Koha::Account->new({ patron_id => $borrower->id });
- my $line1 = $account->add_debit({ type => 'account', amount => 100, interface => 'commandline' });
- my $line2 = $account->add_debit({ type => 'account', amount => 200, interface => 'commandline' });
+ my $line1 = $account->add_debit({ type => 'ACCOUNT', amount => 100, interface => 'commandline' });
+ my $line2 = $account->add_debit({ type => 'ACCOUNT', amount => 200, interface => 'commandline' });
$sth = $dbh->prepare("SELECT count(*) FROM accountlines");
$sth->execute;
$note = $sth->fetchrow_array;
is($note,'$200.00 payment note', '$200.00 payment note is registered');
- my $line3 = $account->add_debit({ type => 'account', amount => 42, interface => 'commandline' });
+ my $line3 = $account->add_debit({ type => 'ACCOUNT', amount => 42, interface => 'commandline' });
my $payment_id = $account->pay( { lines => [$line3], amount => 42 } );
my $payment = Koha::Account::Lines->find( $payment_id );
is( $payment->amount(), '-42.000000', "Payment paid the specified fine" );
my $account = Koha::Account->new({ patron_id => $borrower->id });
- my $line1 = $account->add_debit({ type => 'account', amount => 1, interface => 'commandline' });
- my $line2 = $account->add_debit({ type => 'account', amount => 2, interface => 'commandline' });
- my $line3 = $account->add_debit({ type => 'account', amount => 3, interface => 'commandline' });
- my $line4 = $account->add_debit({ type => 'account', amount => 4, interface => 'commandline' });
+ my $line1 = $account->add_debit({ type => 'ACCOUNT', amount => 1, interface => 'commandline' });
+ my $line2 = $account->add_debit({ type => 'ACCOUNT', amount => 2, interface => 'commandline' });
+ my $line3 = $account->add_debit({ type => 'ACCOUNT', amount => 3, interface => 'commandline' });
+ my $line4 = $account->add_debit({ type => 'ACCOUNT', amount => 4, interface => 'commandline' });
is( $account->balance(), 10, "Account balance is 10" );
my $account = Koha::Account->new({ patron_id => $borrower->id });
- my $line = $account->add_debit({ type => 'account', amount => 42, interface => 'commandline' });
+ my $line = $account->add_debit({ type => 'ACCOUNT', amount => 42, interface => 'commandline' });
is( $account->balance(), 42, "Account balance is 42" );
my $account =
Koha::Account->new( { patron_id => $patron->{borrowernumber} } );
my $debt1 = $account->add_debit(
- { type => 'account', amount => 100, interface => 'commandline' } );
+ { type => 'ACCOUNT', amount => 100, interface => 'commandline' } );
my $debt2 = $account->add_debit(
- { type => 'account', amount => 200, interface => 'commandline' } );
+ { type => 'ACCOUNT', amount => 200, interface => 'commandline' } );
# Instantiate a new FeePayment transaction object
my $trans = C4::SIP::ILS::Transaction::FeePayment->new();