Skip to content

Commit

Permalink
Fix:Print code validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafnianusha committed Jan 17, 2024
1 parent 9189261 commit bba2a94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ury/ury/api/ury_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def network_printing(
conn.printFile(print_settings.printer_name, file_path, name, {})

restaurant_table, invoice_printed, name = frappe.db.get_value(
"POS Invoice", name, ["name", "restaurant_table", "invoice_printed"]
"POS Invoice", name, ["restaurant_table", "invoice_printed", "name"]
)

if restaurant_table and invoice_printed == 0:
Expand Down Expand Up @@ -134,7 +134,7 @@ def print_pos_page(doctype, name, print_format):
data = {"name": name, "doctype": doctype, "print_format": print_format}

restaurant_table, branch, name = frappe.db.get_value(
"POS Invoice", name, ["name", "restaurant_table", "branch"]
"POS Invoice", name, ["restaurant_table", "branch", "name"]
)
print_channel = "{}_{}".format("print", branch)
frappe.publish_realtime(print_channel, {"data": data})
Expand Down

0 comments on commit bba2a94

Please sign in to comment.