From a8e67c953009894828a7d2bffd416a2b9e98af95 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 27 Jan 2020 11:03:46 +0100 Subject: [PATCH] Bug 24339: Do not assume there are exactly 3 SIP* AVs Update DB entry 19.06.00.017: We created SIP* AV from accountlines if '^Pay[[:digit:]]{2}$', so I think we should assume that more than SIP00, SIP01, SIP02 can exist. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi Signed-off-by: Joy Nelson --- .../prog/en/modules/members/paycollect.tt | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index daba24805d..12c193d0ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -128,17 +128,18 @@ 0.00 - [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] - [% SET excluded = ['SIP00', 'SIP01', 'SIP02'] %] - [% IF payment_types.size > 3 %] + [% SET payment_types = [] %] + [% FOR pt IN AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] + [% NEXT IF pt.authorised_value.grep("^SIP[[:digit:]]{2}$").size() %] + [% payment_types.push(pt) %] + [% END %] + [% IF payment_types.size > 0 %]
  • @@ -260,17 +261,18 @@ 0.00 - [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] - [% SET excluded = ['SIP00', 'SIP01', 'SIP02'] %] - [% IF payment_types.size > 3 %] + [% SET payment_types = [] %] + [% FOR pt IN AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] + [% NEXT IF pt.authorised_value.grep("^SIP[[:digit:]]{2}$").size() %] + [% payment_types.push(pt) %] + [% END %] + [% IF payment_types.size > 0 %]
  • -- 2.39.5