Bugzilla – Attachment 5453 Details for
Bug 4831
Actual Price being ignored after receive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug_4831: Use unitprice (actual cost) when totalling spent amounts for "All available funds", as in "Already received"
bug4831-Use-unitprice-actual-cost-when-totalling-s.patch (text/plain), 1.19 KB, created by
Katrin Fischer
on 2011-09-18 20:29:46 UTC
(
hide
)
Description:
bug_4831: Use unitprice (actual cost) when totalling spent amounts for "All available funds", as in "Already received"
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-09-18 20:29:46 UTC
Size:
1.19 KB
patch
obsolete
>From 0c05d41de51ec5074d992bf50697b19ab70cf21f Mon Sep 17 00:00:00 2001 >From: Srdjan Jankovic <srdjan@catalyst.net.nz> >Date: Wed, 7 Sep 2011 16:02:21 +1200 >Subject: [PATCH] bug_4831: Use unitprice (actual cost) when totalling spent amounts for "All available funds", as in "Already received" >Content-Type: text/plain; charset="utf-8" > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> > >To test: >- add new fund for an active budget >- order item, price 8.00 >- check funds page and acq home: committed amount should be 8.00 >- receive item, enter actual price 10.00 >- check funds page and acq home: spent amount should be 10.00 >--- > C4/Budgets.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index 888b4fd..7c867e0 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -304,7 +304,7 @@ sub GetBudgetSpent { > my ($budget_id) = @_; > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare(qq| >- SELECT SUM(ecost * quantity) AS sum FROM aqorders >+ SELECT SUM( COALESCE(unitprice, ecost) * quantity ) AS sum FROM aqorders > WHERE budget_id = ? AND > quantityreceived > 0 AND > datecancellationprinted IS NULL >-- >1.7.4.1
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 4831
:
2180
|
2181
|
5330
| 5453