Bugzilla – Attachment 31554 Details for
Bug 12865
'Pay amount toward all fines' does not record payment note
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12865 - 'Pay amount toward all fines' does not record payment note
PASSED-QA-Bug-12865---Pay-amount-toward-all-fines-.patch (text/plain), 3.60 KB, created by
Kyle M Hall (khall)
on 2014-09-12 13:50:30 UTC
(
hide
)
Description:
[PASSED QA] Bug 12865 - 'Pay amount toward all fines' does not record payment note
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-09-12 13:50:30 UTC
Size:
3.60 KB
patch
obsolete
>From 3d78af3db436bee3c326e527a29105616ec590ce Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Thu, 11 Sep 2014 16:59:37 +0200 >Subject: [PATCH] [PASSED QA] Bug 12865 - 'Pay amount toward all fines' does not record payment note > >Without patch: >------------- >Make payment for patron who has fines >Select the Pay Amount button and add a note in the note box. >Select confirm >Result: The note does not display in list > >With patch: >---------- >Result: The note displays in list >Bonus testing: The note is included in system logs as well (Home:Tools:Logs) > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Accounts.pm | 13 ++++++++----- > members/paycollect.pl | 3 ++- > 2 files changed, 10 insertions(+), 6 deletions(-) > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index 8cd9100..caa1fe0 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -70,7 +70,7 @@ patron. > > =head2 recordpayment > >- &recordpayment($borrowernumber, $payment, $sip_paytype); >+ &recordpayment($borrowernumber, $payment, $sip_paytype, $note); > > Record payment by a patron. C<$borrowernumber> is the patron's > borrower number. C<$payment> is a floating-point number, giving the >@@ -89,7 +89,7 @@ will be credited to the next one. > sub recordpayment { > > #here we update the account lines >- my ( $borrowernumber, $data, $sip_paytype ) = @_; >+ my ( $borrowernumber, $data, $sip_paytype, $payment_note ) = @_; > my $dbh = C4::Context->dbh; > my $newamtos = 0; > my $accdata = ""; >@@ -98,6 +98,8 @@ sub recordpayment { > my $manager_id = 0; > $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; > >+ $payment_note //= ""; >+ > # begin transaction > my $nextaccntno = getnextacctno($borrowernumber); > >@@ -138,6 +140,7 @@ sub recordpayment { > accountlines_id => $accdata->{'accountlines_id'}, > accountno => $accdata->{'accountno'}, > manager_id => $manager_id, >+ note => $payment_note, > })); > push( @ids, $accdata->{'accountlines_id'} ); > } >@@ -146,13 +149,13 @@ sub recordpayment { > # create new line > my $usth = $dbh->prepare( > "INSERT INTO accountlines >- (borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id) >- VALUES (?,?,now(),?,'',?,?,?)" >+ (borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id, note) >+ VALUES (?,?,now(),?,'',?,?,?,?)" > ); > > my $paytype = "Pay"; > $paytype .= $sip_paytype if defined $sip_paytype; >- $usth->execute( $borrowernumber, $nextaccntno, 0 - $data, $paytype, 0 - $amountleft, $manager_id ); >+ $usth->execute( $borrowernumber, $nextaccntno, 0 - $data, $paytype, 0 - $amountleft, $manager_id, $payment_note ); > $usth->finish; > > UpdateStats({ >diff --git a/members/paycollect.pl b/members/paycollect.pl >index 01536b0..ca47862 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -126,7 +126,8 @@ if ( $total_paid and $total_paid ne '0.00' ) { > my $note = $input->param('selected_accts_notes'); > recordpayment_selectaccts( $borrowernumber, $total_paid, \@acc, $note ); > } else { >- recordpayment( $borrowernumber, $total_paid ); >+ my $note = $input->param('selected_accts_notes'); >+ recordpayment( $borrowernumber, $total_paid, '', $note ); > } > > # recordpayment does not return success or failure so lets redisplay the boraccount >-- >1.7.2.5
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 12865
:
31545
|
31546
| 31554