[FIX] point_of_sale: fix improperly formatted value
Currently, the `Counted` value in the closing popup is improperly formatted. Steps to reproduce: 1. Open a new session and create an order'; 2. Pay 5.06 dollars with `Bank` and the rest with `Cash`; 3. Close the session; 4. Observe the value `5.0600000000000005` instead of the expected `5.06` in the `Counted` field for the `Bank Payment Method` This PR addresses the issue by correctly formatting the value. closes odoo/odoo#123234 Taskid: #3332861 Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
@@ -888,7 +888,9 @@ export class PosGlobalState extends PosModel {
|
||||
otherPaymentMethods.forEach((pm) => {
|
||||
if (pm.type === "bank") {
|
||||
state.payments[pm.id] = {
|
||||
counted: this.env.utils.roundCurrency(pm.amount),
|
||||
counted: this.env.utils
|
||||
.roundCurrency(pm.amount)
|
||||
.toFixed(this.currency.decimal_places),
|
||||
difference: 0,
|
||||
number: pm.number,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user