Openbravo Issue Tracking System - POS2
View Issue Details
0056112POS2POSpublic2024-07-25 17:292024-08-13 10:54
ivazquez 
Rajesh_18 
highmajoralways
closedfixed 
5
pi 
pi24Q4 
No
0056112: In payment window, if the payment amount is 0, the SubtotalLines Summary field show undefined <currencySymbol>
Found when using prepayments, including a little customization but probably replicated if the prepayment amount is set to 0.

The customization allows the user to set a custom prepayment for each ticket, including a 0% prepayment, thus setting the prepayment amount to 0.

When this happens, the subtotal summary line shows the undefined <currencySymbol> tag.

Technical details: The component SubtotalLines renders a TicketSummaryView component. This component tries to display the payment amount.

At some point, it checks if the parameter grossAmount passed from SubtotalLines to TicketSummaryView is true (in this case, 0 is falsy for js).

This causes the TicketSummaryView component to try to display the amount of lines, but SubtotalLines component passes the no lines parameter.

This makes the component calculate the amount to render as undefined, finally showing undefined in the POS2.
-Make all the configuration to use PrePayment
-Go to the WebPOS
-Go to the Payment Section
-Select the Prepayment
-Check the undefined in the amout
In SubtotalLines.jsx component, when returning TicketSummaryView component, add lines={lines} parameter.
No tags attached.
png noLines.png (146,844) 2024-07-25 17:29
https://issues.openbravo.com/file_download.php?file_id=20039&type=bug
png

png withParameter.png (154,417) 2024-07-25 17:29
https://issues.openbravo.com/file_download.php?file_id=20040&type=bug
png
Issue History
2024-07-25 17:29ivazquezNew Issue
2024-07-25 17:29ivazquezAssigned To => Retail
2024-07-25 17:29ivazquezFile Added: noLines.png
2024-07-25 17:29ivazquezTriggers an Emergency Pack => No
2024-07-25 17:29ivazquezFile Added: withParameter.png
2024-07-26 07:57guillermogilStatusnew => acknowledged
2024-07-26 08:32Rajesh_18Assigned ToRetail => Rajesh_18
2024-07-26 08:32Rajesh_18Statusacknowledged => scheduled
2024-07-26 09:04hgbotNote Added: 0167376
2024-08-13 10:54hgbotResolutionopen => fixed
2024-08-13 10:54hgbotStatusscheduled => closed
2024-08-13 10:54hgbotNote Added: 0168021
2024-08-13 10:54hgbotFixed in Version => 24Q4
2024-08-13 10:54hgbotNote Added: 0168022

Notes
(0167376)
hgbot   
2024-07-26 09:04   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2821 [^]
(0168021)
hgbot   
2024-08-13 10:54   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2821 [^]
(0168022)
hgbot   
2024-08-13 10:54   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: fde4a94d5e1d2239168fad4252a40ff8c97338a4
Author: Rajesh Senthilkumar <rajesh.senthilkumar.ext@openbravo.com>
Date: 13-08-2024 08:54:45
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/fde4a94d5e1d2239168fad4252a40ff8c97338a4 [^]

Fixed ISSUE-56112: Add lines as parameter to calculate line total component

---
M web-jspack/org.openbravo.pos2/src/components/Payments/PaymentList/SubtotalLines.jsx
---