Bugzilla – Attachment 1848 Details for
Bug 4118
Add Collection Code (CCODE) to Statistics Table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds code to C4 modules to support ccodes.
0001-Bugfix-4118-Add-Collection-Code-to-Statistics-Tabl.patch (text/plain), 3.05 KB, created by
Chris Cormack
on 2010-02-05 16:50:00 UTC
(
hide
)
Description:
Adds code to C4 modules to support ccodes.
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-02-05 16:50:00 UTC
Size:
3.05 KB
patch
obsolete
>From 9454ac2753cd056e3d6299eda8bfbaae766f9ed3 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle.m.hall@gmail.com> >Date: Fri, 5 Feb 2010 16:04:53 +0000 >Subject: [PATCH] Bugfix 4118 - Add Collection Code to Statistics Table - Updated C4 Modules to add Collection Codes to stats table > >--- > C4/Circulation.pm | 8 ++++---- > C4/Stats.pm | 8 ++++---- > 2 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 98f324c..22e07bf 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -685,7 +685,7 @@ sub CanBookBeIssued { > # > if ( $borrower->{'category_type'} eq 'X' && ( $item->{barcode} )) { > # stats only borrower -- add entry to statistics table, and return issuingimpossible{STATS} = 1 . >- &UpdateStats(C4::Context->userenv->{'branch'},'localuse','','',$item->{'itemnumber'},$item->{'itemtype'},$borrower->{'borrowernumber'}); >+ &UpdateStats(C4::Context->userenv->{'branch'},'localuse','','',$item->{'itemnumber'},$item->{'itemtype'},$borrower->{'borrowernumber'}, undef, $item->{'ccode'}); > return( { STATS => 1 }, {}); > } > if ( $borrower->{flags}->{GNA} ) { >@@ -1036,7 +1036,7 @@ sub AddIssue { > C4::Context->userenv->{'branch'}, > 'issue', $charge, > ($sipmode ? "SIP-$sipmode" : ''), $item->{'itemnumber'}, >- $item->{'itype'}, $borrower->{'borrowernumber'} >+ $item->{'itype'}, $borrower->{'borrowernumber'}, undef, $item->{'ccode'} > ); > > # Send a checkout slip. >@@ -1541,7 +1541,7 @@ sub AddReturn { > $branch, 'return', '0', '', > $item->{'itemnumber'}, > $biblio->{'itemtype'}, >- $borrowernumber >+ $borrowernumber, undef, $item->{'ccode'} > ); > > # Send a check-in slip. # NOTE: borrower may be undef. probably shouldn't try to send messages then. >@@ -2194,7 +2194,7 @@ sub AddRenewal { > $sth->finish; > } > # Log the renewal >- UpdateStats( $branch, 'renew', $charge, '', $itemnumber, $item->{itype}, $borrowernumber); >+ UpdateStats( $branch, 'renew', $charge, '', $itemnumber, $item->{itype}, $borrowernumber, undef, $item->{'ccode'}); > return $datedue; > } > >diff --git a/C4/Stats.pm b/C4/Stats.pm >index b4875aa..c80750c 100644 >--- a/C4/Stats.pm >+++ b/C4/Stats.pm >@@ -76,20 +76,20 @@ sub UpdateStats { > my ( > $branch, $type, > $amount, $other, $itemnum, >- $itemtype, $borrowernumber, $accountno >+ $itemtype, $borrowernumber, $accountno, $ccode > ) > = @_; > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare( > "INSERT INTO statistics > (datetime, branch, type, value, >- other, itemnumber, itemtype, borrowernumber, proccode) >- VALUES (now(),?,?,?,?,?,?,?,?)" >+ other, itemnumber, itemtype, borrowernumber, proccode, ccode) >+ VALUES (now(),?,?,?,?,?,?,?,?,?)" > ); > $sth->execute( > $branch, $type, $amount, > $other, $itemnum, $itemtype, $borrowernumber, >- $accountno >+ $accountno, $ccode > ); > } > >-- >1.5.6.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 4118
:
1848
|
1849
|
10164
|
10165
|
10213
|
10214
|
10602
|
10603
|
10604
|
10605
|
10887
|
11322
|
12172
|
12173
|
12792
|
12793
|
12795