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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0017208
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 08. Project and service managementmajoralways2011-05-17 16:532011-06-07 17:50
ReporterxabiermerinoView Statuspublic 
Assigned Todalsasua 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branch2.50Fixed in SCM revisionf8c459bb273e
ProjectionnoneETAnoneTarget Version2.50MP31
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP29SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0017208: It is not possible save a Project Line with Planned Price = 0

DescriptionIt is not possible save a Project Line with Planned Price = 0. This error appears:

ERROR: division by zero

In several cases products with price 0 are used.
Steps To Reproduce- As Openbravo Admin go to Project & Service Management || Transactions || Service Project || Service Project >> Project Line
- Create a line with Planned Price = 0
- Save
Proposed SolutionIn Trigger C_projectline_trg3: v_oldLine_PlannedMarginAmt:=COALESCE((COALESCE(old.PLANNEDPRICE,0)-COALESCE(old.PLANNEDPOPRICE,0))*100/COALESCE(old.PLANNEDPRICE,1),0);
-->
"IF (COALESCE(old.PLANNEDPRICE,0) <> 0) THEN
v_oldLine_PlannedMarginAmt:=COALESCE((COALESCE(old.PLANNEDPRICE,0)-COALESCE(old.PLANNEDPOPRICE,0))*100/old.PLANNEDPRICE,0);
END IF;"



v_newLine_PlannedMarginAmt:=COALESCE((COALESCE(new.PLANNEDPRICE,0)-COALESCE(new.PLANNEDPOPRICE,0))*100/COALESCE(new.PLANNEDPRICE,1),0);
-->
IF (COALESCE(new.PLANNEDPRICE,0) <> 0) THEN
v_newLine_PlannedMarginAmt:=COALESCE((COALESCE(new.PLANNEDPRICE,0)-COALESCE(new.PLANNEDPOPRICE,0))*100/new.PLANNEDPRICE,0);
END IF;

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 00172073.0MP0 closedadrianromero It is not possible save a Project Line with Planned Price = 0 

-  Notes
(0037725)
hgbot (developer)
2011-05-30 13:21

Repository: erp/stable/2.50
Changeset: f8c459bb273e9aee287ee801ed26b6c189ae6953
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri May 27 14:26:29 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/f8c459bb273e9aee287ee801ed26b6c189ae6953 [^]

Fixes issue 0017208: It is not possible save a Project Line with Planned Price = 0
It has been modified the related triggers in order to verify that if planned price is zero, calculate properly related values

---
M src-db/database/model/triggers/C_PROJECTLINE_TRG.xml
M src-db/database/model/triggers/C_PROJECTLINE_TRG3.xml
---
(0037731)
adrianromero (manager)
2011-05-30 13:33

* Testing the issue

Follow carefully the steps to test and verify that the project line can be saved when planned price is 0 too.

Because it has been modified triggers in the project lines table, it must be verfied also that records can be inserted, updated and deleted. Also all actions must be tested in both database engines: postgresql and oracle.

* Other areas affected.

No other areas affected. Only the triggers of project lines has been modified.
(0038155)
xabiermerino (developer)
2011-06-07 17:50

verified

- Issue History
Date Modified Username Field Change
2011-05-17 16:53 xabiermerino Type defect => backport
2011-05-17 16:53 xabiermerino fix_in_branch => 2.50
2011-05-17 16:54 xabiermerino version 3.0RC6.1 => 2.50MP29
2011-05-17 16:54 xabiermerino Target Version 3.0MP0 => 2.50MP31
2011-05-17 17:46 xabiermerino Issue Monitored: networkb
2011-05-30 13:21 hgbot Checkin
2011-05-30 13:21 hgbot Note Added: 0037725
2011-05-30 13:21 hgbot Status scheduled => resolved
2011-05-30 13:21 hgbot Resolution open => fixed
2011-05-30 13:21 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/f8c459bb273e9aee287ee801ed26b6c189ae6953 [^]
2011-05-30 13:33 adrianromero Note Added: 0037731
2011-06-03 10:57 dalsasua Assigned To adrianromero => dalsasua
2011-06-07 17:50 xabiermerino Note Added: 0038155
2011-06-07 17:50 xabiermerino Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker