-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* try: duplicate page and js * fix: move public fodlder, include * feat: add table input save * feat: add show table in invoice * feat: move bundle and add table to print receipt * fix: add bill print * fix: show table in edit recent order * feat: add tracking items * feat: print table, captain * fix: print will printing old order fix * fix: print captain will save as draft first * feat: add print bill * feat: clean table when checkout * fix: allow guest removed * feat: add card api
- Loading branch information
Showing
35 changed files
with
1,343 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
8 changes: 8 additions & 0 deletions
8
inn/inn_hotels/doctype/inn_point_of_sale_table/inn_point_of_sale_table.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2024, Core Initiative and contributors | ||
// For license information, please see license.txt | ||
|
||
// frappe.ui.form.on("Inn Point Of Sale Table", { | ||
// refresh(frm) { | ||
|
||
// }, | ||
// }); |
52 changes: 52 additions & 0 deletions
52
inn/inn_hotels/doctype/inn_point_of_sale_table/inn_point_of_sale_table.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"autoname": "field:table_name", | ||
"creation": "2024-02-05 14:06:01.644083", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"table_name", | ||
"status" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "table_name", | ||
"fieldtype": "Data", | ||
"label": "Table Name", | ||
"unique": 1 | ||
}, | ||
{ | ||
"fieldname": "status", | ||
"fieldtype": "Select", | ||
"in_list_view": 1, | ||
"label": "Status", | ||
"options": "Empty\nReserved\nOccupied" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2024-02-05 14:09:01.664573", | ||
"modified_by": "Administrator", | ||
"module": "Inn Hotels", | ||
"name": "Inn Point Of Sale Table", | ||
"naming_rule": "By fieldname", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
inn/inn_hotels/doctype/inn_point_of_sale_table/inn_point_of_sale_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Core Initiative and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class InnPointOfSaleTable(Document): | ||
pass |
9 changes: 9 additions & 0 deletions
9
inn/inn_hotels/doctype/inn_point_of_sale_table/test_inn_point_of_sale_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Core Initiative and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestInnPointOfSaleTable(FrappeTestCase): | ||
pass |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2024, Core Initiative and contributors | ||
// For license information, please see license.txt | ||
|
||
// frappe.ui.form.on("Inn POS Usage", { | ||
// refresh(frm) { | ||
|
||
// }, | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2024-02-12 11:06:40.509746", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"table", | ||
"pos_invoice", | ||
"print_status", | ||
"processed_item", | ||
"new_item" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "table", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Table", | ||
"options": "Inn Point Of Sale Table", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "pos_invoice", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "POS Invoice", | ||
"options": "POS Invoice", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"default": "0", | ||
"fieldname": "print_status", | ||
"fieldtype": "Int", | ||
"hidden": 1, | ||
"label": "Print Status", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "processed_item", | ||
"fieldtype": "Table", | ||
"label": "Processed Item", | ||
"options": "Inn POS Usage Item" | ||
}, | ||
{ | ||
"fieldname": "new_item", | ||
"fieldtype": "Table", | ||
"label": "New Item", | ||
"options": "Inn POS Usage Item" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2024-02-13 12:38:30.114825", | ||
"modified_by": "Administrator", | ||
"module": "Inn Hotels", | ||
"name": "Inn POS Usage", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) 2024, Core Initiative and contributors | ||
# For license information, please see license.txt | ||
|
||
import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class InnPOSUsage(Document): | ||
pass | ||
|
||
|
||
@frappe.whitelist() | ||
def print_list_order(pos_invoice): | ||
order_dict = frappe.get_last_doc('Inn POS Usage', filters={'pos_invoice': pos_invoice}) | ||
res = { | ||
"table": order_dict.table, | ||
"items": order_dict.new_item | ||
} | ||
return res | ||
|
||
@frappe.whitelist() | ||
def get_table_order(pos_invoice): | ||
order_dict = frappe.get_value('POS Invoice', filters={'pos_invoice': pos_invoice}, fields=['new_item']) | ||
order_list = [] | ||
for item in order_dict: | ||
order_list.append(item.item) | ||
|
||
return order_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Core Initiative and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestInnPOSUsage(FrappeTestCase): | ||
pass |
Empty file.
40 changes: 40 additions & 0 deletions
40
inn/inn_hotels/doctype/inn_pos_usage_item/inn_pos_usage_item.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2024-02-13 12:37:13.404550", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"item_name", | ||
"quantity" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "item_name", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Item Name", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "quantity", | ||
"fieldtype": "Int", | ||
"in_list_view": 1, | ||
"label": "Quantity", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2024-02-13 12:38:42.267641", | ||
"modified_by": "Administrator", | ||
"module": "Inn Hotels", | ||
"name": "Inn POS Usage Item", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
inn/inn_hotels/doctype/inn_pos_usage_item/inn_pos_usage_item.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Core Initiative and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class InnPOSUsageItem(Document): | ||
pass |
Oops, something went wrong.