Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005007Openbravo ERP08. Project and service managementpublic2008-09-10 19:102009-05-21 16:37
networkb 
rafaroda 
normalmajorhave not tried
closedfixed 
20
2.35MP7 
 
No
Core
No
0005007: 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 10:35networkbOBNetwork customer => No
2008-09-11 10:35networkbNote Added: 0008985
2008-09-11 10:35networkbSteps to Reproduce Updated
2008-09-11 18:27svnbotCheckin
2008-09-11 18:27svnbotNote Added: 0009007
2008-09-11 18:27svnbotStatusscheduled => resolved
2008-09-11 18:27svnbotResolutionopen => fixed
2008-09-11 18:27svnbotsvn_revision => 7215
2009-05-21 16:37psarobeStatusresolved => closed

Notes
(0008985)
networkb   
2008-09-11 10:35   
The same error happen on ad_actionButton/ExpenseSOrder.java file
(0009007)
svnbot   
2008-09-11 18:27   
Repository: openbravo
Revision: 7215
Author: rafaroda
Date: 2008-09-11 18:27:17 +0200 (Thu, 11 Sep 2008)

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

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

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