Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044339Retail ModulesWeb POSpublic2020-06-10 18:172020-06-15 08:30
aferraz 
aferraz 
normalminorhave not tried
closedfixed 
5
 
RR20Q3 
marvintm
No
0044339: Use same API in Discount and Tax engine output - Discount engine changes
Use same Ticket API in Discount and Tax engine output
*
Current Discount engine output is as follows:
{
  "lines": {
    "BBC8BD559F1F6830AF7998A180F8D9DA": {
      "discounts": {
        "grossUnitAmount": 261.81,
        "grossUnitPrice": 261.81,
        "promotions": [
          {
            "ruleId": "C26B841C84B14FE2AB1A334DD3672E87",
            "discountType": "697A7AB9FD9C4EE0A3E891D3D3CCA0A7",
            "name": "GPS_10_per",
            "applyNext": true,
            "amt": 29.09,
            "qtyOffer": 1
          }
        ]
      }
    }
  }
}

Change it so it is similar to Tax engine output and Ticket API:
{
  "lines": [
    {
      "id": "0A19E6B3EC1422CDD0139E5BD0AB2FC1",
      "grossUnitAmount": 261.81,
      "grossUnitPrice": 261.81,
      "discounts": [
        {
          "ruleId": "C26B841C84B14FE2AB1A334DD3672E87",
          "discountType": "697A7AB9FD9C4EE0A3E891D3D3CCA0A7",
          "name": "GPS_10_per",
          "applyNext": true,
          "amt": 29.09,
          "qtyOffer": 1
        }
      ]
    }
  ]
}

Add also discountengine namespace when running the engine from graal/node/webservice:
{
  "ticket": {
    "discountengine": {
      "lines": [
        {
          "id": "0A19E6B3EC1422CDD0139E5BD0AB2FC1",
          "grossUnitAmount": 261.81,
          "grossUnitPrice": 261.81,
          "discounts": [...]
        }
      ]
    }
  }
}
No tags attached.
related to defect 0044181RR20Q3 closed aferraz Use same Ticket API in Discount and Tax engine - Discount engine changes 
related to defect 0044340 closed aferraz Use same API in Discount and Tax engine output - Tax engine changes 
Issue History
2020-06-10 18:17aferrazNew Issue
2020-06-10 18:17aferrazAssigned To => aferraz
2020-06-10 18:17aferrazTriggers an Emergency Pack => No
2020-06-10 18:17aferrazIssue generated from0044181
2020-06-10 18:17aferrazRelationship addedrelated to 0044181
2020-06-10 18:21aferrazIssue cloned0044340
2020-06-10 18:22aferrazRelationship addedrelated to 0044340
2020-06-12 08:42hgbotCheckin
2020-06-12 08:42hgbotNote Added: 0120808
2020-06-12 08:49aferrazProposed Solution updated
2020-06-12 08:52hgbotCheckin
2020-06-12 08:52hgbotNote Added: 0120811
2020-06-12 08:53hgbotCheckin
2020-06-12 08:53hgbotNote Added: 0120812
2020-06-12 09:08hgbotCheckin
2020-06-12 09:08hgbotNote Added: 0120817
2020-06-12 09:29aferrazProposed Solution updated
2020-06-12 09:45hgbotCheckin
2020-06-12 09:45hgbotNote Added: 0120819
2020-06-12 09:52aferrazStatusnew => scheduled
2020-06-12 09:52aferrazStatusscheduled => resolved
2020-06-12 09:52aferrazFixed in Version => RR20Q3
2020-06-12 09:52aferrazResolutionopen => fixed
2020-06-15 08:30marvintmReview Assigned To => marvintm
2020-06-15 08:30marvintmStatusresolved => closed

Notes
(0120808)
hgbot   
2020-06-12 08:42   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e434f603e2c651dd45780d94053f4d4518f63646
Author: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jun 10 18:25:58 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e434f603e2c651dd45780d94053f4d4518f63646 [^]

Related to ISSUE-44339: Change discount engine result structure

---
M web/org.openbravo.retail.posterminal/js/discountsengine/pos/pos-discounts.js
---
(0120811)
hgbot   
2020-06-12 08:52   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: f19b0652d434bc1ab799c4c1e26751d7afdc9583
Author: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jun 10 18:26:07 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/f19b0652d434bc1ab799c4c1e26751d7afdc9583 [^]

Related to ISSUE-44339: Change discount engine result structure

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-engine.js
---
(0120812)
hgbot   
2020-06-12 08:53   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: a9ef88a1789bfab80b7cd52bb9b69294476e7b65
Author: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Jun 12 08:52:36 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/a9ef88a1789bfab80b7cd52bb9b69294476e7b65 [^]

Related to ISSUE-44339: Change discount engine result structure

---
M src-test/org/openbravo/retail/discounts/test/base/DiscountResult.java
---
(0120817)
hgbot   
2020-06-12 09:08   
Repository: erp/pmods/org.openbravo.discounts
Changeset: b15ae4fcc1e2cc5c71ed32beac5bbe1f6de7abf1
Author: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Jun 12 08:55:38 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.discounts/rev/b15ae4fcc1e2cc5c71ed32beac5bbe1f6de7abf1 [^]

Related to ISSUE-44339: Add discountengine namespace

---
M src-test/org/openbravo/discounts/test/base/executor/DiscountsCalculator.java
M src-test/org/openbravo/discounts/test/base/executor/NodeDiscountsExecutor.java
M src-test/org/openbravo/discounts/test/base/executor/WebServiceDiscountsExecutor.java
M src/org/openbravo/discounts/engine/graal/GraalDiscountsExecutor.java
---
(0120819)
hgbot   
2020-06-12 09:45   
Repository: erp/pmods/org.openbravo.discounts
Changeset: fa7b7ac8625a809aef89c72734e62f1a638919f7
Author: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Jun 12 09:45:47 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.discounts/rev/fa7b7ac8625a809aef89c72734e62f1a638919f7 [^]

Related to ISSUE-44339: Update swagger

---
M api/org.openbravo.discounts-discounts.yml
---