Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005008Openbravo ERP08. Project and service managementpublic2008-09-10 19:102008-12-09 11:33
networkb 
rafaroda 
normalmajorhave not tried
closedfixed 
20
2.35MP7 
 
Core
No
0005008: Create AP Expense Invoices process does not take the sequences number well
When executing this process if you are using document types different than the standard, although the document type is token well, the number of sequence is not taken from this document type.
Debugging the src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java file
i saw that the document type is well but then is not passed correctly to the function that calculate the document number.
It is used this function to pass the document type
Utility.getContext(this, vars, "C_DocTypeTarget_ID", docTargetType)
but if you have the document type on docTargetType variable maybe you don't need to use the getContext function to get it again.

replacing
String strDocumentno = Utility.getDocumentNo(this, vars, "", "C_Invoice", Utility.getContext(this, vars, "C_DocTypeTarget_ID", docTargetType) , Utility.getContext(this, vars, "C_DocType_ID", docTargetType), false, true);

with
String strDocumentno = Utility.getDocumentNo(this, vars, "", "C_Invoice", docTargetType , docTargetType, false, true);

The invoices take the numbers of the document type.
No tags attached.
blocks defect 0005005 closed rafaroda Create AP Expense Invoices process does not take the sequences number well 
Issue History
2008-09-10 19:10rafarodaNew Issue
2008-09-10 19:10rafarodaAssigned To => rafaroda
2008-09-10 19:10rafarodaStatusnew => scheduled
2008-09-11 18:41svnbotCheckin
2008-09-11 18:41svnbotNote Added: 0009008
2008-09-11 18:41svnbotStatusscheduled => resolved
2008-09-11 18:41svnbotResolutionopen => fixed
2008-09-11 18:41svnbotsvn_revision => 7219
2008-12-09 11:33krishnaRegression testing => No
2008-12-09 11:33krishnaStatusresolved => closed

Notes
(0009008)
svnbot   
2008-09-11 18:41   
Repository: openbravo
Revision: 7219
Author: rafaroda
Date: 2008-09-11 18:41:10 +0200 (Thu, 11 Sep 2008)

Fixes bug 0005008 Replaced 'Utility.getContext(this, vars, "C_DocTypeTarget_ID", docTargetType)' by 'docTargetType' in ExpenseAPInvoice.java and ExpenseSOrder.java.

---
U branches/r2.40/src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
U branches/r2.40/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=7219&sc=1 [^]