Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012014Openbravo ERP08. Project and service managementpublic2010-01-20 11:182010-07-28 17:42
networkb 
adrianromero 
highminoralways
closedfixed 
5
2.50MP10 
2.50MP142.50MP14 
Core
No
0012014: Error in Project Profitability
For Purchase Invoice the corresponding line amount is added always to the column Expenses. It doesn't work fine because if there is an Invoice with a service product, its line amount is added to the column Expenses too.

(file uploaded)
-As Openbravo Admin go to Procurement Management || Transactions || Purchase Invoice
-Create a new record:
   -Bussines Partner: Mcgiver.
   -Project: mafalda - Mafalda project
-Save and go to Lines, create a new record:
   -Product: Consulting Service.
   -Unit Price: 100
   -Tax: Exempt.
   -Order UOM: 'empty'
-Save and go to the header.
-Complete.

-Go to Project & Service Management || Analysis Tools || Project Profitability
   -Business Partner: Mcgiver.
   -Project: mafalda - Mafalda project
-Click 'HTML format'
-Realize that the invoice's amount has been added to the column Expenses.


If there is an invoice with a service product, its line amount should be added to the column services, tab cost.
No tags attached.
related to defect 00124312.50MP14 closed adrianromero It is not possible to execute Project profitability 
related to defect 00125862.50MP14 closed adrianromero The way to pay the expeses of the employee is creating an invoice what is not correct 
related to defect 0015034 closed  Missing documentation for "Outsourced" fields in Project windows and Reports 
png ProjectProfitability.png (52,617) 2010-01-20 11:18
https://issues.openbravo.com/file_download.php?file_id=2148&type=bug
png
Issue History
2010-01-20 11:18networkbNew Issue
2010-01-20 11:18networkbAssigned To => rafaroda
2010-01-20 11:18networkbFile Added: ProjectProfitability.png
2010-01-20 11:34rafarodaNote Added: 0023603
2010-01-20 11:34rafarodaStatusnew => closed
2010-01-20 11:34rafarodaResolutionopen => no change required
2010-01-20 13:04networkbNote Added: 0023610
2010-01-20 13:04networkbStatusclosed => new
2010-01-20 13:04networkbResolutionno change required => open
2010-02-05 18:05eugeniIssue Monitored: eugeni
2010-02-09 18:28rafarodaPriorityimmediate => high
2010-02-09 18:28rafarodaStatusnew => scheduled
2010-02-09 18:44rafarodaNote Added: 0024071
2010-02-09 19:26psarobeNote Added: 0024072
2010-02-11 11:07rafarodaAssigned Torafaroda => adrianromero
2010-02-24 17:47rafarodaRelationship addedrelated to 0012431
2010-02-24 17:49rafarodaIssue Monitored: rafaroda
2010-03-01 14:37hgbotCheckin
2010-03-01 14:37hgbotNote Added: 0024907
2010-03-01 14:37hgbotStatusscheduled => resolved
2010-03-01 14:37hgbotResolutionopen => fixed
2010-03-01 14:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/28dfbc300ac04f8b1dfa5b0fbbb0d2fb2c29c680 [^]
2010-03-01 14:46adrianromeroNote Added: 0024908
2010-03-02 12:20hgbotCheckin
2010-03-02 12:20hgbotNote Added: 0024935
2010-03-02 12:20hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/28dfbc300ac04f8b1dfa5b0fbbb0d2fb2c29c680 [^] => http://code.openbravo.com/erp/devel/pi/rev/2e60729b9c13b22e0e24941df5a16bd37f0f0828 [^]
2010-03-02 12:48hgbotCheckin
2010-03-02 12:48hgbotNote Added: 0024938
2010-03-02 12:48hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/2e60729b9c13b22e0e24941df5a16bd37f0f0828 [^] => http://code.openbravo.com/erp/devel/pi/rev/27d9578201dac4c2ec42f11b11c3938a2b13329f [^]
2010-03-03 09:19arunkumarNote Added: 0024983
2010-03-03 09:19arunkumarStatusresolved => closed
2010-03-03 09:19arunkumarFixed in Version => 2.50MP13
2010-03-08 16:04jpabloaeFixed in Version2.50MP13 => 2.50MP14
2010-03-08 16:05jpabloaeTarget Version2.50MP13 => 2.50MP14
2010-03-10 17:21anonymoussf_bug_id0 =>
2010-03-10 18:29anonymoussf_bug_id => 2967987
2010-03-12 22:40hudsonbotCheckin
2010-03-12 22:40hudsonbotNote Added: 0025367
2010-03-12 22:40hudsonbotCheckin
2010-03-12 22:40hudsonbotNote Added: 0025370
2010-03-12 22:40hudsonbotCheckin
2010-03-12 22:40hudsonbotNote Added: 0025371
2010-03-16 11:34rafarodaRelationship addedrelated to 0012586
2010-07-28 17:42rafarodaNote Added: 0029649
2010-10-26 12:32networkbRelationship addedrelated to 0015034

Notes
(0023603)
rafaroda   
2010-01-20 11:34   
As explained in the Project Profitability functional documentation [1]:

* Real Cost (RC): Processed time sheet lines where employee hours are multiplied by its salary category cost.

* Real Expenses (RE): Invoiced purchase orders associated to collateral expenses of a project.

So any purchase invoice line, no matter the type of product it has, which is related to a project will display in the real expenses box (for instance, consulting hours that we required to buy to a third company for achieving our project). Real cost box is only displaying hours made by our employees in order to complete the project.

[1] http://wiki.openbravo.com/wiki/Functional_Documentation/Project_and_Service_Management#Project_Profitability [^]
(0023610)
networkb   
2010-01-20 13:04   
In the project profitability report, processing of sales invoices and purchase invoices is not consistent.
For sales invoices:
     -When the product in the sales invoice has a ‘Product Type’ = Service, the corresponding amount is added to the column ‘Services’, tab revenue
     - When the product in the sales invoice has a ‘Product Type’ = Item or Expense type, the line amount is added to the column ‘Expenses’, tab Reinvoicing
That’s right.

However, for purchase invoices, regardless of the product type a line level, the corresponding line amount is added always to the column Expenses, tab expenses. This behaviour is not consistent as it presents misleading margin calculations for services and expenses (although total gross margin at project level is right).
Desired behaviour is:
     - When the product in the purchase invoice has a ‘Product Type’ = Expense type or Item, the line amount is added to the column ‘Expenses’, tab Expenses (as now)
     - However, when the product in the purchase invoice has a ‘Product Type’ = Service, the corresponding amount is added to the column ‘Services’, tab Cost
(0024071)
rafaroda   
2010-02-09 18:44   
A new cell will be added Real Outsourced (RO): Invoiced purchase orders associated to services purchased for achieving the project (outsourced services). In other words, purchase invoice lines which product is of type Service.

Real Expenses (RE): Invoiced purchase orders associated to collateral expenses of a project (taxis, hotels, ...). In other words, purchase invoice lines which product is of a type DISTINCT to Service.

Planned Cost (PC): During a project, employee cost may vary until it reaches a fixed amount. Nevertheless, until all time sheets related to this project have been processed, one can not know how many employee hours have been really spent on it and which was their total cost.

PC cell will be over both RE and RO cell. Ask Pablo Sarobe about the look & feel.

Besides, the functional documentation will have to be updated http://wiki.openbravo.com/wiki/Functional_Documentation/Project_and_Service_Management#Project_Profitability [^]
(0024072)
psarobe   
2010-02-09 19:26   
Hi Rafa,

I think you meant adding a new column Outsource. So adding this new column means that we have to calculate the Real and Planned cells.
1. Real cell: The calculation is clear.
2. Planned cell: For this it could be two solutions:
  2.1 Create two more fields: "Service cost" (employee cost) and "Outsourcing cost". The current "Service cost" would be the "Total cost". This total cost would be the sum of "Service cost" and "Outsourcing cost". With this solution we avoid further problems if exists reports that are using the current "Service cost" as total because we will be using this field (now changed to "Total cost") as total. An we will only have to create a new call-out which calculate the sum of both and the current call-out that calculates the margin don't need to be changed
  2.2 Create one more field: The "Service cost" remains as it is (employee cost) and we create just one field "Outsourcing cost". This this approach we will have to change the current call-out because of the margin and we might find problems if exists reports that use "Service cost" as total

So to me is clear the the 2.1 approach
(0024907)
hgbot   
2010-03-01 14:37   
Repository: erp/devel/pi
Changeset: 28dfbc300ac04f8b1dfa5b0fbbb0d2fb2c29c680
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Mar 01 14:40:39 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/28dfbc300ac04f8b1dfa5b0fbbb0d2fb2c29c680 [^]

Fixes issue 0012014: Error in Project Profitability

---
M src-db/database/model/tables/C_PROJECT.xml
M src-db/database/sourcedata/AD_CALLOUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src-db/database/sourcedata/AD_TEXTINTERFACES.xml
M src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.jrxml
M src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitability_data.xsql
A src/org/openbravo/erpCommon/ad_callouts/SL_Project_Service.java
A src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java
---
(0024908)
adrianromero   
2010-03-01 14:46   
To test the issue fix just follow the "Steps to reproduce" section and you will notice that a new field has been added

Now the Consultant cost has been divided in two costs: Consultant costs and outsourced costs and the sum is the Total consultant cost.

This is reflected in the window Multiphase project and in the report Project profitability, and in the report the outsourced cost no longer go to the "Expenses" cell but to the "Ousourced costs" cell.
(0024935)
hgbot   
2010-03-02 12:20   
Repository: erp/devel/pi
Changeset: 2e60729b9c13b22e0e24941df5a16bd37f0f0828
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Mar 02 12:23:55 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2e60729b9c13b22e0e24941df5a16bd37f0f0828 [^]

Fixes issue 0012014: Error in Project Profitability

---
M src-db/database/model/views/AD_REF_LIST_V.xml
M src-db/database/model/views/AD_TABLE_POST_V.xml
M src-db/database/model/views/C_INVOICE_LINETAX_V.xml
M src-db/database/model/views/C_INVOICE_LINETAX_VT.xml
M src-db/database/model/views/C_ORDER_LINETAX_V.xml
M src-db/database/model/views/C_ORDER_LINETAX_VT.xml
M src-db/database/model/views/M_INOUT_LINE_V.xml
M src-db/database/model/views/M_INOUT_LINE_VT.xml
M src-db/database/sourcedata/AD_FIELD.xml
---
(0024938)
hgbot   
2010-03-02 12:48   
Repository: erp/devel/pi
Changeset: 27d9578201dac4c2ec42f11b11c3938a2b13329f
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Mar 02 12:49:24 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/27d9578201dac4c2ec42f11b11c3938a2b13329f [^]

Fixes issue 0012014: Error in Project Profitability

---
M src-db/database/model/views/AD_REF_LIST_V.xml
M src-db/database/model/views/AD_TABLE_POST_V.xml
M src-db/database/model/views/C_INVOICE_LINETAX_V.xml
M src-db/database/model/views/C_INVOICE_LINETAX_VT.xml
M src-db/database/model/views/C_ORDER_LINETAX_V.xml
M src-db/database/model/views/C_ORDER_LINETAX_VT.xml
M src-db/database/model/views/M_INOUT_LINE_V.xml
M src-db/database/model/views/M_INOUT_LINE_VT.xml
---
(0024983)
arunkumar   
2010-03-03 09:19   
Tested & Working fine
(0025367)
hudsonbot   
2010-03-12 22:40   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/28dfbc300ac0 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0025370)
hudsonbot   
2010-03-12 22:40   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/2e60729b9c13 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0025371)
hudsonbot   
2010-03-12 22:40   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/27d9578201da [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0029649)
rafaroda   
2010-07-28 17:42   
Hi,

Can Planned Outsource and Real Outsource cells be added in the functional documentation? http://wiki.openbravo.com/wiki/Functional_Documentation/Project_and_Service_Management#Project_Profitability [^]

Thanks.