Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0021894 | Openbravo ERP | 07. Sales management | public | 2012-10-10 11:15 | 2012-10-30 18:11 |
Reporter | maite | ||||
Assigned To | jonalegriaesarte | ||||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0021894: Wrong Invoice posting when using "Tax Not deductible" and adding correction tax line | ||||
Description | Wrong Invoice posting when using "Tax Not deductible" and adding correction tax line | ||||
Steps To Reproduce | 1. 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 Solution | Problem 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" | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|