From ecb8f00a6a73b5acf9b711ada1309bead40e839e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 2 Oct 2020 12:47:27 +0100 Subject: [PATCH] Bug 26540: Remove 'CASH' type from 'refund' and 'payout' This patch removes the 'CASH' transaction typy, hides the register selection and adds an alert to the Payout and Refund modals on the boraccount page if there are no cash registers yet defined at the for the current branch. --- .../prog/en/includes/transaction_types.inc | 1 + .../prog/en/modules/members/boraccount.tt | 28 +++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc index 9200c8ea6eb..96ed02c2ed7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc @@ -2,6 +2,7 @@ [% SET payment_types = [] %] [% FOR pt IN AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] [% NEXT IF pt.authorised_value.grep("^SIP[[:digit:]]{2}$").size() %] + [% NEXT IF ( type == 'payout' || type == 'refund' ) && pt.authorised_value == 'CASH' && Koha.Preference('UseCashRegisters') && registers.size == 0 %] [% payment_types.push(pt) %] [% END %] [% IF payment_types.size > 0 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index a051fc27321..398b6b52768 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -257,8 +257,16 @@