Bugzilla – Attachment 7527 Details for
Bug 6634
manager_id not populated when paying fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6634 manager_id and itemnumber not populated when paying fines
SIGNED-OFF-Bug-6634-managerid-and-itemnumber-not-p.patch (text/plain), 2.28 KB, created by
Owen Leonard
on 2012-02-09 14:53:12 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6634 manager_id and itemnumber not populated when paying fines
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-02-09 14:53:12 UTC
Size:
2.28 KB
patch
obsolete
>From 456879e689f2fda7cc5b8368e5b56c1e9b61e514 Mon Sep 17 00:00:00 2001 >From: Maxime Pelletier <maxime.pelletier@libeo.com> >Date: Tue, 7 Feb 2012 10:37:49 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 6634 manager_id and itemnumber not populated when paying fines >Content-Type: text/plain; charset="utf-8" > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Accounts.pm | 14 ++++++++------ > 1 files changed, 8 insertions(+), 6 deletions(-) > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index e822b6a..c3d121d 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -201,10 +201,10 @@ sub makepayment { > my $ins = > $dbh->prepare( > "INSERT >- INTO accountlines (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding) >- VALUES ( ?, ?, now(), ?, 'Payment,thanks', 'Pay', 0)" >+ INTO accountlines (borrowernumber, accountno, date, amount, itemnumber, description, accounttype, amountoutstanding, manager_id) >+ VALUES ( ?, ?, now(), ?, ?, 'Payment,thanks', 'Pay', 0, ?)" > ); >- $ins->execute($borrowernumber, $nextaccntno, $payment); >+ $ins->execute($borrowernumber, $nextaccntno, $payment, $data->{'itemnumber'}, $manager_id); > $ins->finish; > } > >@@ -725,6 +725,8 @@ sub recordpayment_selectaccts { > # fills in > sub makepartialpayment { > my ( $borrowernumber, $accountno, $amount, $user, $branch ) = @_; >+ my $manager_id = 0; >+ $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; > if (!$amount || $amount < 0) { > return; > } >@@ -743,11 +745,11 @@ sub makepartialpayment { > > # create new line > my $insert = 'INSERT INTO accountlines (borrowernumber, accountno, date, amount, ' >- . 'description, accounttype, amountoutstanding) ' >- . ' VALUES (?, ?, now(), ?, ?, ?, 0)'; >+ . 'description, accounttype, amountoutstanding, itemnumber, manager_id) ' >+ . ' VALUES (?, ?, now(), ?, ?, ?, 0, ?, ?)'; > > $dbh->do( $insert, undef, $borrowernumber, $nextaccntno, $amount, >- "Payment, thanks - $user", 'Pay'); >+ "Payment, thanks - $user", 'Pay', $data->{'itemnumber'}, $manager_id); > > UpdateStats( $user, 'payment', $amount, '', '', '', $borrowernumber, $accountno ); > >-- >1.7.3
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 6634
:
4743
|
4745
|
4754
|
4991
|
7478
|
7527
|
8676