Bugzilla – Attachment 142321 Details for
Bug 29987
Manual credits are not recorded for a register
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29987: Add register support to manual credits
Bug-29987-Add-register-support-to-manual-credits.patch (text/plain), 4.87 KB, created by
Kyle M Hall (khall)
on 2022-10-21 10:52:35 UTC
(
hide
)
Description:
Bug 29987: Add register support to manual credits
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-10-21 10:52:35 UTC
Size:
4.87 KB
patch
obsolete
>From 9d1885e45ce0837aacc2484cbb80bdbd66145fbf Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 29 Jun 2022 17:19:05 +0100 >Subject: [PATCH] Bug 29987: Add register support to manual credits > >This patch adds the register and transaction type selection options to >the manual credit page. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/members/mancredit.tt | 27 ++++++++++++++++++ > members/mancredit.pl | 28 +++++++++++-------- > 2 files changed, 43 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt >index 9833799576..a853880cca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt >@@ -2,11 +2,13 @@ > [% USE Asset %] > [% USE Koha %] > [% USE Branches %] >+[% USE Registers %] > [% SET footerjs = 1 %] > > [% PROCESS 'accounts.inc' %] > > [% INCLUDE 'doc-head-open.inc' %] >+[% SET registers = Registers.all( { filters => { current_branch => 1 } } ) %] > <title>Create manual credit › Patrons › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] > </head> >@@ -74,6 +76,31 @@ > <li><label for="desc">Description: </label><input type="text" name="desc" size="50" id="desc" /></li> > <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" /></li> > <li><label for="amount">Amount: </label><input type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" name="amount" id="amount" required="required" min="0" value=""/> Example: 5.00</li> >+ [% INCLUDE 'transaction_types.inc' %] >+ [% IF Koha.Preference('UseCashRegisters') %] >+ <li> >+ [% IF Koha.Preference('RequireCashRegister') %] >+ <label for="cash_register" class="required"> >+ [% ELSE %] >+ <label for="cash_register"> >+ [% END %] >+ Cash register: >+ </label> >+ >+ [% IF Koha.Preference('RequireCashRegister') %] >+ <select name="cash_register" id="cash_register" required> >+ [% ELSE %] >+ <select name="cash_register" id="cash_register"> >+ [% END %] >+ <option id="noregister" disabled selected="selected" value="">-- Select an option--</option> >+ [% PROCESS options_for_registers %] >+ </select> >+ >+ [% IF Koha.Preference('RequireCashRegister') %] >+ <span class="required">Required</span> >+ [% END %] >+ </li> >+ [% END %] > </ol> > </fieldset> > >diff --git a/members/mancredit.pl b/members/mancredit.pl >index 0652471493..4decab72b5 100755 >--- a/members/mancredit.pl >+++ b/members/mancredit.pl >@@ -86,21 +86,25 @@ if ($add) { > my $item = Koha::Items->find( { barcode => $barcode } ); > $item_id = $item->itemnumber if $item; > } >- my $description = $input->param('desc'); >- my $note = $input->param('note'); >- my $amount = $input->param('amount') || 0; >- my $type = $input->param('type'); >+ my $description = $input->param('desc'); >+ my $note = $input->param('note'); >+ my $amount = $input->param('amount') || 0; >+ my $type = $input->param('type'); >+ my $payment_type = $input->param('payment_type'); >+ my $cash_register_id = $input->param('cash_register'); > > my $line = $patron->account->add_credit( > { >- amount => $amount, >- description => $description, >- item_id => $item_id, >- library_id => $library_id, >- note => $note, >- type => $type, >- user_id => $logged_in_user->id, >- interface => C4::Context->interface >+ amount => $amount, >+ description => $description, >+ item_id => $item_id, >+ library_id => $library_id, >+ note => $note, >+ type => $type, >+ user_id => $logged_in_user->id, >+ interface => C4::Context->interface, >+ payment_type => $payment_type, >+ cash_register => $cash_register_id > } > ); > >-- >2.30.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 29987
:
136743
|
136755
|
139703
|
139704
|
139705
|
141165
|
141166
|
141167
|
141171
|
141469
|
141470
|
141471
|
141472
| 142321 |
142322
|
142323
|
142324
|
142325