@@ -, +, @@
---
.../prog/en/modules/members/mancredit.tt | 27 ++++++++++++++++++
members/mancredit.pl | 28 +++++++++++--------
2 files changed, 43 insertions(+), 12 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
+++ a/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 } } ) %]
Create manual credit › Patrons › Koha
[% INCLUDE 'doc-head-close.inc' %]
@@ -69,6 +71,31 @@
Example: 5.00
+ [% INCLUDE 'transaction_types.inc' %]
+ [% IF Koha.Preference('UseCashRegisters') %]
+
+ [% IF Koha.Preference('RequireCashRegister') %]
+
+ [% END %]
--- a/members/mancredit.pl
+++ a/members/mancredit.pl
@@ -85,21 +85,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');
$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
}
);
--