Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0047544 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | minor | have not tried | 2021-08-13 08:17 | 2021-08-25 07:37 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR21Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0047544: addPaymentRounding utility function should be pure | |||||||
Description | The addPaymentRounding[1] utility function should be pure. Currently it is not because it has side effects: it is modifying the received payload argument on some points, like here[2]. [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/app/model/business-object/ticket/AddPaymentUtils.js#L180 [^] [2] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/app/model/business-object/ticket/AddPaymentUtils.js#L252 [^] | |||||||
Steps To Reproduce | . | |||||||
Proposed Solution | Refactor the function to avoid doing modifications on the received payload. A possible solution is to make this function return also a new payload with the changes. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0131327) hgbot (developer) 2021-08-24 16:37 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/552 [^] |
(0131334) hgbot (developer) 2021-08-25 07:37 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^] Changeset: 97b2e409534526a825eaa79134810032d867d55c Author: Ranjith S R <ranjith@qualiantech.com> Date: 2021-08-25T05:35:51+00:00 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/97b2e409534526a825eaa79134810032d867d55c [^] Fixed ISSUE-47544: Added payload with ticket return value of addPaymentRounding util function * When rounding payment is added to the ticket, addPaymentRounding fn should return the payload with updated payment --- M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/AddPaymentUtils.js M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/AddPayment.js M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/AddPaymentRounding.js M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/ReversePayment.js --- |
(0131335) hgbot (developer) 2021-08-25 07:37 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/552 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2021-08-13 08:17 | caristu | New Issue | |
2021-08-13 08:17 | caristu | Assigned To | => Retail |
2021-08-13 08:17 | caristu | OBNetwork customer | => No |
2021-08-13 08:17 | caristu | Triggers an Emergency Pack | => No |
2021-08-13 08:19 | caristu | Description Updated | View Revisions |
2021-08-13 08:19 | caristu | Description Updated | View Revisions |
2021-08-23 10:55 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2021-08-23 12:06 | ranjith_qualiantech_com | Status | new => scheduled |
2021-08-24 16:37 | hgbot | Merge Request Status | => open |
2021-08-24 16:37 | hgbot | Note Added: 0131327 | |
2021-08-25 07:37 | hgbot | Merge Request Status | open => approved |
2021-08-25 07:37 | hgbot | Resolution | open => fixed |
2021-08-25 07:37 | hgbot | Status | scheduled => closed |
2021-08-25 07:37 | hgbot | Fixed in Version | => RR21Q4 |
2021-08-25 07:37 | hgbot | Note Added: 0131334 | |
2021-08-25 07:37 | hgbot | Note Added: 0131335 |
Copyright © 2000 - 2009 MantisBT Group |