Skip to content

Commit ba1cd71

Browse files
committed
Fix:bug in ury pos condition
1 parent fad3740 commit ba1cd71

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ury/ury/doctype/ury_order/ury_order.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def sync_order(
107107
if (
108108
last_invoice
109109
and frappe.db.get_value("POS Invoice", last_invoice, "invoice_printed") == 1
110-
and not cashier
111110
):
112111
frappe.msgprint(
113112
title="Invoice Already Billed",
@@ -140,7 +139,7 @@ def sync_order(
140139
lastModifiedTime = datetime.strptime(
141140
lastModifiedTime, "%Y-%m-%d %H:%M:%S"
142141
)
143-
if lastModifiedTime != last_modified_time:
142+
if lastModifiedTime != last_modified_time and not cashier:
144143
frappe.msgprint(
145144
title="Order has been modified",
146145
indicator="red",
@@ -150,7 +149,7 @@ def sync_order(
150149
)
151150
return {"status": "Failure"}
152151
else:
153-
if invoice.name and invoice.invoice_printed == 0:
152+
if invoice.name and invoice.invoice_printed == 0 and table:
154153
frappe.msgprint(
155154
title="Table occupied ",
156155
indicator="red",

0 commit comments

Comments
 (0)