@@ -, +, @@
credit
---
.../prog/en/modules/members/mancredit.tt | 16 +++++++---
.../prog/en/modules/members/maninvoice.tt | 29 ++++++++++---------
members/mancredit.pl | 2 ++
members/maninvoice.pl | 4 +++
4 files changed, 34 insertions(+), 17 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
@@ -37,10 +37,14 @@
+
+
+
+ Example: 5.00
+
+
@@ -90,8 +86,15 @@
this.form.desc.value = this.options[this.selectedIndex].value;
this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
});
+ $("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
+ $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
+ $("#maninvoice #type").change(function(){
+ $("#maninvoice #desc").val($(this).find("option:selected").text());
+ $("#maninvoice #amount").val(type_fees[$(this).val()]);
+ });
});
[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
--- a/members/mancredit.pl
+++ a/members/mancredit.pl
@@ -37,6 +37,7 @@ use Koha::Items;
use Koha::Patrons;
use Koha::Patron::Categories;
use Koha::Token;
+use Koha::Account::CreditTypes;
my $input=new CGI;
@@ -115,6 +116,7 @@ if ($add){
csrf_token => Koha::Token->new->generate_csrf(
{ session_id => scalar $input->cookie('CGISESSID') }
),
+ credit_types => \@credit_types,
);
output_html_with_http_headers $input, $cookie, $template->output;
}
--- a/members/maninvoice.pl
+++ a/members/maninvoice.pl
@@ -37,6 +37,7 @@ use Koha::Items;
use Koha::Patrons;
use Koha::Patron::Categories;
+use Koha::Account::DebitTypes;
my $input=new CGI;
my $flagsrequired = { borrowers => 'edit_borrowers' };
@@ -121,6 +122,9 @@ if ($add){
}
$template->param( invoice_types_loop => \@invoice_types );
+ my @debit_types = Koha::Account::DebitTypes->search({ can_be_added_manually => 1 });
+ $template->param( debit_types => \@debit_types );
+
if (C4::Context->preference('ExtendedPatronAttributes')) {
my $attributes = GetBorrowerAttributes($borrowernumber);
$template->param(
--