Bugzilla – Attachment 98548 Details for
Bug 24525
Hide SIP payment types from the Point of Sale page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24525: (follow-up) Factor out to an include
Bug-24525-follow-up-Factor-out-to-an-include.patch (text/plain), 5.65 KB, created by
Martin Renvoize (ashimema)
on 2020-02-07 09:30:01 UTC
(
hide
)
Description:
Bug 24525: (follow-up) Factor out to an include
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-02-07 09:30:01 UTC
Size:
5.65 KB
patch
obsolete
>From 7029e35e59348df8f2a04cc6fec80e558338c26e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 28 Jan 2020 14:05:35 +0000 >Subject: [PATCH] Bug 24525: (follow-up) Factor out to an include > >--- > .../prog/en/includes/payments.inc | 19 +++++++++ > .../prog/en/modules/members/paycollect.tt | 39 +++---------------- > .../intranet-tmpl/prog/en/modules/pos/pay.tt | 16 +------- > 3 files changed, 27 insertions(+), 47 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/payments.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/payments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/payments.inc >new file mode 100644 >index 0000000000..e6b5d597d5 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/payments.inc >@@ -0,0 +1,19 @@ >+[% USE AuthorisedValues %] >+[%- BLOCK account_payment_types -%] >+ [% 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 %] >+ <li> >+ <label for="payment_type">Payment type: </label> >+ <select name="payment_type" id="payment_type"> >+ <option value=""></option> >+ [% FOREACH pt IN payment_types %] >+ <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option> >+ [% END %] >+ </select> >+ </li> >+ [% END %] >+[%- END -%] >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 ae2f53d486..d6ad995226 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -2,9 +2,9 @@ > [% USE Asset %] > [% USE Koha %] > [% USE Branches %] >-[% USE AuthorisedValues %] > [% USE Price %] > [% SET footerjs = 1 %] >+[% PROCESS 'payments.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Patrons › > [% IF type == 'WRITEOFF' %] >@@ -123,22 +123,9 @@ > <label>Change to give: </label> > <span id="change">0.00</span> > </li> >- [% 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 %] >- <li> >- <label for="payment_type">Payment type: </label> >- <select name="payment_type" id="payment_type"> >- <option value=""></option> >- [% FOREACH pt IN payment_types %] >- <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option> >- [% END %] >- </select> >- </li> >- [% END %] >+ >+ [% PROCESS account_payment_types %] >+ > [% IF Koha.Preference('UseCashRegisters') %] > <li> > <label for="cash_register">Cash register: </label> >@@ -257,22 +244,8 @@ > <label>Change to give: </label> > <span id="change">0.00</span> > </li> >- [% 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 %] >- <li> >- <label for="payment_type">Payment type: </label> >- <select name="payment_type" id="payment_type"> >- <option value=""></option> >- [% FOREACH pt IN payment_types %] >- <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option> >- [% END %] >- </select> >- </li> >- [% END %] >+ >+ [% PROCESS account_payment_types %] > > [% IF Koha.Preference('UseCashRegisters') %] > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index 647e57865b..afc17d1eda 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -1,9 +1,9 @@ > [% USE raw %] > [% USE Asset %] > [% USE Koha %] >-[% USE AuthorisedValues %] > [% USE Price %] > [% SET footerjs = 1 %] >+[% PROCESS 'payments.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Payments</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -112,19 +112,7 @@ > <input type="hidden" name="change" value="0.00"/> > </li> > >- [% 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 %] >- <li> >- <label for="payment_type">Payment type: </label> >- <select name="payment_type" id="payment_type"> >- [% FOREACH pt IN payment_types %] >- <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option> >- [% END %] >- </select> >- </li> >+ [% PROCESS account_payment_types %] > > [% IF Koha.Preference('UseCashRegisters') %] > <li> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24525
:
98035
|
98187
|
98547
|
98548
|
98580
|
98581
|
98641