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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0008373
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 08. Project and service managementmajorrandom2009-04-01 11:272009-05-05 00:00
ReportersercView Statuspublic 
Assigned Toareefbasha 
PriorityhighResolutionfixedFixed in Version2.50MP1
StatusclosedFix in branchFixed in SCM revision11714fc5cfc0
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

0008373: 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.
Tags250MP1
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0008410 closedareefbasha Expense invoices are not being created properly. 

-  Notes
(0015877)
hgbot (developer)
2009-04-28 18:24

Repository: erp/devel/pi
Changeset: 11714fc5cfc0453dee2fe460302b138d4181c9b0
Author: Areef Basha <areef.basha <at> openbravo.com>
Date: Tue Apr 28 21:52:08 2009 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/11714fc5cfc0453dee2fe460302b138d4181c9b0 [^]

Fixes bug 8373: : 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
---

- Issue History
Date Modified Username Field Change
2009-04-01 11:27 serc New Issue
2009-04-01 11:27 serc Assigned To => rafaroda
2009-04-01 11:27 serc Regression testing => No
2009-04-03 08:44 rafaroda Assigned To rafaroda => serc
2009-04-03 08:44 rafaroda Priority normal => high
2009-04-03 08:44 rafaroda Steps to Reproduce Updated
2009-04-03 08:44 rafaroda Status new => scheduled
2009-04-03 08:44 rafaroda fix_in_branch => pi
2009-04-23 16:05 psarobe Tag Attached: 250MP1
2009-04-27 11:07 rafaroda Assigned To serc => sathiyan
2009-04-27 12:36 sathiyan Assigned To sathiyan => areefbasha
2009-04-28 13:59 areefbasha fix_in_branch pi =>
2009-04-28 13:59 areefbasha Proposed Solution updated
2009-04-28 14:41 rafaroda Steps to Reproduce Updated
2009-04-28 16:18 rafaroda Steps to Reproduce Updated
2009-04-28 18:24 hgbot Checkin
2009-04-28 18:24 hgbot Note Added: 0015877
2009-04-28 18:24 hgbot Status scheduled => resolved
2009-04-28 18:24 hgbot Resolution open => fixed
2009-04-28 18:24 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/11714fc5cfc0453dee2fe460302b138d4181c9b0 [^]
2009-05-04 19:53 psarobe Status resolved => closed
2009-05-05 00:00 anonymous sf_bug_id 0 => 2786888


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker