Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047544
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2021-08-13 08:172021-08-25 07:37
ReportercaristuView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR21Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047544: addPaymentRounding utility function should be pure

DescriptionThe 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 SolutionRefactor 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(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 [^]

- Issue History
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 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 Note Added: 0131327
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
Powered by Mantis Bugtracker