Openbravo Issue Tracking System - POS2
View Issue Details
0051436POS2POSpublic2023-01-23 10:582023-10-24 17:21
jorgewederago 
jorgewederago 
highmajorN/A
closedfixed 
5
 
 
No
0051436: It is needed to have an API that allows the implementation of External Discounts
It is needed to have an API that allows the implementation of External Discounts. This API should work over Client Events infrastructure.
N/A
No tags attached.
blocks defect 0052567 closed jorgewederago Retail Modules API Change: Adding missing constraint to skipApplyPromotios flag 
Issue History
2023-01-23 10:58jorgewederagoNew Issue
2023-01-23 10:58jorgewederagoAssigned To => Retail
2023-01-23 10:58jorgewederagoTriggers an Emergency Pack => No
2023-01-23 10:58jorgewederagoAssigned ToRetail => jorgewederago
2023-01-23 10:58jorgewederagoStatusnew => scheduled
2023-02-22 10:36hgbotNote Added: 0146860
2023-02-24 13:28hgbotNote Added: 0146983
2023-03-08 14:17hgbotNote Added: 0147385
2023-03-08 14:24hgbotNote Added: 0147386
2023-05-16 09:40hgbotNote Added: 0149773
2023-05-16 09:47hgbotNote Added: 0149774
2023-05-16 10:32hgbotNote Added: 0149786
2023-05-25 09:44hgbotNote Added: 0150263
2023-05-25 15:27hgbotNote Added: 0150297
2023-05-25 15:29jorgewederagoRelationship addedblocks 0052567
2023-08-16 10:26hgbotResolutionopen => fixed
2023-08-16 10:26hgbotStatusscheduled => closed
2023-08-16 10:26hgbotNote Added: 0153495
2023-08-16 10:26hgbotNote Added: 0153496
2023-08-16 10:26hgbotNote Added: 0153497
2023-08-16 10:26hgbotNote Added: 0153498
2023-08-16 10:26hgbotNote Added: 0153499
2023-08-16 10:26hgbotNote Added: 0153500
2023-08-16 10:26hgbotNote Added: 0153501
2023-08-16 10:26hgbotNote Added: 0153502
2023-08-16 10:26hgbotNote Added: 0153503
2023-08-16 10:26hgbotNote Added: 0153504
2023-08-16 10:26hgbotNote Added: 0153505
2023-08-16 10:27hgbotNote Added: 0153506
2023-08-16 10:27hgbotNote Added: 0153507
2023-08-16 10:27hgbotNote Added: 0153508
2023-08-16 10:27hgbotNote Added: 0153509
2023-08-16 10:27hgbotNote Added: 0153510
2023-08-16 10:27hgbotNote Added: 0153511
2023-08-16 10:27hgbotNote Added: 0153512
2023-08-16 10:27hgbotNote Added: 0153513
2023-09-04 11:49hgbotNote Added: 0154397
2023-10-24 10:50hgbotNote Added: 0156224
2023-10-24 17:21hgbotNote Added: 0156241
2023-10-24 17:21hgbotNote Added: 0156242

Notes
(0146860)
hgbot   
2023-02-22 10:36   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1541 [^]
(0146983)
hgbot   
2023-02-24 13:28   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/88 [^]
(0147385)
hgbot   
2023-03-08 14:17   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1089 [^]
(0147386)
hgbot   
2023-03-08 14:24   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts/-/merge_requests/2 [^]
(0149773)
hgbot   
2023-05-16 09:40   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata/-/merge_requests/53 [^]
(0149774)
hgbot   
2023-05-16 09:47   
Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata/-/merge_requests/48 [^]
(0149786)
hgbot   
2023-05-16 10:32   
Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata/-/merge_requests/75 [^]
(0150263)
hgbot   
2023-05-25 09:44   
Merge Request created: https://gitlab.com/openbravo/ci/mobile-api/-/merge_requests/18 [^]
(0150297)
hgbot   
2023-05-25 15:27   
Merge request closed: https://gitlab.com/openbravo/ci/mobile-api/-/merge_requests/18 [^]
(0153495)
hgbot   
2023-08-16 10:26   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts [^]
Changeset: 1d3c2eb2cae72318bb03d6c80b3add13a9934d05
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 16-08-2023 10:19:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts/-/commit/1d3c2eb2cae72318bb03d6c80b3add13a9934d05 [^]

Fixed ISSUE-51436: It is needed to have an API that allows the implementation of External Discounts

---
---
(0153496)
hgbot   
2023-08-16 10:26   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts/-/merge_requests/2 [^]
(0153497)
hgbot   
2023-08-16 10:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 6a62d7d1d8a8bc498fac37cafe50cc6d6e794051
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 16-08-2023 09:45:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/6a62d7d1d8a8bc498fac37cafe50cc6d6e794051 [^]

Related to ISSUE-51436: It is needed to have an API that allows the implementation of External Discounts
Discount actions extensions

---
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/SetByTotalPromotionIntoLine.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/SetFeaturedDiscountsIntoTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/SetLineDiscounts.js
---
(0153498)
hgbot   
2023-08-16 10:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 23078d14695cfe31df5b130bd54dec9af321d7e7
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 16-08-2023 09:45:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/23078d14695cfe31df5b130bd54dec9af321d7e7 [^]

Related to ISSUE-51436: It is needed to have an API that allows the implementation of External Discounts
Adding filter to do not show externalDiscounts when applied

---
M web-jspack/org.openbravo.pos2/src/components/Discounts/shared/OptionalDiscountsUtils.js
---
(0153499)
hgbot   
2023-08-16 10:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 70cda2a688428df3f630f0c6da44db70ebae6154
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 16-08-2023 09:45:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/70cda2a688428df3f630f0c6da44db70ebae6154 [^]

Related to ISSUE-51436: It is needed to have an API that allows the implementation of External Discounts
*Simplifiy logic when showing applied discounts
*Update executability rule for line discounts
*Restore setByTotalPromotionIntoLine since we are no longer using external byTotal
*Update tests related to skipApplyPromotions

---
M web-jspack/org.openbravo.pos2/src/components/Discounts/shared/OptionalDiscountsUtils.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/user-actions/__test__/skipApplyPromotionsRule.test.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/user-actions/skipApplyPromotions.js
---
(0153500)
hgbot   
2023-08-16 10:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 18f8020de4cd8197513755d150d8adaa624cc18d
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 16-08-2023 09:45:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/18f8020de4cd8197513755d150d8adaa624cc18d [^]

Related to ISSUE-51436: It is needed to have an API that allows the implementation of External Discounts
*Reverting changes in discount state actions
*Move setLineDiscount state action to utils class
*Fix on featuredDiscounts flow to ensure all flows use the same user action
*Adding logic to identify which flow calls to DiscountOnExitDialog

---
M web-jspack/org.openbravo.pos2/src/components/Discounts/FeaturedDiscount/FeaturedDiscountsPaymentFlowHook.js
M web-jspack/org.openbravo.pos2/src/components/Discounts/ManualDiscount/DiscountOnExitDialog/DiscountOnExitDialog.js
M web-jspack/org.openbravo.pos2/src/model/ticket/TicketExtension.js
M web-jspack/org.openbravo.pos2/src/model/ticket/TicketUtils.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/SetLineDiscounts.js
M web-jspack/org.openbravo.pos2/src/ob-init.js
---
(0153501)
hgbot   
2023-08-16 10:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: a7f38c592565634983d739f80f006a77cc8fad9f
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 16-08-2023 10:22:26
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/a7f38c592565634983d739f80f006a77cc8fad9f [^]

Related to ISSUE-51436: It is needed to have an API that allows the implementation of External Discounts

---
M web-jspack/org.openbravo.pos2/src/components/Discounts/FeaturedDiscount/FeaturedDiscountsPaymentFlowHook.js
M web-jspack/org.openbravo.pos2/src/components/Discounts/ManualDiscount/DiscountOnExitDialog/DiscountOnExitDialog.js
M web-jspack/org.openbravo.pos2/src/components/Discounts/shared/OptionalDiscountsUtils.js
M web-jspack/org.openbravo.pos2/src/model/ticket/TicketExtension.js
M web-jspack/org.openbravo.pos2/src/model/ticket/TicketUtils.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/SetByTotalPromotionIntoLine.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/SetFeaturedDiscountsIntoTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/SetLineDiscounts.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/user-actions/__test__/skipApplyPromotionsRule.test.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/user-actions/skipApplyPromotions.js
M web-jspack/org.openbravo.pos2/src/ob-init.js
---
(0153502)
hgbot   
2023-08-16 10:26   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1541 [^]
(0153503)
hgbot   
2023-08-16 10:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 43c2379e426e343e7db5aa189406a15f03b371f8
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 14-08-2023 08:56:39
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/43c2379e426e343e7db5aa189406a15f03b371f8 [^]

Related to FR-51436: Add new column to define if products can use external discounts
Allow callback parameter when using addManualPromotion API

---
M src-db/database/model/modifiedTables/M_PRODUCT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/retail/posterminal/master/ProductProperty.java
M web/org.openbravo.retail.posterminal/js/model/product.js
---
(0153504)
hgbot   
2023-08-16 10:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 1af8453fe500ee0fbc12d6583f7b93b8ca32bd72
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 16-08-2023 10:23:55
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/1af8453fe500ee0fbc12d6583f7b93b8ca32bd72 [^]

Related to ISSUE-51436: It is needed to have an API that allows the implementation of External Discounts

---
A src-db/database/model/modifiedTables/M_PRODUCTPRICE_EXC.xml
M src-db/database/model/modifiedTables/M_PRODUCT.xml
M src-db/database/model/modifiedTables/M_PRODUCTPRICE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_FIELDGROUP.xml
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
M web/org.openbravo.retail.posterminal/js/model/product.js
---
(0153505)
hgbot   
2023-08-16 10:26   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1089 [^]
(0153506)
hgbot   
2023-08-16 10:27   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata [^]
Changeset: 8e95e342ac0909727a2ffb553c0eea9102ecd5c7
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 14-08-2023 08:44:30
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata/-/commit/8e95e342ac0909727a2ffb553c0eea9102ecd5c7 [^]

Related to FR-51436: Update sample data

---
M referencedata/sampledata/The_White_Valley_Group/AD_ORG.xml
M referencedata/sampledata/The_White_Valley_Group/M_PRODUCTPRICE.xml
M referencedata/sampledata/The_White_Valley_Group/M_PRODUCTPRICE_EXC.xml
---
(0153507)
hgbot   
2023-08-16 10:27   
Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.test.mobile.sampledata/-/merge_requests/75 [^]
(0153508)
hgbot   
2023-08-16 10:27   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata [^]
Changeset: de68de262d7e6847abe9cbdcce072ff1cd90bb2b
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 14-08-2023 08:42:23
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata/-/commit/de68de262d7e6847abe9cbdcce072ff1cd90bb2b [^]

Related to FR-51436: Update sample data

---
M referencedata/sampledata/Retail_Test/AD_ORG.xml
M referencedata/sampledata/Retail_Test/M_PRODUCTPRICE.xml
---
(0153509)
hgbot   
2023-08-16 10:27   
Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.testsampledata/-/merge_requests/48 [^]
(0153510)
hgbot   
2023-08-16 10:27   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata [^]
Changeset: c67056e0e3af9582c760189088c0baff090a76d4
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 10-08-2023 08:54:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata/-/commit/c67056e0e3af9582c760189088c0baff090a76d4 [^]

Related to FR-51436: Adjust sampledata for dbconsistency

---
M referencedata/sampledata/The_White_Valley_Group/M_PRODUCTPRICE.xml
---
(0153511)
hgbot   
2023-08-16 10:27   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sampledata/-/merge_requests/53 [^]
(0153512)
hgbot   
2023-08-16 10:27   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 7e4c6262de0939741faa6f70c31e339c24d53359
Author: Jorge Wederago <jorge.wederago@openbravo.com>
Date: 09-08-2023 09:29:16
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/7e4c6262de0939741faa6f70c31e339c24d53359 [^]

Related to FR-51436: It should be possible to cancel preApplyDiscountsHook execution

---
M web/org.openbravo.retail.discounts/js/preApplyDiscountsHook.js
---
(0153513)
hgbot   
2023-08-16 10:27   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/88 [^]
(0154397)
hgbot   
2023-09-04 11:49   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts [^]
Changeset: f2764e76d46e6f7702000b41e69c0a162435057e
Author: Radhakrishnan Seeman <radhakrishnan@qualiantech.com>
Date: 04-09-2023 09:49:48
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts/-/commit/f2764e76d46e6f7702000b41e69c0a162435057e [^]

Related to ISSUE-51436: Add discountsFromUsers to request and response and support by total discounts

---
A web-jspack/org.openbravo.events.discounts/src/authentication/__test__/loginInitActions.test.js
A web-jspack/org.openbravo.events.discounts/src/authentication/loginInitActions.js
A web/org.openbravo.events.discounts/js/hooks/discountCacheInitializationHook.js
M src/org/openbravo/events/discounts/CDISCComponentProvider.java
M web-jspack/org.openbravo.events.discounts/src/model/ticket/actions/CalculateExternalDiscounts.js
M web-jspack/org.openbravo.events.discounts/src/ob-init.js
M web-jspack/org.openbravo.events.discounts/src/register/state-actions.js
M web-jspack/org.openbravo.events.discounts/src/register/user-actions.js
M web-test/model/simulator/DiscountsEngineSimulator.test.js
M web-test/model/ticket/TicketUtils.test.js
M web/org.openbravo.events.discounts/app/model/business-object/simulator/DiscountsEngineSimulator.js
M web/org.openbravo.events.discounts/app/model/business-object/ticket/TicketUtils.js
M web/org.openbravo.events.discounts/js/hooks/pre-apply-discount.js
M web/org.openbravo.events.discounts/js/utils/cdiscUtils.js
---
(0156224)
hgbot   
2023-10-24 10:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts/-/merge_requests/5 [^]
(0156241)
hgbot   
2023-10-24 17:21   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts [^]
Changeset: be9f8aba3caa02a5d9c32732ffe8f7d74d737370
Author: Radhakrishnan Seeman <radhakrishnan@qualiantech.com>
Date: 24-10-2023 11:11:35
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts/-/commit/be9f8aba3caa02a5d9c32732ffe8f7d74d737370 [^]

Related to ISSUE-51436: Added bytotalManualPromotions into error response

---
M web/org.openbravo.events.discounts/app/model/business-object/ticket/TicketUtils.js
---
(0156242)
hgbot   
2023-10-24 17:21   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.events.discounts/-/merge_requests/5 [^]