From 450a2e75927d2aff4b7ad2d4643dd253972c9f1c Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sat, 23 Jun 2018 07:41:15 -0300 Subject: [PATCH] Bug 20980: (follow-up) Offset name consistency This patch makes 'credit' account types generate 'Manual Credit' offset. The original patch used 'Payment' but I think the code wants to distinguish between payments and manually added credits (otherwise they would've picked the same accounttype value, and they don't. Signed-off-by: Josef Moravec Signed-off-by: Kyle M Hall Signed-off-by: Nick Clemens (cherry picked from commit 65aacc1b1ded569a259f45c3abd5d1a73c3f37e6) Signed-off-by: Martin Renvoize --- Koha/Account.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Koha/Account.pm b/Koha/Account.pm index 382d6931b1..8e3ed40798 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -474,6 +474,32 @@ sub non_issues_charges { 1; +=head2 Name mappings + +=head3 $offset_type + +=cut + +our $offset_type = { + 'credit' => 'Manual Credit', + 'forgiven' => 'Writeoff', + 'lost_item_return' => 'Lost Item Return', + 'payment' => 'Payment', + 'writeoff' => 'Writeoff' +}; + +=head3 $account_type + +=cut + +our $account_type = { + 'credit' => 'C', + 'forgiven' => 'FOR', + 'lost_item_return' => 'CR', + 'payment' => 'Pay', + 'writeoff' => 'W' +}; + =head1 AUTHOR Kyle M Hall -- 2.39.5