Openbravo Issue Tracking System - POS2
View Issue Details
0053896POS2POSpublic2023-11-08 14:562023-11-30 09:07
ngarcia 
Rajesh_18 
urgentmajoralways
closedfixed 
5
 
 
No
0053896: Order goes to Errors While Importing POS Data if rounding payment method is used
Order goes to Errors While Importing POS Data if rounding payment method is defined.

The problem is that the rounding payment is referencing the original payment in the JSON (through the roundedPaymentId property) and the original payment comes after it
In https://livebuilds.openbravo.com/context/retail_pos2_pgsql/ [^]

In the backoffice:

1) Configure the Payment Rounding in the Touchpoint Type for Cash payment method:
Rounding Payment method: Rounding
Enabled for Sales: Y
Rounding Mode in Sales: Up rounding
Rounding Multiple in Sales: 0.05

Enabled for Returns: Y
Rounding Mode in Returns: Up rounding
Rounding Multiple in Returns: 0.05

2) Add the Rounding Payment Method to the touchpoint and add it in the related financial account

In the POS:

Create a ticket
Add a product
Change its price to 676.71
Pay it with 700 cash
Check the rounding is 0.04 and the change is 23.25
Complete it

In the backoffice:
Check it goes to Errors While Importing POS Data with the following error:

org.openbravo.base.exception.OBException: No row with the given identifier exists: [FIN_Payment#1FFA1C5532350D0C94BD1B4BB1F3C583]
    at org.openbravo.advpaymentmngt.process.FIN_PaymentProcess.processPayment(FIN_PaymentProcess.java:1199)
    at org.openbravo.advpaymentmngt.process.FIN_PaymentProcess.doProcessPayment(FIN_PaymentProcess.java:123)
    at org.openbravo.retail.posterminal.OrderLoader.processPayments(OrderLoader.java:2159)
    at org.openbravo.retail.posterminal.OrderLoader.handlePayments(OrderLoader.java:1680)
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:530)
No tags attached.
related to defect 0054711 closed Rajesh_18 Retail Modules Order with rounding sometimes goes to Errors While Importing POS Data 
Issue History
2023-11-08 14:56ngarciaNew Issue
2023-11-08 14:56ngarciaAssigned To => Retail
2023-11-08 14:56ngarciaTriggers an Emergency Pack => No
2023-11-08 14:57ngarciaIssue Monitored: networkb
2023-11-08 15:01ngarciaSummaryOrder goes to Errors While Importing POS Data if rounding payment method is defined => Order goes to Errors While Importing POS Data if rounding payment method is used
2023-11-22 11:24Rajesh_18Assigned ToRetail => Rajesh_18
2023-11-22 11:24Rajesh_18Statusnew => scheduled
2023-11-24 10:21hgbotNote Added: 0157605
2023-11-30 09:07hgbotNote Added: 0157831
2023-11-30 09:07hgbotResolutionopen => fixed
2023-11-30 09:07hgbotStatusscheduled => closed
2023-11-30 09:07hgbotFixed in Version => RR24Q1
2023-11-30 09:07hgbotNote Added: 0157832
2024-02-19 15:01ngarciaRelationship addedrelated to 0054711

Notes
(0157605)
hgbot   
2023-11-24 10:21   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1414 [^]
(0157831)
hgbot   
2023-11-30 09:07   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1414 [^]
(0157832)
hgbot   
2023-11-30 09:07   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 4a3f335255956190d7e7d0ba7fa3eef50bbdd18e
Author: Rajesh Senthilkumar <rajesh.senthilkumar.ext@openbravo.com>
Date: 30-11-2023 08:07:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/4a3f335255956190d7e7d0ba7fa3eef50bbdd18e [^]

Fixed ISSUE-53896: Positive Cash payments are added to the top of the array

---
M web-test/model/business-object/ticket/CompleteTicketUTils-CalculateChange.test.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/CompleteTicketUtils.js
---