Tuesday, May 27, 2025
1 change · saas-18.1
Resolved issues and error corrections
Restaurant point of sale orders now keep the entered payment amount unchanged when a tip is added after payment and is covered by the overpaid amount. This prevents incorrect cash totals and remaining balances, improving checkout accuracy for staff and customers.
Original PR description
**Problem:** when in a bar/restaurant point of sale if the tip is added after the payment the total amount and remaining amount are not correct **Steps to reproduce:** - Navigate to Point of…
**Problem:** when in a bar/restaurant point of sale if the tip is added after the payment the total amount and remaining amount are not correct **Steps to reproduce:** - Navigate to Point of Sale/Configuration/Point of Sale - Create a new point of sale - In settings, activate the setting "Is a Bar/Restaurant" for this point of sale - Acivate the setting "Tips" for this point of sale - make sure the cash payment method is available for this point of sale - in Point of Sales/Dashboard clik on open regiser for the new point of sale - Create a new order, select a product, click on payment - Select cash, on enter an amount over the total value - Click on Tip, and select Ok (the default amount should be the difference between the total and the cash amount you entered **Current behavior:** The Amount of cash has been increased by the amount of the tip **Expected behavior:** The cash amount shouldn't be impacted by the tip **Cause of the issue:** When adding the tip inside the addTip method, when settip is triggered, the tip is added as a new PosOrderLine inside the order https://github.com/odoo/odoo/blob/68940a80a64cd81679ad94d488623a471e2c926f/addons/point_of_sale/static/src/app/services/pos_store.js#L636 which modifies total due amount Then the Pos Payment amount is modified https://github.com/odoo/odoo/blob/68940a80a64cd81679ad94d488623a471e2c926f/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.js#L248 which should not happen when the tip is smaller or equal to the remaining amount (if you by something worth 15 ,give 20 euros and add a 5 euros tip, the payment amount should stay 20) **Fix:** There is 3 cases. Case 1: the remaining is negative, then if a tip is added it should increase the payment amount Case 2: the remaining is positive (meaning the client paid more than total due) and the tip is lower or equal to the remaining, then the payment amount should not increase Case3: the remaining is positive and the tip is higher than the remaining, the payment amount should be increased by the difference between tip and remaining opw-4721864