Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045360Retail ModulesWeb POSpublic2020-11-02 18:302020-11-16 06:48
AugustoMauch 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
RR21Q1 
No
0045360: Problem on bom taxes calculation if an adjustment is required
When calculating the line BOM taxes, there will be an error if an adjustment has to be done. This line will be executed [1] and it will fail because the OB.DEC.add function requires two arguments.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-rules.js#L112 [^]
I have not been able to reproduce it in standard retail, but the error is evident enough in line https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-rules.js#L112 [^]
Just replace

bomGroup.amount = OB.DEC.add(bomGroup.amount);

with

bomGroup.amount = OB.DEC.add(adjustment, bomGroup.amount);
No tags attached.
Issue History
2020-11-02 18:30AugustoMauchNew Issue
2020-11-02 18:30AugustoMauchAssigned To => Retail
2020-11-02 18:30AugustoMauchTriggers an Emergency Pack => No
2020-11-09 06:54ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-11-10 04:11hgbotNote Added: 0124249
2020-11-11 05:09ranjith_qualiantech_comStatusnew => scheduled
2020-11-16 06:48hgbotResolutionopen => fixed
2020-11-16 06:48hgbotStatusscheduled => closed
2020-11-16 06:48hgbotFixed in Version => RR21Q1
2020-11-16 06:48hgbotNote Added: 0124379
2020-11-16 06:48hgbotNote Added: 0124380

Notes
(0124249)
hgbot   
2020-11-10 04:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/162 [^]
(0124379)
hgbot   
2020-11-16 06:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 1b50771c2c26a4bcfbbc09bc0a9865c7fab358aa
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-11-16T05:48:26+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/1b50771c2c26a4bcfbbc09bc0a9865c7fab358aa [^]

Fixed ISSUE-45360: Adding missing param in BOM Tax amount calculation

---
M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-rules.js
---
(0124380)
hgbot   
2020-11-16 06:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/162 [^]