X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=members%2Fpaycollect.pl;h=5ed6b862be6d11aea7cbc0dff7696fadab04949b;hb=8249544156921c634ae91e4970cb82111e81fece;hp=5a732a9c9e3bf539b115449bd2e8cb0c538662fb;hpb=be12aa96094ab003949c78e8246db56027931cac;p=koha.git diff --git a/members/paycollect.pl b/members/paycollect.pl index 5a732a9c9e..5ed6b862be 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -19,6 +19,7 @@ use strict; use warnings; +use URI::Escape; use C4::Context; use C4::Auth; use C4::Output; @@ -55,6 +56,7 @@ my $individual = $input->param('pay_individual'); my $writeoff = $input->param('writeoff_individual'); my $select_lines = $input->param('selected'); my $select = $input->param('selected_accts'); +my $payment_note = uri_unescape $input->param('payment_note'); my $accountno; my $accountlines_id; if ( $individual || $writeoff ) { @@ -85,6 +87,7 @@ if ( $individual || $writeoff ) { description => $description, notify_id => $notify_id, notify_level => $notify_level, + payment_note => $payment_note, ); } elsif ($select_lines) { $total_due = $input->param('amt'); @@ -97,17 +100,17 @@ if ( $individual || $writeoff ) { if ( $total_paid and $total_paid ne '0.00' ) { if ( $total_paid < 0 or $total_paid > $total_due ) { $template->param( - error => sprintf( 'You must pay a value less than or equal to %f.2', - $total_due ) + error_over => 1, + total_due => $total_due ); } else { if ($individual) { if ( $total_paid == $total_due ) { makepayment( $accountlines_id, $borrowernumber, $accountno, $total_paid, $user, - $branch ); + $branch, $payment_note ); } else { makepartialpayment( $accountlines_id, $borrowernumber, $accountno, $total_paid, - $user, $branch ); + $user, $branch, $payment_note ); } print $input->redirect( "/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber"); @@ -141,6 +144,7 @@ $template->param( borrower => $borrower, total => $total_due, activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), + RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output;