From ddad57a468706c16c2cf0165cda84f6cdb7adb9f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 14 Apr 2021 13:48:08 +0000 Subject: [PATCH] Bug 28147: Pass itemnumber through to Account->pay Currently the itemnumber is not passed through when paying a single fine, we should do that To test: 1 - Create a manual debit and provide a barcode so the debit is linked to an item 2 - Go to the 'Make a payment' tab. Click the 'Writeoff' button on the individual line 3 - View the 'Transactions tab' The writeoff has no item details 4 - Apply patch 5 - Repeat 1 & 2 6 - View the transactions tab. The writeoff shows item details 7 - Confirm 'Writeoff amount' and 'Writeoff selected' still work and do not link to item Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- members/pay.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/members/pay.pl b/members/pay.pl index 2fb35315da..f56e793d55 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -94,6 +94,7 @@ elsif ( $input->param('apply_credits') ) { apply_credits({ patron => $patron, cgi => $input }); } elsif ( $input->param('confirm_writeoff') ) { + my $item_id = $input->param('itemnumber'); my $accountlines_id = $input->param('accountlines_id'); my $amount = $input->param('amountwrittenoff'); my $payment_note = $input->param("payment_note"); @@ -120,6 +121,7 @@ elsif ( $input->param('confirm_writeoff') ) { type => 'WRITEOFF', note => $payment_note, interface => C4::Context->interface, + item_id => $item_id, library_id => $branch, } )->{payment_id}; -- 2.39.5