details:   https://code.openbravo.com/erp/devel/pi/rev/86ff038e5ebd
changeset: 18186:86ff038e5ebd
user:      Jon Alegría <jon.alegria <at> openbravo.com>
date:      Wed Oct 10 11:57:22 2012 +0200
summary:   Fixes issue 0021894: Wrong Invoice posting when using "Tax Not 
deductible" and
adding correction tax line
Added group by to work as documented
http://wiki.openbravo.com/wiki/Tax_Rate#Tax

diffstat:

 src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r f218a3d70f90 -r 86ff038e5ebd 
src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql
--- a/src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql Wed Oct 10 
11:32:37 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql Wed Oct 10 
11:57:22 2012 +0200
@@ -26,7 +26,7 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
-        SELECT t.IsTaxUndeductable as rateTaxUndeductable, (select 
IsTaxUndeductable from ad_orginfo o where o.ad_org_id=it.ad_org_id) as 
orgTaxUndeductable, it.C_Tax_ID, t.Name, t.Rate, t.IsTaxDeductable, 
it.TaxBaseAmt, it.TaxAmt, '' AS C_INVOICE_ID, '' AS AD_CLIENT_ID, '' AS 
AD_ORG_ID,
+        SELECT t.IsTaxUndeductable as rateTaxUndeductable, (select 
IsTaxUndeductable from ad_orginfo o where o.ad_org_id=it.ad_org_id) as 
orgTaxUndeductable, it.C_Tax_ID, t.Name, t.Rate, t.IsTaxDeductable, 
SUM(it.TaxBaseAmt) AS TaxBaseAmt, SUM(it.TaxAmt) AS TaxAmt, '' AS C_INVOICE_ID, 
'' AS AD_CLIENT_ID, '' AS AD_ORG_ID,
         '' AS ISACTIVE, '' AS CREATED, '' AS CREATEDBY, '' AS UPDATED, '' AS 
UPDATEDBY, '' AS ISSOTRX, '' AS DOCUMENTNO,
         '' AS DOCSTATUS, '' AS DOCACTION, '' AS PROCESSING, '' AS PROCESSED, 
'' AS POSTED, '' AS C_DOCTYPE_ID, '' AS C_DOCTYPETARGET_ID,
         '' AS C_ORDER_ID, '' AS DESCRIPTION, '' AS ISTRANSFERRED, '' AS 
ISPRINTED, '' AS SALESREP_ID, '' AS DATEINVOICED,
@@ -39,6 +39,7 @@
         '' AS FININVCOUNT, '' AS FINACCTCOUNT, '' AS FIN_PAYMENT_ID
         FROM C_Tax t, C_InvoiceTax it
         WHERE t.C_Tax_ID=it.C_Tax_ID AND it.C_Invoice_ID=?
+       GROUP BY t.IsTaxUndeductable, it.C_Tax_ID, t.Name, t.Rate, 
t.IsTaxDeductable, it.ad_org_id
      ]]>
      </Sql>
      <Parameter name="invoice"/>

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to