[FIX] point_of_sale: closing session without cash
The closing session popup input for bank payment methods throws an error when no cash payment method is configured. Steps to reproduce: - Configure a shop without any cash payment method and with at least one bank payment method - Open a session for that shop - Click on the button to display the closing session popup - In the popup, change the amount of the bank payment method An error is thrown. The fix simply consists in correctly checking if there is a cash payment method. closes odoo/odoo#132243 Task-id: 3468828 X-original-commit: 554ccb12a154f30f03c01931dc66eb04394f8154 Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
@@ -110,7 +110,7 @@ export class ClosePosPopup extends AbstractAwaitablePopup {
|
||||
handleInputChange(paymentId, event) {
|
||||
if (event.target.classList.contains('invalid-cash-input')) return;
|
||||
let expectedAmount;
|
||||
if (paymentId === this.defaultCashDetails.id) {
|
||||
if (paymentId === this.defaultCashDetails?.id) {
|
||||
this.manualInputCashCount = true;
|
||||
this.moneyDetails = null;
|
||||
this.state.notes = "";
|
||||
|
||||
Reference in New Issue
Block a user