Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0008410
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 08. Project and service managementmajorrandom2009-04-01 11:272009-05-11 08:31
ReportersercView Statuspublic 
Assigned Toareefbasha 
PriorityhighResolutionfixedFixed in Version2.40MP4
StatusclosedFix in branch2.40Fixed in SCM revision722df645160b
ProjectionnoneETAnoneTarget Version
OSWindowsDatabasePostgreSQLJava version1.6.0_03
OS VersionXpDatabase version8.3.5Ant version1.7.0
Product Version2.50betaSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0008410: Expense invoices are not being created properly.

DescriptionCreate AP Expense Invoices doesn't properly generate invoices from expense sheets.
Randomly, it merges expenses into some other invoices. One of the potential reasons is, in the respective servlet i.e., org.openbravo.erpCommon.ad_process.ExpenseAPInvoice there is an issues with a query.


Method processExpense needs invoice header to process expense sheets, and gets it from another method selectInvoiceHeader which is using max in the query. This seems to be absurd and might be cause of the problem.
Steps To Reproduce1. Create some expense sheets.
2. Process them in Create AP Expense Invoice page.
3. See output at Procurement Management-> Transactions-> Purchase Invoices.
You will see at times expenses that are to merge in one invoice are merged at different purchase invoices.

Sample data
-----------

1) Create a new expense sheet

Create a line item

one line item --> 5000 --> Food

Click Process Expenses button in the expense sheet header.


2) Create another new expense sheet

Create two line items

a line item --> 6000 --> Electricity
a line item --> 7000 --> Food

Click Process Expenses button in the expense sheet header.


3) Create AP Expense Invoices for the above items

Gor the message as "Purchase Invoice No. 10000039 has been created"


Expected Result: Now the all the three lines items should appear in one pucharse invoice 10000039

Actual Result :

Only the first item appear in the purchase invoice 10000039

the second item appear in another purchase invoice 10000038.
Proposed SolutionSERVLET: org.openbravo.erpCommon.ad_process.ExpenseAPInvoice


Method processExpense needs invoice header to process expense sheets, and gets it from another method selectInvoiceHeader which is using max in the query.

This is not causing the problem but the following:

1) C_INVOICELINE table is no needed in selectInvoiceHeader and selectInvoiceHeaderNoProject selects selects.

2) There are some checks done to employee condition: price list, location, payment rule, payment term, etc... These check has to be done before selectInvoiceHeader and selectInvoiceHeaderNoProject and not after.

3) These employee conditions should take part in the selectInvoiceHeader and selectInvoiceHeaderNoProject selects.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0008373 closedareefbasha Expense invoices are not being created properly. 

-  Notes
(0015875)
hgbot (developer)
2009-04-28 18:08

Repository: erp/stable/2.40
Changeset: 722df645160b0983ea9aa237e2d32ae2c3f46e40
Author: Areef Basha <areef.basha <at> openbravo.com>
Date: Tue Apr 28 21:36:18 2009 -0400
URL: http://code.openbravo.com/erp/stable/2.40/rev/722df645160b0983ea9aa237e2d32ae2c3f46e40 [^]

Fixes bug 8410: Expense invoices are not being created properly.

The selectInvoiceHeader and selectInvoiceHeaderNoProject selects have been changed.

---
M src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
M src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice_data.xsql
---
(0016215)
arunkumar (reporter)
2009-05-11 08:31

This issue has been fixed.

- Issue History
Date Modified Username Field Change
2009-04-03 08:44 rafaroda Type defect => backport
2009-04-03 08:44 rafaroda fix_in_branch => 2.40
2009-04-27 11:07 rafaroda Assigned To serc => sathiyan
2009-04-27 12:36 sathiyan Assigned To sathiyan => areefbasha
2009-04-28 14:42 rafaroda Proposed Solution updated
2009-04-28 14:42 rafaroda Steps to Reproduce Updated
2009-04-28 16:19 rafaroda Steps to Reproduce Updated
2009-04-28 18:08 hgbot Checkin
2009-04-28 18:08 hgbot Note Added: 0015875
2009-04-28 18:08 hgbot Status scheduled => resolved
2009-04-28 18:08 hgbot Resolution open => fixed
2009-04-28 18:08 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/722df645160b0983ea9aa237e2d32ae2c3f46e40 [^]
2009-05-10 19:37 psarobe Fixed in Version => 2.40MP4
2009-05-11 08:31 arunkumar Status resolved => closed
2009-05-11 08:31 arunkumar Note Added: 0016215


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker