Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0025384 | Retail Modules | Retail Widgets | public | 2013-12-20 10:18 | 2014-01-20 18:32 |
|
Reporter | jecharri | |
Assigned To | marvintm | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | RMP31 | Fixed in Version | RMP31 | |
Merge Request Status | |
Review Assigned To | guilleaer |
OBNetwork customer | OBPS |
Support ticket | 25353 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0025384: Widgets can fail under some circumstances |
Description | Widgets 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 Solution | round((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
|
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
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 | OBNetwork customer | => Yes |
2013-12-20 10:18 | jecharri | Support ticket | => 25353 |
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 |