Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046011Retail ModulesWeb POSpublic2021-03-05 11:482021-03-11 08:33
jorge-garcia 
jorge-garcia 
normalmajorhave not tried
closedfixed 
5
 
RR21Q2 
No
0046011: Calculate line grossUnitAmount and netUnitAmount without discounts applied to the whole ticket
A new requirement for POS 2 has been defined.

It should be possible to calculate the grossUnitAmount and netUnitAmount excluding the discounted amount of promotions that are calculated at ticket level (i.e. by total discounts).

The calculation should be included in some new variables that are available at ticketline level.
-
Business model should be improved to be able to declare if a promotion is manually added or is a promotion applied to the whole ticket. This will require to change several modules from old POS.

The calculation of the amounts should happen always.
No tags attached.
Issue History
2021-03-05 11:48jorge-garciaNew Issue
2021-03-05 11:48jorge-garciaAssigned To => jorge-garcia
2021-03-05 11:48jorge-garciaTriggers an Emergency Pack => No
2021-03-05 11:53hgbotNote Added: 0126522
2021-03-05 11:53jorge-garciaStatusnew => scheduled
2021-03-05 12:00hgbotNote Added: 0126523
2021-03-05 12:03hgbotNote Added: 0126524
2021-03-11 08:32hgbotNote Added: 0126613
2021-03-11 08:32hgbotResolutionopen => fixed
2021-03-11 08:32hgbotStatusscheduled => closed
2021-03-11 08:33hgbotFixed in Version => RR21Q2
2021-03-11 08:33hgbotNote Added: 0126614
2021-03-11 08:33hgbotNote Added: 0126615
2021-03-11 08:33hgbotNote Added: 0126616
2021-03-11 08:33hgbotNote Added: 0126617
2021-03-11 08:33hgbotNote Added: 0126618
2021-03-11 08:33hgbotNote Added: 0126619

Notes
(0126522)
hgbot   
2021-03-05 11:53   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/339 [^]
(0126523)
hgbot   
2021-03-05 12:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/18 [^]
(0126524)
hgbot   
2021-03-05 12:03   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal/-/merge_requests/7 [^]
(0126613)
hgbot   
2021-03-11 08:32   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/339 [^]
(0126614)
hgbot   
2021-03-11 08:33   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 9352e83fc7d2110ae5abcf42b12ad07490051b5d
Author: Jorge Garcia <jorge.garcia@openbravo.com>
Date: 2021-03-08T09:23:55+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/9352e83fc7d2110ae5abcf42b12ad07490051b5d [^]

Fixed ISSUE-46011: Include calculation of prices and amount excluding
ticket discounts

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/TicketUtils.js
---
(0126615)
hgbot   
2021-03-11 08:33   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: efd828559f2ae45f20885b147702eea2d3c71115
Author: Jorge Garcia <jorge.garcia@openbravo.com>
Date: 2021-03-08T09:23:55+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/efd828559f2ae45f20885b147702eea2d3c71115 [^]

Related to ISSUE-46011: Fix jest test

---
M web-test/model/business-object/ticket/CalculateTotalsModelHook.test.js
---
(0126616)
hgbot   
2021-03-11 08:33   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: a45e4e0d00c2eda615bf83262576c714bb1ec058
Author: Jorge Garcia <jorge.garcia@openbravo.com>
Date: 2021-03-05T11:57:56+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/a45e4e0d00c2eda615bf83262576c714bb1ec058 [^]

Related to ISSUE-46011: Add possibility to define a promotion como manual or ticket discount

Created two API to get discount type ids that are manual and another API to get discount type
ids that are applied to the whole ticket

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-rules.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/manual-amount-promotions-discount.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/manual-linefinalprice-promotions-discount.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/manual-percentage-promotions-discount.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/interface/discount-posinterface.js
---
(0126617)
hgbot   
2021-03-11 08:33   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/18 [^]
(0126618)
hgbot   
2021-03-11 08:33   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal [^]
Changeset: e83f9f1ab74560c1a03dd644138629f2c2206c44
Author: Jorge Garcia <jorge.garcia@openbravo.com>
Date: 2021-03-05T12:02:26+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal/-/commit/e83f9f1ab74560c1a03dd644138629f2c2206c44 [^]

Related to ISSUE-46011: Change definition of by total promotions

Now, all by total promotions are marked to be applied to the whole ticket.

Manual by total promotions are also marked as manual promotions.

---
M web/org.openbravo.retail.discounts.bytotal/app/model/business-logic/discounts-engine/engine/rules/by-total-amount-discount.js
M web/org.openbravo.retail.discounts.bytotal/app/model/business-logic/discounts-engine/engine/rules/by-total-free-item-discount.js
M web/org.openbravo.retail.discounts.bytotal/app/model/business-logic/discounts-engine/engine/rules/by-total-percentage-discount.js
M web/org.openbravo.retail.discounts.bytotal/app/model/business-logic/discounts-engine/engine/rules/manual-by-total-amount-discount.js
M web/org.openbravo.retail.discounts.bytotal/app/model/business-logic/discounts-engine/engine/rules/manual-by-total-percentage-discount.js
---
(0126619)
hgbot   
2021-03-11 08:33   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal/-/merge_requests/7 [^]