Bugzilla – Attachment 111137 Details for
Bug 26540
Server error when attempting to issue cash credit with UseCashRegisters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26540: Remove 'CASH' type from 'refund' and 'payout'
Bug-26540-Remove-CASH-type-from-refund-and-payout.patch (text/plain), 6.37 KB, created by
Martin Renvoize (ashimema)
on 2020-10-02 11:49:38 UTC
(
hide
)
Description:
Bug 26540: Remove 'CASH' type from 'refund' and 'payout'
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-10-02 11:49:38 UTC
Size:
6.37 KB
patch
obsolete
>From 122609f00c6e5d8f7b3ae284f330807412b0bde0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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/modules/members/boraccount.tt | 37 +++++++++++++++---- > 1 file changed, 29 insertions(+), 8 deletions(-) > >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 c27f3b506f..53f3fe9a92 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -146,8 +146,16 @@ > </div> > <div class="modal-body"> > [% IF Koha.Preference('UseCashRegisters') && ( registers.size == 0 ) %] >- <div id="payout_error" class="dialog alert"> >- You must have at least one cash register associated with this branch before you can record cash payouts. >+ <div id="payout_error" class="dialog message"> >+ <p> >+ You must have at least one cash register associated with this branch before you can record cash payouts. >+ </p> >+ [% IF ( CAN_user_parameters_manage_cash_registers ) %] >+ <form action="/cgi-bin/koha/admin/cash_registers.pl" method="get"> >+ <input type="hidden" name="op" value="add_form" /> >+ <button class="new" type="submit"><i class="fa fa-plus"></i> Create a new cash register</button> >+ </form> >+ [% END %] > </div> > [% END %] > <fieldset class="rows"> >@@ -162,6 +170,7 @@ > </li> > [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] > [% SET excluded = ['SIP00', 'SIP01', 'SIP02'] %] >+ [% IF Koha.Preference('UseCashRegisters') && ( registers.size == 0 ) %][% excluded.push('CASH') %][% END %] > [% IF payment_types > 3 %] > <li> > <label for="transaction_type">Transaction type: </label> >@@ -175,7 +184,7 @@ > </li> > [% END %] > >- [% IF Koha.Preference('UseCashRegisters') %] >+ [% IF Koha.Preference('UseCashRegisters') && ( registers.size >= 1 ) %] > <li> > <label for="registerid">Cash register: </label> > <select name="registerid" id="payout_registerid"> >@@ -211,8 +220,16 @@ > </div> > <div class="modal-body"> > [% IF Koha.Preference('UseCashRegisters') && ( registers.size == 0 ) %] >- <div id="refund_error" class="dialog alert"> >- You must have at least one cash register associated with this branch before you can record cash refunds. >+ <div id="refund_error" class="dialog message"> >+ <p> >+ You must have at least one cash register associated with this branch before you can record cash refunds. >+ </p> >+ [% IF ( CAN_user_parameters_manage_cash_registers ) %] >+ <form action="/cgi-bin/koha/admin/cash_registers.pl" method="get"> >+ <input type="hidden" name="op" value="add_form" /> >+ <button class="new" type="submit"><i class="fa fa-plus"></i> Create a new cash register</button> >+ </form> >+ [% END %] > </div> > [% END %] > <fieldset class="rows"> >@@ -229,19 +246,23 @@ > <span class="required">Required</span> > </li> > [% SET payment_types = AuthorisedValues.GetAuthValueDropbox('PAYMENT_TYPE') %] >+ [% SET excluded = ['SIP00', 'SIP01', 'SIP02'] %] >+ [% IF Koha.Preference('UseCashRegisters') && ( registers.size == 0 ) %][% excluded.push('CASH') %][% END %] > <li> > <label for="transaction_type">Transaction type: </label> > <select name="transaction_type" id="refund_transaction_type"> > <option value="AC">Account credit</option> >- [% IF payment_types %] >+ [% IF payment_types > 3 %] > [% FOREACH pt IN payment_types %] >- <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option> >+ [% UNLESS excluded.grep("^$pt.authorised_value\$").size %] >+ <option value="[% pt.authorised_value | html %]">[% pt.lib | html %]</option> >+ [% END %] > [% END %] > [% END %] > </select> > </li> > >- [% IF Koha.Preference('UseCashRegisters') %] >+ [% IF Koha.Preference('UseCashRegisters') && ( registers.size >= 1 ) %] > <li> > <label for="registerid">Cash register: </label> > <select name="registerid" id="refund_registerid"> >-- >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 26540
:
111137
|
168234
|
168239
|
173152