Bugzilla – Attachment 20809 Details for
Bug 7595
Add branchcode to accountlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7595 - Add branchcode to accountlines - Followup
Bug-7595---Add-branchcode-to-accountlines---Follow.patch (text/plain), 4.81 KB, created by
Kyle M Hall (khall)
on 2013-09-05 17:06:06 UTC
(
hide
)
Description:
Bug 7595 - Add branchcode to accountlines - Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-09-05 17:06:06 UTC
Size:
4.81 KB
patch
obsolete
>From 3d600b09512645915fc69ae3c288a5aceebeb0fb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 20 Sep 2012 10:17:04 -0400 >Subject: [PATCH] Bug 7595 - Add branchcode to accountlines - Followup > >--- > C4/Circulation.pm | 18 +++++++++--------- > C4/Overdues.pm | 6 +++--- > C4/Reserves.pm | 6 +++--- > 3 files changed, 15 insertions(+), 15 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 1dc7a45..6322264 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2209,9 +2209,9 @@ sub _FixAccountForLostAndReturned { > $amountleft *= -1 if ($amountleft > 0); > my $desc = "Item Returned " . $item_id; > $usth = $dbh->prepare("INSERT INTO accountlines >- (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding) >- VALUES (?,?,now(),?,?,'CR',?)"); >- $usth->execute($data->{'borrowernumber'},$nextaccntno,0-$amount,$desc,$amountleft); >+ (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,branchcode) >+ VALUES (?,?,now(),?,?,'CR',?,?)"); >+ $usth->execute($data->{'borrowernumber'},$nextaccntno,0-$amount,$desc,$amountleft,C4::Context->userenv->{'branch'}); > if ($borrowernumber) { > # FIXME: same as query above. use 1 sth for both > $usth = $dbh->prepare("INSERT INTO accountoffsets >@@ -2582,12 +2582,12 @@ sub AddRenewal { > $sth = $dbh->prepare( > "INSERT INTO accountlines > (date, borrowernumber, accountno, amount, manager_id, >- description,accounttype, amountoutstanding, itemnumber) >- VALUES (now(),?,?,?,?,?,?,?,?)" >+ description,accounttype, amountoutstanding, itemnumber, branch) >+ VALUES (now(),?,?,?,?,?,?,?,?,?)" > ); > $sth->execute( $borrowernumber, $accountno, $charge, $manager_id, > "Renewal of Rental Item $item->{'title'} $item->{'barcode'}", >- 'Rent', $charge, $itemnumber ); >+ 'Rent', $charge, $itemnumber, C4::Context->userenv->{'branch'} ); > } > > # Send a renewal slip according to checkout alert preferencei >@@ -2764,11 +2764,11 @@ sub AddIssuingCharge { > INSERT INTO accountlines > (borrowernumber, itemnumber, accountno, > date, amount, description, accounttype, >- amountoutstanding, manager_id) >- VALUES (?, ?, ?,now(), ?, 'Rental', 'Rent',?,?) >+ amountoutstanding, manager_id, branchcode) >+ VALUES (?, ?, ?,now(), ?, 'Rental', 'Rent',?,?,?) > "; > my $sth = $dbh->prepare($query); >- $sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, $charge, $manager_id ); >+ $sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, $charge, $manager_id, C4::Context->userenv->{'branch'} ); > $sth->finish; > } > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 4fd0b84..46ade2d 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -591,11 +591,11 @@ sub UpdateFine { > my $nextaccntno = C4::Accounts::getnextacctno($borrowernumber); > my $desc = ($type ? "$type " : '') . "$title $due"; # FIXEDME, avoid whitespace prefix on empty $type > my $query = "INSERT INTO accountlines >- (borrowernumber,itemnumber,date,amount,description,accounttype,amountoutstanding,lastincrement,accountno) >- VALUES (?,?,now(),?,?,'FU',?,?,?)"; >+ (borrowernumber,itemnumber,date,amount,description,accounttype,amountoutstanding,lastincrement,accountno,branchcode) >+ VALUES (?,?,now(),?,?,'FU',?,?,?,?)"; > my $sth2 = $dbh->prepare($query); > $debug and print STDERR "UpdateFine query: $query\nw/ args: $borrowernumber, $itemnum, $amount, $desc, $amount, $amount, $nextaccntno\n"; >- $sth2->execute($borrowernumber, $itemnum, $amount, $desc, $amount, $amount, $nextaccntno); >+ $sth2->execute($borrowernumber, $itemnum, $amount, $desc, $amount, $amount, $nextaccntno, C4::Context->userenv->{'branch'}); > } > # logging action > &logaction( >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index d6812f1..5c3ce65 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -176,13 +176,13 @@ sub AddReserve { > my $nextacctno = &getnextacctno( $borrowernumber ); > my $query = qq/ > INSERT INTO accountlines >- (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding) >+ (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,branchcode) > VALUES >- (?,?,now(),?,?,'Res',?) >+ (?,?,now(),?,?,'Res',?,?) > /; > my $usth = $dbh->prepare($query); > $usth->execute( $borrowernumber, $nextacctno, $fee, >- "Reserve Charge - $title", $fee ); >+ "Reserve Charge - $title", $fee, C4::Context->userenv->{'branch'} ); > } > > #if ($const eq 'a'){ >-- >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 7595
:
7866
|
7867
|
7868
|
7869
|
7870
|
8037
|
8162
|
12394
|
12395
|
12717
|
12719
|
14814
|
14815
|
20808
|
20809
|
23306
|
23308
|
27337
|
30946
|
30947
|
30950
|
38150
|
38225
|
38235
|
52909
|
52910
|
52911
|
54262
|
54263
|
54264