Bugzilla – Attachment 20745 Details for
Bug 10461
tax not taken in to account in the acq budget summaries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-tax-not-taken-in-to-account-in-the-acq-budget-summaries.patch (text/plain), 1.93 KB, created by
Koha Team University Lyon 3
on 2013-08-30 15:38:59 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Koha Team University Lyon 3
Created:
2013-08-30 15:38:59 UTC
Size:
1.93 KB
patch
obsolete
>From f147ddd5dfe0cb04444b3a8c71afe382a69eaa40 Mon Sep 17 00:00:00 2001 >From: kohateam <koha@univ-lyon3.fr> >Date: Mon, 15 Jul 2013 16:07:55 +0200 >Subject: [PATCH] Bug 10461 - tax not taken in to account in the acq budget summaries >--- > C4/Budgets.pm | 16 ++++++++-------- > 1 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index d07dc75..756c3aa 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -309,10 +309,10 @@ sub GetBudgetSpent { > my ($budget_id) = @_; > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare(qq| >- SELECT SUM( COALESCE(unitprice, ecost) * quantity ) AS sum FROM aqorders >- WHERE budget_id = ? AND >- quantityreceived > 0 AND >- datecancellationprinted IS NULL >+ SELECT SUM(( COALESCE(unitprice, ecost) +COALESCE(unitprice, ecost)*IF(invoiceincgst=0,COALESCE(aqorders.gstrate,0),0) )* quantityreceived ) AS sum FROM aqorders >+ LEFT JOIN aqbasket ON (aqorders.basketno = aqbasket.basketno) >+ LEFT JOIN aqbooksellers ON(aqbasket.booksellerid=aqbooksellers.id) >+ WHERE budget_id = ? AND quantityreceived > 0 AND datecancellationprinted IS NULL > |); > $sth->execute($budget_id); > my $sum = $sth->fetchrow_array; >@@ -335,10 +335,10 @@ sub GetBudgetOrdered { > my ($budget_id) = @_; > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare(qq| >- SELECT SUM(ecost * quantity) AS sum FROM aqorders >- WHERE budget_id = ? AND >- quantityreceived = 0 AND >- datecancellationprinted IS NULL >+ SELECT SUM((ecost+ecost*IF(listincgst=0,COALESCE(aqorders.gstrate,0),0) ) * (quantity-quantityreceived)) AS sum FROM aqorders >+ LEFT JOIN aqbasket ON (aqorders.basketno = aqbasket.basketno) >+ LEFT JOIN aqbooksellers ON(aqbasket.booksellerid=aqbooksellers.id) >+ WHERE budget_id = ? AND datecancellationprinted IS NULL > |); > $sth->execute($budget_id); > my $sum = $sth->fetchrow_array; >-- >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 10461
:
20745
|
21994
|
22003
|
23604