Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010427Openbravo ERP09. Financial managementpublic2009-08-28 13:212009-10-06 11:50
dalsasua 
eduardo_Argal 
highmajoralways
closedfixed 
20Ubuntu 8.04Hardy
pi 
pi2.50MP6 
Core
No
0010427: Purchase Invoices do not include c_tax_id value when being posted
Purchase Invoices do not include c_tax_id value when being posted.

This is a problem because non of the tax reports will be reliable.
Create a purchase invoice
Add products with taxes
Post it
Check in database that none of the lines of the entry contain value for c_tax_id column
For sales invoices is working fine. In DocInvoice.java, createFact function, exists this piece of code, when invoice to be posted is a sales invoice:

  // TaxDue CR
  for (int i = 0; m_taxes != null && i < m_taxes.length; i++) {
    //New docLine created to assign C_Tax_ID value to the entry
    DocLine docLine = new DocLine(DocumentType, Record_ID, "");
    docLine.m_C_Tax_ID = m_taxes[i].m_C_Tax_ID;
    fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxDue, as, conn),
        C_Currency_ID, "", m_taxes[i].m_amount, Fact_Acct_Group_ID, nextSeqNo(SeqNo),
      DocumentType, conn);
  }

and this code when the invoice is a purchase invoice:


// TaxCredit DR
for (int i = 0; m_taxes != null && i < m_taxes.length; i++)
  fact.createLine(null, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxCredit, as, conn),
      this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID, nextSeqNo(SeqNo),
      DocumentType, conn);


It seems that in the second case, value taxes[i].m_C_Tax_ID is not provided to createLine function.
No tags attached.
Issue History
2009-08-28 13:21dalsasuaNew Issue
2009-08-28 13:21dalsasuaAssigned To => rafaroda
2009-08-28 13:22dalsasuaAssigned Torafaroda => eduardo_Argal
2009-08-28 15:02rafarodaPrioritynormal => high
2009-08-28 15:02rafarodaStatusnew => scheduled
2009-08-28 15:02rafarodaversion => pi
2009-09-21 11:55hgbotCheckin
2009-09-21 11:55hgbotNote Added: 0020229
2009-09-21 11:55hgbotStatusscheduled => resolved
2009-09-21 11:55hgbotResolutionopen => fixed
2009-09-21 11:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/53d4c9a705d1b5c6b8ad346fb5acc840d8d7d747 [^]
2009-09-22 12:02psarobeStatusresolved => closed
2009-09-22 12:02psarobeNote Added: 0020262
2009-09-22 12:02psarobeFixed in Version => 2.50MP6
2009-09-23 00:00anonymoussf_bug_id0 => 2864615
2009-09-29 14:14hgbotCheckin
2009-09-29 14:14hgbotNote Added: 0020487
2009-09-29 14:14hgbotStatusclosed => resolved
2009-09-29 14:14hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/53d4c9a705d1b5c6b8ad346fb5acc840d8d7d747 [^] => http://code.openbravo.com/erp/devel/pi-pageddatagrid/rev/53d4c9a705d1b5c6b8ad346fb5acc840d8d7d747 [^]
2009-10-06 11:50psarobeStatusresolved => closed
2009-10-06 11:50psarobeNote Added: 0020769

Notes
(0020229)
hgbot   
2009-09-21 11:55   
Repository: erp/devel/pi
Changeset: 53d4c9a705d1b5c6b8ad346fb5acc840d8d7d747
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Mon Sep 21 11:55:15 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/53d4c9a705d1b5c6b8ad346fb5acc840d8d7d747 [^]

Fixes issue 10427: Purchase Invoices do not include c_tax_id
value when being posted

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0020262)
psarobe   
2009-09-22 12:02   
Tested working fine
(0020487)
hgbot   
2009-09-29 14:14   
Repository: erp/devel/pi-pageddatagrid
Changeset: 53d4c9a705d1b5c6b8ad346fb5acc840d8d7d747
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Mon Sep 21 11:55:15 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi-pageddatagrid/rev/53d4c9a705d1b5c6b8ad346fb5acc840d8d7d747 [^]

Fixes issue 10427: Purchase Invoices do not include c_tax_id
value when being posted

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0020769)
psarobe   
2009-10-06 11:50   
Closed again because hudson has reopened without no reason