Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005005Openbravo ERP08. Project and service managementpublic2008-09-10 18:282008-12-15 20:05
networkb 
rafaroda 
normalmajorhave not tried
closedfixed 
20
2.35MP7 
 
Core
No
0005005: 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.
depends on backport 0005007 closed rafaroda Create AP Expense Invoices process does not take the sequences number well 
depends on backport 0005008 closed rafaroda Create AP Expense Invoices process does not take the sequences number well 
depends on backport 0005009 closed rafaroda Create AP Expense Invoices process does not take the sequences number well 
Issue History
2008-09-10 18:28networkbNew Issue
2008-09-10 18:28networkbAssigned To => cromero
2008-09-10 18:28networkbsf_bug_id0 => 2104019
2008-09-10 18:28networkbRegression testing => No
2008-09-10 18:44rafarodaAssigned Tocromero => rafaroda
2008-09-10 19:10rafarodaStatusnew => scheduled
2008-09-10 19:10rafarodafix_in_branch => trunk
2008-09-11 18:46svnbotCheckin
2008-09-11 18:46svnbotNote Added: 0009009
2008-09-11 18:46svnbotStatusscheduled => resolved
2008-09-11 18:46svnbotResolutionopen => fixed
2008-09-11 18:46svnbotsvn_revision => 7222
2008-12-15 20:05psarobeStatusresolved => closed

Notes
(0009009)
svnbot   
2008-09-11 18:46   
Repository: openbravo
Revision: 7222
Author: rafaroda
Date: 2008-09-11 18:46:21 +0200 (Thu, 11 Sep 2008)

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

---
U trunk/src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
U trunk/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
---

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