Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046926Retail ModulesWeb POSpublic2021-06-01 12:362022-01-11 15:34
gorka_gil 
justin_patterson 
normalmajoralways
closedfixed 
5
 
RR22Q1 
No
0046926: JIRA 1123: The feature introduced behind preference "WebPOS Split Change in Different Payment Details" is not managed with state
The feature introduced behind preference "WebPOS Split Change in Different Payment Details" is not managed with state
In POS2 enable the preference
Do a sale of 10
Pay 12
Check in backoffice payment details
paid=10

In POS enable the preference
Do a sale of 10
Pay 12
Check in backoffice payment details
paid=10
chenage=2
Incorporate this logic to addPayment state action
No tags attached.
related to defect 0046875 closed gorka_gil POS2 Change not printed in the ticket 
Issue History
2021-06-01 12:36gorka_gilNew Issue
2021-06-01 12:36gorka_gilAssigned To => Retail
2021-06-01 12:36gorka_gilTriggers an Emergency Pack => No
2021-06-01 12:36gorka_gilStatusnew => acknowledged
2021-06-01 12:37gorka_gilRelationship addedrelated to 0046875
2021-11-12 08:56guilleaerAssigned ToRetail => justin_patterson
2021-11-12 08:56guilleaerStatusacknowledged => scheduled
2021-11-12 08:56guilleaerSummaryWhen printing a loaded ticket from backend it is missing the change => JIRA 1123: The feature introduced behind preference "WebPOS Split Change in Different Payment Details" is not managed with state
2021-11-12 08:56guilleaerDescription Updatedbug_revision_view_page.php?rev_id=23308#r23308
2021-11-12 08:56guilleaerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23310#r23310
2021-11-12 08:56guilleaerProposed Solution updated
2021-11-29 11:11hgbotNote Added: 0133401
2021-11-30 11:42hgbotNote Added: 0133411
2021-12-13 16:40hgbotNote Added: 0133661
2021-12-13 16:41hgbotNote Added: 0133662
2021-12-13 18:31hgbotNote Added: 0133666
2021-12-13 18:31hgbotNote Added: 0133667
2021-12-21 16:41hgbotNote Added: 0133881
2021-12-21 16:41hgbotResolutionopen => fixed
2021-12-21 16:41hgbotStatusscheduled => closed
2021-12-21 16:41hgbotFixed in Version => RR22Q1
2021-12-21 16:41hgbotNote Added: 0133882
2021-12-21 18:58hgbotNote Added: 0133886
2021-12-21 18:59shuehnerNote Added: 0133887
2021-12-21 18:59shuehnerStatusclosed => new
2021-12-21 18:59shuehnerResolutionfixed => open
2021-12-21 18:59shuehnerFixed in VersionRR22Q1 =>
2021-12-22 11:42hgbotNote Added: 0133894
2021-12-22 15:57hgbotResolutionopen => fixed
2021-12-22 15:57hgbotStatusnew => closed
2021-12-22 15:57hgbotNote Added: 0133905
2021-12-22 15:57hgbotFixed in Version => RR22Q1
2021-12-22 15:57hgbotNote Added: 0133906
2022-01-11 15:34hgbotNote Added: 0134228

Notes
(0133401)
hgbot   
2021-11-29 11:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/642 [^]
(0133411)
hgbot   
2021-11-30 11:42   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/743 [^]
(0133661)
hgbot   
2021-12-13 16:40   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/743 [^]
(0133662)
hgbot   
2021-12-13 16:41   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/750 [^]
(0133666)
hgbot   
2021-12-13 18:31   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/642 [^]
(0133667)
hgbot   
2021-12-13 18:31   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/657 [^]
(0133881)
hgbot   
2021-12-21 16:41   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/657 [^]
(0133882)
hgbot   
2021-12-21 16:41   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: dbf3a943e2f9aabfe8196623f33cc9244968c8c1
Author: Justin Patterson <justin.patterson@openbravo.com>
Date: 21-12-2021 11:15:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/dbf3a943e2f9aabfe8196623f33cc9244968c8c1 [^]

Fixed ISSUE-46926: The feature introduced behind preference "WebPOS Split Change in Different Payment Details" is not managed with state
            - Added new utility function calculateChange to process and add changePayments to the ticket
            - New logic takes in ticket and payload, finds payments with the "overpayments" property set when split payments are used, finds the cash payment with change if not, forms new changePayments using these payments and returns them as an array inside of new ticket object property "changePayments" for final processing on ticket completion
            - Added test class CompleteTicketUtils-CalculateChange.test.js which contains a suite of tests for the new logic

---
A web-test/model/business-object/ticket/CompleteTicketUTils-CalculateChange.test.js
M .gitignore
M web/org.openbravo.retail.posterminal/app/external-device/printing/TicketPrinter.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/CompleteTicketUtils.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/CompleteTicket.js
---
(0133886)
hgbot   
2021-12-21 18:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: c8f721839f82c2501457e27e9907e537ebede9cc
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 21-12-2021 18:56:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/c8f721839f82c2501457e27e9907e537ebede9cc [^]

Revert "Fixed ISSUE-46926: The feature introduced behind preference "WebPOS Split Change in Different Payment Details" is not managed with state"

This reverts commit dbf3a943e2f9aabfe8196623f33cc9244968c8c1.

---
M .gitignore
M web/org.openbravo.retail.posterminal/app/external-device/printing/TicketPrinter.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/CompleteTicketUtils.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/CompleteTicket.js
R web-test/model/business-object/ticket/CompleteTicketUTils-CalculateChange.test.js
---
(0133887)
shuehner   
2021-12-21 18:59   
Re-opening issue as commit was reverted (caused jest test errors)
(0133894)
hgbot   
2021-12-22 11:42   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/664 [^]
(0133905)
hgbot   
2021-12-22 15:57   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/664 [^]
(0133906)
hgbot   
2021-12-22 15:57   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: c5cab2ad7ffb82ba7dfd5b985fb0940af9d4798d
Author: Justin Patterson <justin.patterson@openbravo.com>
Date: 22-12-2021 12:16:26
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/c5cab2ad7ffb82ba7dfd5b985fb0940af9d4798d [^]

Fixed ISSUE-46926: The feature introduced behind preference "WebPOS Split Change in Different Payment Details" is not managed with state
- Added new utility function calculateChange to process and add changePayments to the ticket
- New logic takes in ticket and payload, finds payments with the "overpayments" property set when split payments are used, finds the cash payment with change if not, finds exact payments if they exist also, forms new changePayment and payment objects using these payments and returns them as arrays inside of new ticket
- Added test class CompleteTicketUtils-CalculateChange.test.js which contains a suite of tests for the new logic

---
A web-test/model/business-object/ticket/CompleteTicketUTils-CalculateChange.test.js
M .gitignore
M web/org.openbravo.retail.posterminal/app/external-device/printing/TicketPrinter.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/CompleteTicketUtils.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/CompleteTicket.js
---
(0134228)
hgbot   
2022-01-11 15:34   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/750 [^]