Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0021894
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2012-10-10 11:152012-10-30 18:11
ReportermaiteView Statuspublic 
Assigned Tojonalegriaesarte 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision86ff038e5ebd
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0021894: Wrong Invoice posting when using "Tax Not deductible" and adding correction tax line

DescriptionWrong Invoice posting when using "Tax Not deductible" and adding correction tax line
Steps To Reproduce1. Edit any tax rate to define it as "Tax not deductible"
2. Create Purchase Invoice for any BP, any product and using that tax rate
3. Go to "Tax" tab and add manually new record for same tax rate and tax amount=-0.01
4. Process Invoice and Post
5. Accounting entry is wrong as it should only use 2 accounts, as it is documented in http://wiki.openbravo.com/wiki/Tax_Rate#Tax [^]
Proposed SolutionProblem is in DocInvoice_data.xsql file, "select" should group by tax_id. Query should be left as follows:

"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,
        '' AS DATEPRINTED, '' AS DATEACCT, '' AS C_BPARTNER_ID, '' AS C_BPARTNER_LOCATION_ID, '' AS POREFERENCE, '' AS ISDISCOUNTPRINTED,
        '' AS DATEORDERED, '' AS C_CURRENCY_ID, '' AS PAYMENTRULE, '' AS C_PAYMENTTERM_ID, '' AS C_CHARGE_ID, '' AS CHARGEAMT, '' AS TOTALLINES,
        '' AS GRANDTOTAL, '' AS M_PRICELIST_ID, '' AS ISTAXINCLUDED, '' AS C_CAMPAIGN_ID, '' AS C_PROJECT_ID, '' AS C_ACTIVITY_ID,
        '' AS ISPAID, '' AS CREATEFROM, '' AS GENERATETO, '' AS SENDEMAIL, '' AS AD_USER_ID, '' AS COPYFROM, '' AS ISSELFSERVICE,
        '' AS AD_ORGTRX_ID, '' AS USER1_ID, '' AS USER2_ID, '' as AMOUNT, '' AS STATUS, '' AS ISRECEIPT, '' AS ISMANUAL, '' AS WRITEOFFAMT,
        '' AS C_DEBT_PAYMENT_ID, '' AS P_REVENUE_ACCT, '' AS P_EXPENSE_ACCT, '' as FIN_PAYMENT_SCHEDULE_ID, '' as FIN_PAYMENTMETHOD_ID, '' AS PREPAIDAMT,
        '' 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"
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0053199)
hgbot (developer)
2012-10-10 11:59

Repository: erp/devel/pi
Changeset: 86ff038e5ebdd84a0d04254a18aabea36bc625f5
Author: Jon Alegría <jon.alegria <at> openbravo.com>
Date: Wed Oct 10 11:57:22 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/86ff038e5ebdd84a0d04254a18aabea36bc625f5 [^]

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 [^]

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql
---
(0053293)
hudsonbot (developer)
2012-10-11 07:51

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/63dfc135f2a1 [^]

Maturity status: Test
(0053856)
maite (developer)
2012-10-30 18:11

verified

- Issue History
Date Modified Username Field Change
2012-10-10 11:15 maite New Issue
2012-10-10 11:15 maite Assigned To => dmiguelez
2012-10-10 11:15 maite Modules => Core
2012-10-10 11:17 maite Issue Monitored: networkb
2012-10-10 11:18 jonalegriaesarte Assigned To dmiguelez => jonalegriaesarte
2012-10-10 11:59 hgbot Checkin
2012-10-10 11:59 hgbot Note Added: 0053199
2012-10-10 11:59 hgbot Status new => resolved
2012-10-10 11:59 hgbot Resolution open => fixed
2012-10-10 11:59 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/86ff038e5ebdd84a0d04254a18aabea36bc625f5 [^]
2012-10-11 07:51 hudsonbot Checkin
2012-10-11 07:51 hudsonbot Note Added: 0053293
2012-10-30 18:11 maite Note Added: 0053856
2012-10-30 18:11 maite Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker