From 4f6dc86d2402ed552ae139e3cd6390422356d9ad 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: Martin Renvoize --- .../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 61220f1584..ae2f53d486 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -123,17 +123,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 %]
  • @@ -256,17 +257,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