@@ -, +, @@
---
Koha/Account.pm | 5 ++-
.../prog/en/modules/members/mancredit.tt | 2 +-
.../prog/en/modules/members/maninvoice.tt | 2 +-
.../prog/en/modules/members/paycollect.tt | 8 ++---
t/db_dependent/Accounts.t | 35 ++++++-------------
t/db_dependent/Koha/Account.t | 8 ++---
6 files changed, 23 insertions(+), 37 deletions(-)
--- a/Koha/Account.pm
+++ a/Koha/Account.pm
@@ -81,7 +81,6 @@ sub pay {
my $lines = $params->{lines};
my $type = $params->{type} || 'PAYMENT';
my $payment_type = $params->{payment_type} || undef;
- my $offset_type = $params->{offset_type} || $type eq 'WRITEOFF' ? 'Writeoff' : 'Payment';
my $cash_register = $params->{cash_register};
my $item_id = $params->{item_id};
@@ -358,7 +357,7 @@ sub payin_amount {
$credit = $credit->apply(
{
debits => $params->{debits},
- offset_type => $params->{type}
+ offset_type => $Koha::Account::offset_type->{$params->{type}}
}
);
}
@@ -370,7 +369,7 @@ sub payin_amount {
$credit = $credit->apply(
{
debits => [ $self->outstanding_debits->as_list ],
- offset_type => $params->{type}
+ offset_type => $Koha::Account::offset_type->{$params->{type}}
}
);
}
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
@@ -66,7 +66,7 @@
- Example: 5.00
+ Example: 5.00
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
@@ -79,7 +79,7 @@
- Example: 5.00
+ Example: 5.00