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

View Revisions: Issue #47544 All Revisions ] Back to Issue ]
Summary 0047544: addPaymentRounding utility function should be pure
Revision 2021-08-13 08:19 by caristu
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 [^]
Revision 2021-08-13 08:19 by caristu
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 [^]
Revision 2021-08-13 08:17 by caristu
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 in 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 [^]


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker