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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0025384
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail Widgetsmajoralways2013-12-20 10:182014-01-20 18:32
ReporterjecharriView Statuspublic 
Assigned Tomarvintm 
PriorityurgentResolutionfixedFixed in VersionRMP31
StatusclosedFix in branchFixed in SCM revision0bdb22c4bc63
ProjectionnoneETAnoneTarget VersionRMP31
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toguilleaer
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0025384: Widgets can fail under some circumstances

DescriptionWidgets can fail under some circumstances

If you have orders with Total = 0 and all the lines with grossUnitPrice = 0, retail widgets are going to fail.

The problem is that we are doing the following division:

round((sum(sol.orderedQuantity*sol.grossUnitPrice- tc.cost)/sum(sol.orderedQuantity*sol.grossUnitPrice))*100,2) as grossmarginpercentage
Steps To Reproduce-
Proposed Solutionround((sum(sol.orderedQuantity*sol.grossUnitPrice- tc.cost)/(case when sum(sol.orderedQuantity*sol.grossUnitPrice) = 0 then 1 else sum(sol.orderedQuantity*sol.grossUnitPrice) end))*100,2) as grossmarginpercentage

The best option can be also to use the NetUnitPrice instead of grossUnitPrice because in some cases clients can configure to work with pricing without taxes and that it can be also a problem
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0063433)
hgbot (developer)
2014-01-16 10:09

Repository: erp/pmods/org.openbravo.retail.widgets
Changeset: 0bdb22c4bc63e4066ef36d616451cc7ef1ec25aa
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Jan 16 10:03:43 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.widgets/rev/0bdb22c4bc63e4066ef36d616451cc7ef1ec25aa [^]

Fixed issue 25384: Widgets can fail under some circumstances

---
M src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml
---
(0063546)
guilleaer (manager)
2014-01-20 18:32

Verified

- Issue History
Date Modified Username Field Change
2013-12-20 10:18 jecharri New Issue
2013-12-20 10:18 jecharri Assigned To => marvintm
2013-12-20 10:18 jecharri Resolution time => 1393628400
2013-12-20 10:18 jecharri Triggers an Emergency Pack => No
2014-01-14 08:58 jecharri Proposed Solution updated
2014-01-16 10:09 hgbot Checkin
2014-01-16 10:09 hgbot Note Added: 0063433
2014-01-16 10:09 hgbot Status new => resolved
2014-01-16 10:09 hgbot Resolution open => fixed
2014-01-16 10:09 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.widgets/rev/0bdb22c4bc63e4066ef36d616451cc7ef1ec25aa [^]
2014-01-20 18:32 guilleaer Review Assigned To => guilleaer
2014-01-20 18:32 guilleaer Note Added: 0063546
2014-01-20 18:32 guilleaer Status resolved => closed
2014-01-20 18:32 guilleaer Fixed in Version => RMP31


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker