Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015631Openbravo ERP08. Project and service managementpublic2011-01-12 12:362011-01-28 11:21
psarobe 
adrianromero 
immediatemajoralways
closedfixed 
5
2.50MP23 
2.50MP262.50MP26 
Core
No
0015631: Project profitability report is not working under some circumstances
Project profitability report is not working under some circumstances

Steps to reproduce further error on this issue:

Create a new Project (either Service or Multiphase)

Set values for:

o Value, Name

o Bus. Partner

o Sales Represetative

o Planned Service Revenue

o Planned Expenses

o Services Provided Cost

o Outsourced Cost

o Planned Reinvoiced Expenses
xecute Project Profitability Report -> Fails: Error: There is no Conversion Rate defined for Day to Hour.

If you enter a Time Sheet for this project, then the report will work.
Regression
related to defect 0010690 closed adrianromero Expense Report and Project Profitability Reports display hours even if time sheet lines are in days 
related to backport 0015809 closed mirurita Project profitability report does not detect whether there are conversion to hours or not 
blocks defect 00156302.50MP26 closed adrianromero Project profitability report is not working under some circumstances 
png image.PNG (25,470) 2011-01-27 14:04
https://issues.openbravo.com/file_download.php?file_id=3551&type=bug
png

png image2.PNG (35,721) 2011-01-27 14:05
https://issues.openbravo.com/file_download.php?file_id=3552&type=bug
png
Issue History
2011-01-12 12:37psarobeTypedefect => backport
2011-01-12 12:37psarobefix_in_branch => 2.50
2011-01-13 18:24hgbotCheckin
2011-01-13 18:24hgbotNote Added: 0033629
2011-01-13 18:24hgbotStatusscheduled => resolved
2011-01-13 18:24hgbotResolutionopen => fixed
2011-01-13 18:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/b4fbdd3b66a423259dc80ab8cfb07a72276cef2a [^]
2011-01-13 18:30adrianromeroNote Added: 0033631
2011-01-13 18:31adrianromeroRelationship addedrelated to 0010690
2011-01-17 12:31psarobeNote Added: 0033680
2011-01-17 12:31psarobeStatusresolved => new
2011-01-17 12:31psarobeResolutionfixed => open
2011-01-17 14:22hgbotCheckin
2011-01-17 14:22hgbotNote Added: 0033685
2011-01-17 14:22hgbotStatusnew => resolved
2011-01-17 14:22hgbotResolutionopen => fixed
2011-01-17 14:22hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.50/rev/b4fbdd3b66a423259dc80ab8cfb07a72276cef2a [^] => http://code.openbravo.com/erp/stable/2.50/rev/62416180650ef4562c0f2beb5cb2410f6c74ab80 [^]
2011-01-17 14:25adrianromeroNote Added: 0033687
2011-01-17 15:51hgbotCheckin
2011-01-17 15:51hgbotNote Added: 0033691
2011-01-17 15:51hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.50/rev/62416180650ef4562c0f2beb5cb2410f6c74ab80 [^] => http://code.openbravo.com/erp/stable/2.50/rev/60e0a23acc18b6aa6e294735fd70a68fa9404014 [^]
2011-01-26 17:20adrianromeroTag Attached: Regression
2011-01-26 17:21adrianromeroversion2.50MP24 => 2.50MP23
2011-01-27 13:05psarobeNote Added: 0033911
2011-01-27 13:05psarobeStatusresolved => new
2011-01-27 13:05psarobeResolutionfixed => open
2011-01-27 14:04psarobeNote Added: 0033918
2011-01-27 14:04psarobeFile Added: image.PNG
2011-01-27 14:05psarobeFile Added: image2.PNG
2011-01-27 14:05psarobeStatusnew => scheduled
2011-01-27 14:05psarobefix_in_branch2.50 => pi
2011-01-28 10:13hgbotCheckin
2011-01-28 10:13hgbotNote Added: 0033946
2011-01-28 10:13hgbotStatusscheduled => resolved
2011-01-28 10:13hgbotResolutionopen => fixed
2011-01-28 10:13hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.50/rev/60e0a23acc18b6aa6e294735fd70a68fa9404014 [^] => http://code.openbravo.com/erp/stable/2.50/rev/8993462177de08d0de83111d27eadc221b373276 [^]
2011-01-28 11:21psarobeNote Added: 0033948
2011-01-28 11:21psarobeStatusresolved => closed
2011-01-28 11:21psarobeFixed in Version => 2.50MP26
2011-01-28 11:32adrianromeroRelationship addedrelated to 0015809

Notes
(0033629)
hgbot   
2011-01-13 18:24   
Repository: erp/stable/2.50
Changeset: b4fbdd3b66a423259dc80ab8cfb07a72276cef2a
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jan 13 18:23:22 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/b4fbdd3b66a423259dc80ab8cfb07a72276cef2a [^]

Fixes issue 0015631: Project profitability report is not working under some circumstances
It has been modified the Profitability report and Expenses report to not to raise the conversion rate error when it is not needed.

---
M src/org/openbravo/erpCommon/ad_reports/ReportExpense.java
M src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java
---
(0033631)
adrianromero   
2011-01-13 18:30   
* Testing the issue

Verify that now projects with no time sheets can execute the Profitability project and also the Expenses project.

Verify also that the related issue 10690 works as expected. days are properly converted to hours in both reports.

* Other areas affected

Only has been modified the Expenses report and Project Profitability report.
(0033680)
psarobe   
2011-01-17 12:31   
It is still failing in this scenario:

If you add hours against a product which UOM is hours then it is not working. The error is the same: There is no conversion rate between hours and days. It makes no sense since everything is in hours
(0033685)
hgbot   
2011-01-17 14:22   
Repository: erp/stable/2.50
Changeset: 62416180650ef4562c0f2beb5cb2410f6c74ab80
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jan 17 14:21:09 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/62416180650ef4562c0f2beb5cb2410f6c74ab80 [^]

Fixes issue 0015631: Project profitability report is not working under some circumstances
It has been added the case of expenses reported in hours

---
M src/org/openbravo/erpCommon/ad_reports/ReportExpense.java
M src/org/openbravo/erpCommon/ad_reports/ReportExpense_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java
---
(0033687)
adrianromero   
2011-01-17 14:25   
* Testing the issue

It has to be included the case of testing the scenario described in the note c33680
(0033691)
hgbot   
2011-01-17 15:51   
Repository: erp/stable/2.50
Changeset: 60e0a23acc18b6aa6e294735fd70a68fa9404014
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jan 17 15:51:31 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/60e0a23acc18b6aa6e294735fd70a68fa9404014 [^]

Fixes issue 0015631: Project profitability report is not working under some circumstances
Fixed
Fixing sql sentence

---
M src/org/openbravo/erpCommon/ad_reports/ReportExpense_data.xsql
---
(0033911)
psarobe   
2011-01-27 13:05   
The fix is not correct under this scenario:

1. I create a product H in hours
2. I create a product D in days
3. I have a conversion from hours to Days and from Days to Hours (1 day-->8 hours)
4. I create a salary cost (this is always in hours). 1 hour= 60€
5. I create a expense sheet where:
  5.1 Product H (hours) with quantity = 100
  5.2 Product D (Days) with quantity = 3 (3x8)= 24 hours
6. When you execute the profitability report it gives you this result:
  6.1 Product H 100x0.125x60=750 ->> This is wrong. It is multiplying by 0.125 which is the conversion between Hours to day and since the product is in hours it shouldn't do anything. The correct thing would be 100x60=6000
  6.2 Product D 3x8x60= 1440
(0033918)
psarobe   
2011-01-27 14:04   
More things in this issue:

If I execute the project profitability report instead of summarize both lines it splits them. See image.png and image2.png
(0033946)
hgbot   
2011-01-28 10:13   
Repository: erp/stable/2.50
Changeset: 8993462177de08d0de83111d27eadc221b373276
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Jan 28 10:11:23 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/8993462177de08d0de83111d27eadc221b373276 [^]

Fixes issue 0015631: Project profitability report is not working under some circumstances
It has been modified properly the UOM to convert to take always hours and has been restored the gropping on the Profitability report SQL sentence to remove the UOM. This sentence must be grouping only by project

---
M src/org/openbravo/erpCommon/ad_reports/ReportExpense_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java
M src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitability_data.xsql
---
(0033948)
psarobe   
2011-01-28 11:21   
Works fine