| 1 |
|
| 2 |
|
| 3 |
import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util"; |
| 4 |
import * as PaymentScreen from "@point_of_sale/../tests/pos/tours/utils/payment_screen_util"; |
| 5 |
import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util"; |
| 6 |
import { registry } from "@web/core/registry"; |
| 7 |
|
| 8 |
registry.category("web_tour.tours").add("ZATCA_invoice_not_mandatory_if_settlement", { |
| 9 |
steps: () => |
| 10 |
[ |
| 11 |
Chrome.startPoS(), |
| 12 |
Dialog.confirm("Open Register"), |
| 13 |
{ |
| 14 |
content: "Set the pos_settle_due to True and open payment screen", |
| 15 |
trigger: "body", |
| 16 |
run: () => { |
| 17 |
posmodel.selectedOrder.is_settling_account = true; |
| 18 |
posmodel.navigate("PaymentScreen", { orderUuid: posmodel.selectedOrderUuid }); |
| 19 |
}, |
| 20 |
}, |
| 21 |
PaymentScreen.clickPartnerButton(), |
| 22 |
PaymentScreen.clickCustomer("AAA Partner"), |
| 23 |
PaymentScreen.isInvoiceButtonUnchecked(), |
| 24 |
].flat(), |
| 25 |
}); |
| 26 |
|
| 27 |
registry.category("web_tour.tours").add("ZATCA_invoice_mandatory_if_not_settlement", { |
| 28 |
steps: () => |
| 29 |
[ |
| 30 |
Chrome.startPoS(), |
| 31 |
Dialog.confirm("Open Register"), |
| 32 |
{ |
| 33 |
content: "Set the pos_settle_due to False and open payment screen", |
| 34 |
trigger: "body", |
| 35 |
run: () => { |
| 36 |
posmodel.selectedOrder.is_settling_account = false; |
| 37 |
posmodel.navigate("PaymentScreen", { orderUuid: posmodel.selectedOrderUuid }); |
| 38 |
}, |
| 39 |
}, |
| 40 |
PaymentScreen.clickPartnerButton(), |
| 41 |
PaymentScreen.clickCustomer("AAA Partner"), |
| 42 |
PaymentScreen.isInvoiceButtonChecked(), |
| 43 |
|
| 44 |
PaymentScreen.clickInvoiceButton(), |
| 45 |
PaymentScreen.isInvoiceButtonChecked(), |
| 46 |
].flat(), |
| 47 |
}); |