my $type = $params->{type} || 'PAYMENT';
my $payment_type = $params->{payment_type} || undef;
my $credit_type = $params->{credit_type};
- my $offset_type = $params->{offset_type} || $type eq 'writeoff' ? 'Writeoff' : 'Payment';
+ my $offset_type = $params->{offset_type} || $type eq 'WRITEOFF' ? 'Writeoff' : 'Payment';
my $cash_register = $params->{cash_register};
my $userenv = C4::Context->userenv;
}
$credit_type ||=
- $type eq 'writeoff'
- ? 'W'
+ $type eq 'WRITEOFF'
+ ? 'WRITEOFF'
: 'PAYMENT';
- $description ||= $type eq 'writeoff' ? 'Writeoff' : q{};
+ $description ||= $type eq 'WRITEOFF' ? 'Writeoff' : q{};
my $payment = Koha::Account::Line->new(
{
- 'PAYMENT'
- 'FORGIVEN'
- 'LOST_RETURN'
- - 'writeoff'
+ - 'WRITEOFF'
=cut
amount => $amount,
borrowernumber => $self->{patron_id},
}
- ) if grep { $type eq $_ } ('PAYMENT', 'writeoff') ;
+ ) if grep { $type eq $_ } ('PAYMENT', 'WRITEOFF') ;
if ( C4::Context->preference("FinesLog") ) {
logaction(
'FORGIVEN' => 'Writeoff',
'LOST_RETURN' => 'Lost Item',
'PAYMENT' => 'Payment',
- 'writeoff' => 'Writeoff',
+ 'WRITEOFF' => 'Writeoff',
'ACCOUNT' => 'Account Fee',
'ACCOUNT_RENEW' => 'Account Fee',
'RESERVE' => 'Reserve Fee',
'FORGIVEN' => 'FORGIVEN',
'LOST_RETURN' => 'LOST_RETURN',
'PAYMENT' => 'PAYMENT',
- 'writeoff' => 'W'
+ 'WRITEOFF' => 'WRITEOFF'
};
=head1 AUTHORS