Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0002147Openbravo ERP08. Project and service managementpublic2007-10-24 09:552009-04-21 11:05
roklenardic 
rafaroda 
normalminoralways
closedfixed 
5
 
2.40 
No
Core
No
0002147: Project Profitability Discount
If I generate a sales order for a Phase within a project and the business partner that is being invoiced has a discount defined (for example Discount 15%), then this discount appears as a negative number on a project profitability report in the Expenses Revenue column.

Ubuntu 7.10
Oracle 10 XE
Firefox 2
Tomcat 5.5
OB 2.34
1) Go to 'Master Data Management || Business Partner Setup || Discount ' and check that there are discounts. If not, create some.
2) Go to 'Master Data Management || Business Partner || Business Partner', select a customer business partner.
3) Go to 'Discount' tab and assign him a Discount.
4) Go to 'Project & Service Management || Transactions || Multiphase Project' and create a new Multiphase Project with a 'discounted' business partner.
5) Go to 'Project Phase' tab and assign it the product 'Consulting service' (or any other product with 'Product Type' equal to 'Service').
6) Go back to 'Multiphase Project' header and 'Change Project Status' to Order.
7) Go back to 'Project Phase' tab and click on 'Create Sales Order from Project Phase'.
8) Navigate to the Sale Order created, change 'Invoice Terms' to 'Immediate' and Save.
9) Click on Complete button.
10) Go to 'Generate Invoices' and generate an invoice from the previous Sale Order.
11) Go to the Sale Invoice created.
12) Go to 'Lines' tab and check that there is a line for 'Consulting Service' product and one or more with the discount lines (with negative Unit Price).
13) Go to 'Project & Service Management || Analysis Tools || Project Profitability' and select the previous business partner and project.
14) Launch the report in HTML format and notice that:
* In Real Revenue, the amount of the 'Consulting Service' appears: OK
* In Real Reinvoicing, the amount of discounts appear with negative sign: ERROR
Project Profitability Report [1] shows in:
* Real Revenue, the real revenues of a project, in other words, orders related to this project that have been invoiced. It takes products with 'Product Type' EQUAL to 'Service'.
* Real Reinvoicing, the invoiced sales orders associated to invoiceable expenses to customers. It takes products with 'Product Type' DISTINCT to 'Service'.

Discounts are products with 'Product Type' DISTINCT to 'Service' so they always appear has real reinvoicing.

The solution is that Project Profitability Report calculates which proportion of the amount is due to products with 'Product Type' EQUAL to 'Service' and due to products with 'Product Type' DISTINCT to 'Service' and apply the proportional part of discounts to each one.

[1] http://wiki.openbravo.com/wiki/Functional_Documentation/Project_and_Service_Management#Project_Profitability [^]
No tags attached.
Issue History
2008-06-13 20:16psarobeStatusnew => scheduled
2008-06-18 11:09rafarodaOBNetwork customer => No
2008-06-18 11:09rafarodaDescription Updated
2008-06-18 11:09rafarodaProposed Solution updated
2008-06-18 11:09rafarodaSteps to Reproduce Updated
2008-06-19 16:41rafarodaProposed Solution updated
2008-08-07 17:03svnbotCheckin
2008-08-07 17:03svnbotNote Added: 0008498
2008-08-07 17:03svnbotStatusscheduled => resolved
2008-08-07 17:03svnbotResolutionopen => fixed
2008-08-07 17:03svnbotsvn_revision => 6187
2009-04-21 11:05psarobeStatusresolved => closed

Notes
(0005736)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:43)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1819128 [^]
(0008498)
svnbot   
2008-08-07 17:03   
Repository: openbravo
Revision: 6187
Author: rafaroda
Date: 2008-08-07 17:03:48 +0200 (Thu, 07 Aug 2008)

Fixes bug 0002147 Project Profitability Report now distributes correctly the discounts in revenue, reinvoicing and expenses cells.

---
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitability_data.xsql
---

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