Bugzilla – Attachment 7483 Details for
Bug 6718
No manager_id saved for writeoff of fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to populate manager_id for writeoffs
0001-Bug-6718-No-manager_id-saved-for-writeoff-fines.patch (text/plain), 1.74 KB, created by
Maxime Pelletier
on 2012-02-07 16:11:49 UTC
(
hide
)
Description:
patch to populate manager_id for writeoffs
Filename:
MIME Type:
Creator:
Maxime Pelletier
Created:
2012-02-07 16:11:49 UTC
Size:
1.74 KB
patch
obsolete
>From 4b9c90442d518530e2ffd3436db319c8c64eb9bf Mon Sep 17 00:00:00 2001 >From: Maxime Pelletier <maxime.pelletier@libeo.com> >Date: Tue, 7 Feb 2012 11:10:32 -0500 >Subject: [PATCH] Bug 6718 No manager_id saved for writeoff fines. > >--- > members/pay.pl | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/members/pay.pl b/members/pay.pl >index 6bc18fc..a06f73d 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -109,6 +109,8 @@ output_html_with_http_headers $input, $cookie, $template->output; > > sub writeoff { > my ( $accountnum, $itemnum, $accounttype, $amount ) = @_; >+ my $manager_id = 0; >+ $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; > > # if no item is attached to fine, make sure to store it as a NULL > $itemnum ||= undef; >@@ -116,7 +118,7 @@ sub writeoff { > $writeoff_sth->execute( $accountnum, $borrowernumber ); > > my $acct = getnextacctno($borrowernumber); >- $add_writeoff_sth->execute( $borrowernumber, $acct, $itemnum, $amount ); >+ $add_writeoff_sth->execute( $borrowernumber, $acct, $itemnum, $amount, $manager_id ); > > UpdateStats( $branch, 'writeoff', $amount, q{}, q{}, q{}, $borrowernumber ); > >@@ -280,8 +282,8 @@ sub get_writeoff_sth { > . 'WHERE accountno=? and borrowernumber=?'; > $writeoff_sth = $dbh->prepare($sql); > my $insert = >-q{insert into accountlines (borrowernumber,accountno,itemnumber,date,amount,description,accounttype)} >- . q{values (?,?,?,now(),?,'Writeoff','W')}; >+q{insert into accountlines (borrowernumber,accountno,itemnumber,date,amount,description,accounttype,manager_id)} >+ . q{values (?,?,?,now(),?,'Writeoff','W',?)}; > $add_writeoff_sth = $dbh->prepare($insert); > } > return; >-- >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 6718
:
7483
|
7674