Bugzilla – Attachment 168234 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), 5.14 KB, created by
Martin Renvoize (ashimema)
on 2024-06-28 12:07:09 UTC
(
hide
)
Description:
Bug 26540: Remove 'CASH' type from 'refund' and 'payout'
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-06-28 12:07:09 UTC
Size:
5.14 KB
patch
obsolete
>From ecb8f00a6a73b5acf9b711ada1309bead40e839e 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/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 @@ > </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"> >@@ -274,7 +282,7 @@ > > [% INCLUDE 'transaction_types.inc' type="payout" %] > >- [% IF Koha.Preference('UseCashRegisters') %] >+ [% IF Koha.Preference('UseCashRegisters') && ( registers.size >= 1 ) %] > <li> > <label for="registerid">Cash register: </label> > <select name="registerid" id="payout_registerid"> >@@ -311,8 +319,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"> >@@ -331,7 +347,7 @@ > > [% INCLUDE 'transaction_types.inc' type="refund" %] > >- [% 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.45.2
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