├── .github └── FUNDING.yml ├── .gitignore ├── MANIFEST.in ├── README.md ├── license.txt ├── requirements.txt ├── restaurant_management ├── __init__.py ├── config │ ├── __init__.py │ ├── desktop.py │ ├── docs.py │ └── restaurant_management.py ├── hooks.py ├── modules.txt ├── patches.txt ├── public │ ├── build.json │ ├── js │ │ ├── RM.helper.js │ │ ├── clusterize.min.js │ │ ├── drag.js │ │ ├── interact.min.js │ │ └── object-manage.js │ └── restaurant │ │ ├── css │ │ ├── action-buttons.css │ │ ├── editor-order.css │ │ ├── food-command.css │ │ ├── order-buttons.css │ │ ├── order-items-container.css │ │ ├── order-items.css │ │ ├── order-manage.css │ │ ├── process-manage.css │ │ ├── product-list.css │ │ ├── restaurant-object.css │ │ └── restaurant-room.css │ │ └── js │ │ ├── food-command-class.js │ │ ├── invoice-class.js │ │ ├── order-item-class.js │ │ ├── order-manage-class.js │ │ ├── pay-form-class.js │ │ ├── pos-restaurant-controller.js │ │ ├── process-manage-class.js │ │ ├── product-item-class.js │ │ ├── restaurant-object-class.js │ │ ├── restaurant-room-class.js │ │ └── table-order-class.js ├── restaurant_management │ ├── __init__.py │ ├── desk_form │ │ ├── __init__.py │ │ ├── order_item_editor │ │ │ ├── __init__.py │ │ │ ├── order_item_editor.js │ │ │ ├── order_item_editor.json │ │ │ └── order_item_editor.py │ │ ├── order_item_note │ │ │ ├── __init__.py │ │ │ ├── order_item_note.js │ │ │ ├── order_item_note.json │ │ │ └── order_item_note.py │ │ ├── payment_order │ │ │ ├── __init__.py │ │ │ ├── payment_order.js │ │ │ ├── payment_order.json │ │ │ └── payment_order.py │ │ ├── restaurant_order_customer │ │ │ ├── __init__.py │ │ │ ├── restaurant_order_customer.js │ │ │ ├── restaurant_order_customer.json │ │ │ └── restaurant_order_customer.py │ │ ├── restaurant_order_dinners │ │ │ ├── __init__.py │ │ │ ├── restaurant_order_dinners.js │ │ │ ├── restaurant_order_dinners.json │ │ │ └── restaurant_order_dinners.py │ │ ├── restaurant_permission_manage │ │ │ ├── __init__.py │ │ │ ├── restaurant_permission_manage.js │ │ │ ├── restaurant_permission_manage.json │ │ │ └── restaurant_permission_manage.py │ │ ├── restaurant_production_center │ │ │ ├── __init__.py │ │ │ ├── restaurant_production_center.js │ │ │ ├── restaurant_production_center.json │ │ │ └── restaurant_production_center.py │ │ ├── restaurant_room │ │ │ ├── __init__.py │ │ │ ├── restaurant_room.js │ │ │ ├── restaurant_room.json │ │ │ └── restaurant_room.py │ │ └── restaurant_table │ │ │ ├── __init__.py │ │ │ ├── restaurant_table.js │ │ │ ├── restaurant_table.json │ │ │ └── restaurant_table.py │ ├── desk_formorder_item_note.json │ ├── desk_page │ │ └── restaurant │ │ │ └── restaurant.json │ ├── doctype │ │ ├── __init__.py │ │ ├── order_entry_item │ │ │ ├── __init__.py │ │ │ ├── order_entry_item.js │ │ │ ├── order_entry_item.json │ │ │ ├── order_entry_item.py │ │ │ └── test_order_entry_item.py │ │ ├── order_payment │ │ │ ├── __init__.py │ │ │ ├── order_payment.json │ │ │ └── order_payment.py │ │ ├── production_center_group │ │ │ ├── __init__.py │ │ │ ├── production_center_group.json │ │ │ └── production_center_group.py │ │ ├── restaurant_exceptions │ │ │ ├── __init__.py │ │ │ ├── restaurant_exceptions.json │ │ │ └── restaurant_exceptions.py │ │ ├── restaurant_object │ │ │ ├── __init__.py │ │ │ ├── order_manage.html │ │ │ ├── restaurant_object.js │ │ │ ├── restaurant_object.json │ │ │ ├── restaurant_object.py │ │ │ └── test_restaurant_object.py │ │ ├── restaurant_permission │ │ │ ├── __init__.py │ │ │ ├── restaurant_permission.js │ │ │ ├── restaurant_permission.json │ │ │ ├── restaurant_permission.py │ │ │ └── test_restaurant_permission.py │ │ ├── restaurant_permission_manage │ │ │ ├── __init__.py │ │ │ ├── restaurant_permission_manage.js │ │ │ ├── restaurant_permission_manage.json │ │ │ ├── restaurant_permission_manage.py │ │ │ └── test_restaurant_permission_manage.py │ │ ├── restaurant_settings │ │ │ ├── __init__.py │ │ │ ├── restaurant_settings.js │ │ │ ├── restaurant_settings.json │ │ │ ├── restaurant_settings.py │ │ │ └── test_restaurant_settings.py │ │ ├── status_managed_production_center │ │ │ ├── __init__.py │ │ │ ├── status_managed_production_center.json │ │ │ └── status_managed_production_center.py │ │ └── table_order │ │ │ ├── __init__.py │ │ │ ├── divide_template.html │ │ │ ├── table_order.js │ │ │ ├── table_order.json │ │ │ ├── table_order.py │ │ │ └── test_table_order.py │ ├── page │ │ ├── __init__.py │ │ └── restaurant_manage │ │ │ ├── __init__.py │ │ │ ├── pos_restaurant_controller.js │ │ │ ├── restaurant_manage.css │ │ │ ├── restaurant_manage.html │ │ │ ├── restaurant_manage.js │ │ │ ├── restaurant_manage.json │ │ │ └── restaurant_manage.py │ ├── print_format │ │ ├── __init__.py │ │ └── order_account │ │ │ ├── __init__.py │ │ │ └── order_account.json │ ├── report │ │ ├── __init__.py │ │ └── restaurant_order_analytics │ │ │ ├── __init__.py │ │ │ ├── restaurant_order_analytics.js │ │ │ ├── restaurant_order_analytics.json │ │ │ └── restaurant_order_analytics.py │ ├── restaurant_manage.py │ └── workspace │ │ └── restaurant_management │ │ └── restaurant_management.json ├── setup │ └── install.py └── templates │ ├── __init__.py │ └── pages │ └── __init__.py └── setup.py /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: quantumbitcore # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | #patreon: alfredo_ramirez 5 | #open_collective: # Replace with a single Open Collective username 6 | #ko_fi: # Replace with a single Ko-fi username 7 | #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | #liberapay: # Replace with a single Liberapay username 10 | #issuehunt: # Replace with a single IssueHunt username 11 | #otechie: # Replace with a single Otechie username 12 | #lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | #custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.egg-info 4 | *.swp 5 | tags 6 | restaurant_management/docs/current 7 | .idea 8 | /.idea/ 9 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in 2 | include requirements.txt 3 | include *.json 4 | include *.md 5 | include *.py 6 | include *.txt 7 | recursive-include restaurant_management *.css 8 | recursive-include restaurant_management *.csv 9 | recursive-include restaurant_management *.html 10 | recursive-include restaurant_management *.ico 11 | recursive-include restaurant_management *.js 12 | recursive-include restaurant_management *.json 13 | recursive-include restaurant_management *.md 14 | recursive-include restaurant_management *.png 15 | recursive-include restaurant_management *.py 16 | recursive-include restaurant_management *.svg 17 | recursive-include restaurant_management *.txt 18 | recursive-exclude restaurant_management *.pyc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |

POS Restaurant

4 |
5 | 6 | ___ 7 | > ### POS Restaurant includes the following functionalities: 8 | 9 | 1. Customized Permission Management based on ERPNext user roles. 10 | 2. Custom permissions in the POS profile assigned to rooms. 11 | 3. Management of personalized permits based on the activity of the restaurant. 12 | 4. Dynamic management of the restaurant areas. 13 | 5. Restaurant rooms, tables and production center. 14 | 6. Individual order management by table and user. 15 | 7. Process management based on Restaurant Production Center. 16 | 8. Real time based on the user's activity when the restaurant areas are modified or when the user interacts with it. 17 | 9. Compatible with Dark Theme. 18 | 19 | ___ 20 | ### ERPNext Restaurant Management requires 21 | 1. [Frappe Framework](https://github.com/quantumbitcore/frappe_helper.git) 22 | 2. [ERPNext](https://github.com/frappe/erpnext.git) 23 | 3. [Frappe Helper](https://github.com/quantumbitcore/frappe_helper.git)
24 | Frappe Helper is another experimental application, in order to be reused by other applications. 25 | 26 | ___ 27 | ### How to Install 28 | 29 | #### Self Host: 30 | 1. `bench get-app https://github.com/quantumbitcore/erpnext-restaurant.git` 31 | 2. `bench setup requirements` 32 | 3. `bench build --app restaurant_management` 33 | 4. `bench restart` 34 | 5. `bench --site [site.name] install-app restaurant_management` 35 | 6. `bench --site [site.name] migrate` 36 | 37 | #### Frappe Cloud: 38 | >Available in your hosting on FrappeCloud [here](https://frappecloud.com/marketplace/apps/restaurant_management) 39 | 40 | ___ 41 | ### How to Use 42 | > See the documentation [here](https://github.com/quantumbitcore/erpnext-restaurant/wiki) 43 | 44 | ___ 45 | ### Compatibility 46 | > V13, V14 47 | 48 | ___ 49 | ERPNext Restaurant Management is based on [Frappe Framework](https://github.com/frappe/frappe). 50 | 51 | ___ 52 | 53 | ### License 54 | > GNU / General Public License (see [license.txt](license.txt)) 55 | 56 | > The POS Restaurant code is licensed under the GNU General Public License (v3). 57 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/requirements.txt -------------------------------------------------------------------------------- /restaurant_management/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | __version__ = '1.3.7' -------------------------------------------------------------------------------- /restaurant_management/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/config/__init__.py -------------------------------------------------------------------------------- /restaurant_management/config/desktop.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from frappe import _ 4 | from frappe.desk.moduleview import add_setup_section 5 | 6 | 7 | def get_data(): 8 | data = [ 9 | { 10 | "module_name": "Restaurant Management", 11 | "category": "Modules", 12 | "label": _("Restaurant Management"), 13 | "color": "#3498db", 14 | "icon": "octicon octicon-repo", 15 | "type": "module", 16 | "description": "Restaurant Management." 17 | }, 18 | ] 19 | 20 | return data -------------------------------------------------------------------------------- /restaurant_management/config/docs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Configuration for docs 3 | """ 4 | 5 | # source_link = "https://github.com/[org_name]/restaurant_management" 6 | # docs_base_url = "https://[org_name].github.io/restaurant_management" 7 | # headline = "App that does everything" 8 | # sub_heading = "Yes, you got that right the first time, everything" 9 | 10 | def get_context(context): 11 | context.brand_html = "Restaurant Management" 12 | -------------------------------------------------------------------------------- /restaurant_management/config/restaurant_management.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | from frappe import _ 3 | 4 | 5 | def get_data(): 6 | return [ 7 | { 8 | "label": _("Restaurant Management"), 9 | "icon": "fa fa-star", 10 | "items": [ 11 | { 12 | "type": "doctype", 13 | "name": "Restaurant Object", 14 | "description": _("Restaurant Object."), 15 | "onboard": 1, 16 | }, 17 | { 18 | "type": "doctype", 19 | "name": "Table Order", 20 | "description": _("Restaurant Order."), 21 | "onboard": 1, 22 | }, 23 | { 24 | "type": "page", 25 | "name": "restaurant-manage", 26 | "label": _("Restaurant Manage"), 27 | "icon": "fa fa-bar-chart" 28 | }, 29 | ], 30 | } 31 | ] 32 | -------------------------------------------------------------------------------- /restaurant_management/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from . import __version__ as app_version 5 | 6 | app_name = "restaurant_management" 7 | app_title = "Restaurant" 8 | app_publisher = "Quantum Bit Core" 9 | app_description = "Restaurant" 10 | app_icon = "octicon octicon-file-directory" 11 | app_color = "grey" 12 | app_email = "qubitcore.io@gmail.com" 13 | app_license = "MIT" 14 | source_link = "https://github.com/joepa37/restaurant_management" 15 | 16 | doc_events = { 17 | "POS Profile": { 18 | "on_create": "restaurant_management.restaurant_management.page.restaurant_manage.restaurant_manage.set_settings_data", 19 | "on_update": "restaurant_management.restaurant_management.page.restaurant_manage.restaurant_manage.set_settings_data" 20 | }, 21 | "POS Profile User": { 22 | "on_create": "restaurant_management.restaurant_management.page.restaurant_manage.restaurant_manage.set_settings_data", 23 | "on_update": "restaurant_management.restaurant_management.page.restaurant_manage.restaurant_manage.set_settings_data" 24 | }, 25 | } 26 | 27 | after_migrate = "restaurant_management.setup.install.after_install" 28 | after_install = "restaurant_management.setup.install.after_install" 29 | 30 | # Includes in 31 | # ------------------ 32 | 33 | # include js, css files in header of desk.html 34 | # app_include_css = "/assets/{app_name}/css/{app_name}.css" 35 | 36 | app_include_js = [ 37 | '/assets/restaurant_management/js/clusterize.min.js', 38 | '/assets/restaurant_management/js/interact.min.js', 39 | '/assets/restaurant_management/js/drag.js', 40 | '/assets/restaurant_management/js/RM.helper.js', 41 | '/assets/restaurant_management/js/object-manage.js' 42 | ] 43 | 44 | # include js, css files in header of web template 45 | # web_include_css = "/assets/{app_name}/css/{app_name}.css" 46 | # web_include_js = "/assets/{app_name}/js/{app_name}.js" 47 | 48 | # include js, css files in header of web form 49 | # webform_include_js = {"doctype": "public/js/doctype.js"} 50 | # webform_include_css = {"doctype": "public/css/doctype.css"} 51 | 52 | # include js in page 53 | # page_js = {"page" : "public/js/file.js"} 54 | 55 | # include js in doctype views 56 | # doctype_js = {{"doctype" : "public/js/doctype.js"}} 57 | # doctype_list_js = {{"doctype" : "public/js/doctype_list.js"}} 58 | # doctype_tree_js = {{"doctype" : "public/js/doctype_tree.js"}} 59 | # doctype_calendar_js = {{"doctype" : "public/js/doctype_calendar.js"}} 60 | 61 | # Home Pages 62 | # ---------- 63 | 64 | # application home page (will override Website Settings) 65 | # home_page = "login" 66 | 67 | # website user home page (by Role) 68 | # role_home_page = {{ 69 | # "Role": "home_page" 70 | # }} 71 | 72 | # Website user home page (by function) 73 | # get_website_user_home_page = "{app_name}.utils.get_home_page" 74 | 75 | # Generators 76 | # ---------- 77 | 78 | # automatically create page for each record of this doctype 79 | # website_generators = ["Web Page"] 80 | 81 | # Installation 82 | # ------------ 83 | 84 | # before_install = "{app_name}.install.before_install" 85 | # after_install = "{app_name}.install.after_install" 86 | 87 | # Desk Notifications 88 | # ------------------ 89 | # See frappe.core.notifications.get_notification_config 90 | 91 | # notification_config = "{app_name}.notifications.get_notification_config" 92 | 93 | # Permissions 94 | # ----------- 95 | # Permissions evaluated in scripted ways 96 | 97 | # permission_query_conditions = {{ 98 | # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", 99 | # }} 100 | # 101 | # has_permission = {{ 102 | # "Event": "frappe.desk.doctype.event.event.has_permission", 103 | # }} 104 | 105 | # Document Events 106 | # --------------- 107 | # Hook on document methods and events 108 | 109 | # doc_events = {{ 110 | # "*": {{ 111 | # "on_update": "method", 112 | # "on_cancel": "method", 113 | # "on_trash": "method" 114 | # }} 115 | # }} 116 | 117 | # Scheduled Tasks 118 | # --------------- 119 | 120 | # scheduler_events = {{ 121 | # "all": [ 122 | # "{app_name}.tasks.all" 123 | # ], 124 | # "daily": [ 125 | # "{app_name}.tasks.daily" 126 | # ], 127 | # "hourly": [ 128 | # "{app_name}.tasks.hourly" 129 | # ], 130 | # "weekly": [ 131 | # "{app_name}.tasks.weekly" 132 | # ] 133 | # "monthly": [ 134 | # "{app_name}.tasks.monthly" 135 | # ] 136 | # }} 137 | 138 | # Testing 139 | # ------- 140 | 141 | # before_tests = "{app_name}.install.before_tests" 142 | 143 | # Overriding Methods 144 | # ------------------------------ 145 | # 146 | # override_whitelisted_methods = {{ 147 | # "frappe.desk.doctype.event.event.get_events": "{app_name}.event.get_events" 148 | # }} 149 | # 150 | # each overriding function accepts a `data` argument; 151 | # generated from the base implementation of the doctype dashboard, 152 | # along with any modifications made in other Frappe apps 153 | # override_doctype_dashboards = {{ 154 | # "Task": "{app_name}.task.get_dashboard_data" 155 | # }} 156 | 157 | # exempt linked doctypes from being automatically cancelled 158 | # 159 | # auto_cancel_exempted_doctypes = ["Auto Repeat"] 160 | -------------------------------------------------------------------------------- /restaurant_management/modules.txt: -------------------------------------------------------------------------------- 1 | Restaurant Management 2 | -------------------------------------------------------------------------------- /restaurant_management/patches.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/patches.txt -------------------------------------------------------------------------------- /restaurant_management/public/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "css/restaurant_management.css": [ 3 | "public/restaurant/css/action-button.less" 4 | ], 5 | "js/restaurant_management.min.js": [ 6 | "restaurant_management/page/restaurant_manage/pos_restaurant_controller.js" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /restaurant_management/public/js/RM.helper.js: -------------------------------------------------------------------------------- 1 | let DOUBLE_CLICK = 'double_click'; 2 | 3 | class RMHelperClass { 4 | constructor() { 5 | this.icons = { 6 | add: ``, 9 | ok: ``, 10 | people: ` 18 |
19 |
20 |
21 |
22 | ${__(message)} 23 |
24 | ` 25 | } 26 | 27 | return_main_button(title, f, wrapper = null) { 28 | return frappe.jshtml({ 29 | tag: "button", 30 | wrapper: wrapper, 31 | properties: { class: "btn btn-default btn-flat" }, 32 | content: " {{text}}", 33 | text: title 34 | }).on("click", () => f()); 35 | } 36 | 37 | default_button(text, icon, f, method, wrapper = null) { 38 | return frappe.jshtml({ 39 | tag: "button", 40 | wrapper: wrapper, 41 | properties: { class: "btn btn-default btn-flat", style: 'display: none;' }, 42 | content: `${this.icons[icon]} {{text}}`, 43 | text: __(text) 44 | }).on("click", () => f(), method); 45 | } 46 | 47 | default_full_modal(title, f) { 48 | return new DeskModal({ 49 | full_page: true, 50 | customize: true, 51 | adjust_height: 25, 52 | title: title, 53 | callback: () => f() 54 | }); 55 | } 56 | 57 | JSONparse(data) { 58 | if (data) { 59 | try { 60 | return JSON.parse(data); 61 | } catch (e) { 62 | return null; 63 | } 64 | } else { 65 | return null; 66 | } 67 | } 68 | 69 | prettyDate(date, mini, f = null) { 70 | if (!date) return ''; 71 | 72 | if (typeof (date) == "string") { 73 | date = frappe.datetime.convert_to_user_tz(date); 74 | date = new Date((date || "").replace(/-/g, "/").replace(/[TZ]/g, " ").replace(/\.[0-9]*/, "")); 75 | } 76 | 77 | let diff = (((new Date()).getTime() - date.getTime()) / 1000); 78 | let day_diff = Math.floor(diff / 86400); 79 | 80 | if (isNaN(day_diff) || day_diff < 0) return ''; 81 | 82 | if (f) f(diff); 83 | 84 | if (mini) { 85 | // Return short format of time difference 86 | if (day_diff == 0) { 87 | if (diff < 60) { 88 | return __("now"); 89 | } else if (diff < 3600) { 90 | return __("{0} m", [Math.floor(diff / 60)]); 91 | } else if (diff < 86400) { 92 | return __("{0} h", [Math.floor(diff / 3600)]); 93 | } 94 | } else { 95 | if (day_diff < 7) { 96 | return __("{0} d", [day_diff]); 97 | } else if (day_diff < 31) { 98 | return __("{0} w", [Math.ceil(day_diff / 7)]); 99 | } else if (day_diff < 365) { 100 | return __("{0} M", [Math.ceil(day_diff / 30)]); 101 | } else { 102 | return __("{0} y", [Math.ceil(day_diff / 365)]); 103 | } 104 | } 105 | } else { 106 | // Return long format of time difference 107 | if (day_diff == 0) { 108 | if (diff < 60) { 109 | return __("just now"); 110 | } else if (diff < 120) { 111 | return __("1 minute ago"); 112 | } else if (diff < 3600) { 113 | return __("{0} minutes ago", [Math.floor(diff / 60)]); 114 | } else if (diff < 7200) { 115 | return __("1 hour ago"); 116 | } else if (diff < 86400) { 117 | return __("{0} hours ago", [Math.floor(diff / 3600)]); 118 | } 119 | } else { 120 | if (day_diff == 1) { 121 | return __("yesterday"); 122 | } else if (day_diff < 7) { 123 | return __("{0} days ago", [day_diff]); 124 | } else if (day_diff < 14) { 125 | return __("1 week ago"); 126 | } else if (day_diff < 31) { 127 | return __("{0} weeks ago", [Math.ceil(day_diff / 7)]); 128 | } else if (day_diff < 62) { 129 | return __("1 month ago"); 130 | } else if (day_diff < 365) { 131 | return __("{0} months ago", [Math.ceil(day_diff / 30)]); 132 | } else if (day_diff < 730) { 133 | return __("1 year ago"); 134 | } else { 135 | return __("{0} years ago", [Math.ceil(day_diff / 365)]); 136 | } 137 | } 138 | } 139 | } 140 | } 141 | 142 | RMHelper = new RMHelperClass(); -------------------------------------------------------------------------------- /restaurant_management/public/js/clusterize.min.js: -------------------------------------------------------------------------------- 1 | /*! Clusterize.js - v0.17.6 - 2017-03-05 2 | * http://NeXTs.github.com/Clusterize.js/ 3 | * Copyright (c) 2015 Denis Lukov; Licensed GPLv3 */ 4 | 5 | ;(function(q,n){"undefined"!=typeof module?module.exports=n():"function"==typeof define&&"object"==typeof define.amd?define(n):this[q]=n()})("Clusterize",function(){function q(b,a,c){return a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}function n(b,a,c){return a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c)}function r(b){return"[object Array]"===Object.prototype.toString.call(b)}function m(b,a){return window.getComputedStyle?window.getComputedStyle(a)[b]: 6 | a.currentStyle[b]}var l=function(){for(var b=3,a=document.createElement("b"),c=a.all||[];a.innerHTML="\x3c!--[if gt IE "+ ++b+"]>=l&&!c.tag&&(c.tag=b[0].match(/<([^>\s/]*)/)[1].toLowerCase()),1>=this.content_elem.children.length&&(a.data=this.html(b[0]+b[0]+b[0])),c.tag||(c.tag=this.content_elem.children[0].tagName.toLowerCase()), 11 | this.getRowsHeight(b))},getRowsHeight:function(b){var a=this.options,c=a.item_height;a.cluster_height=0;if(b.length){b=this.content_elem.children;var d=b[Math.floor(b.length/2)];a.item_height=d.offsetHeight;"tr"==a.tag&&"collapse"!=m("borderCollapse",this.content_elem)&&(a.item_height+=parseInt(m("borderSpacing",this.content_elem),10)||0);"tr"!=a.tag&&(b=parseInt(m("marginTop",d),10)||0,d=parseInt(m("marginBottom",d),10)||0,a.item_height+=Math.max(b,d));a.block_height=a.item_height*a.rows_in_block; 12 | a.rows_in_cluster=a.blocks_in_cluster*a.rows_in_block;a.cluster_height=a.blocks_in_cluster*a.block_height;return c!=a.item_height}},getClusterNum:function(){this.options.scroll_top=this.scroll_elem.scrollTop;return Math.floor(this.options.scroll_top/(this.options.cluster_height-this.options.block_height))||0},generateEmptyRow:function(){var b=this.options;if(!b.tag||!b.show_no_data_row)return[];var a=document.createElement(b.tag),c=document.createTextNode(b.no_data_text),d;a.className=b.no_data_class; 13 | "tr"==b.tag&&(d=document.createElement("td"),d.colSpan=100,d.appendChild(c));a.appendChild(d||c);return[a.outerHTML]},generate:function(b,a){var c=this.options,d=b.length;if(de&&g++;f=l&&"tr"==this.options.tag){var c=document.createElement("div");for(c.innerHTML=""+b+"
";b=a.lastChild;)a.removeChild(b);for(c=this.getChildNodes(c.firstChild.firstChild);c.length;)a.appendChild(c.shift())}else a.innerHTML=b},getChildNodes:function(b){b=b.children;for(var a=[],c=0,d=b.length;c { 56 | f(child, key, index); 57 | index ++; 58 | }); 59 | }else{ 60 | Object.keys(childrend).forEach(key => { 61 | f(childrend[key], key, index); 62 | index ++; 63 | }); 64 | } 65 | } 66 | 67 | delete_child(child){ 68 | if(this.has_child(child)) delete this.#childrend[child]; 69 | } 70 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/action-buttons.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/public/restaurant/css/action-buttons.css -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/editor-order.css: -------------------------------------------------------------------------------- 1 | .panel-order-edit .entry-order-editor { 2 | font-size: 18px; 3 | height: 40px !important; 4 | width: 100%; 5 | display: block; 6 | } 7 | 8 | .panel-order-edit .edit-values td{ 9 | padding: 0.5px 0.5px 4px; 10 | } 11 | 12 | .panel-order-edit .entry-order-editor.center { 13 | text-align: center; 14 | border: none; 15 | } 16 | 17 | .panel-order-edit .center { 18 | text-align: center; 19 | } 20 | 21 | .panel-order-edit .edit-button { 22 | width: 52.5px; 23 | border-radius: 0; 24 | } 25 | 26 | .panel-order-edit .edit-button span { 27 | color: slategray; 28 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/food-command.css: -------------------------------------------------------------------------------- 1 | article { 2 | display: block; 3 | } 4 | 5 | .food-command-container { 6 | position: relative; 7 | vertical-align: top; 8 | display: inline-block; 9 | margin: var(--margin-grid) !important; 10 | width: 260px; 11 | height: 250px; 12 | border: var(--default_line); 13 | border-radius: 3px; 14 | overflow: hidden; 15 | } 16 | 17 | .food-command-container .food-command { 18 | position: relative; 19 | height: 100%;width: 100%; 20 | text-align: center; 21 | } 22 | 23 | .food-command-container .food-command-title { 24 | height: 40px; 25 | padding: 10px; 26 | background-color: var(--fill_color); 27 | } 28 | 29 | .food-command-container .food-command-detail { 30 | height: 70px; 31 | display: block; 32 | margin-top: 10px 33 | } 34 | 35 | .food-command-container .product-notes { 36 | background-color: var(--bg-red); 37 | padding: 5px; 38 | } 39 | 40 | .food-command-container .food-command-footer{ 41 | position: absolute; 42 | bottom: -1px; 43 | height: 40px; 44 | width: 100%; 45 | display: table; 46 | } 47 | 48 | .food-command-container .btn-food-command { 49 | display: block !important; 50 | height: 40px; 51 | margin: 0; 52 | } 53 | 54 | .food-command-container .btn-food-command.status-label { 55 | cursor: default !important; 56 | opacity: 1 !important; 57 | color: white; 58 | } 59 | 60 | .food-command-container .status-label-icon { 61 | font-size: 20px; 62 | } 63 | 64 | .food-command-container .product-notes.empty { 65 | display: none !important; 66 | } 67 | 68 | .food-command-container .alert-time { 69 | animation: alerttime 2s linear infinite; 70 | } 71 | 72 | @keyframes alerttime { 73 | 50% { 74 | opacity: 0.4; 75 | } 76 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/order-buttons.css: -------------------------------------------------------------------------------- 1 | .order-manage-control-buttons{ 2 | position: relative; 3 | width: 100%; 4 | height: 265px; 5 | } 6 | 7 | .order-manage .action-buttons { 8 | width: 100%; 9 | padding-top: 5px; 10 | padding-right: 5px; 11 | padding-left: 5px; 12 | } 13 | 14 | .order-manage .action-buttons .control-button { 15 | -webkit-flex-grow: 1; 16 | flex-grow: 1; 17 | display: inline-block; 18 | line-height: 33px; 19 | min-width: 70px; 20 | text-align: center; 21 | border-radius: 3px; 22 | padding: 0px 5px; 23 | font-size: 16px; 24 | margin-left: 0; 25 | margin-bottom: 0; 26 | cursor: pointer; 27 | overflow: hidden; 28 | transition: all linear 150ms; 29 | } 30 | 31 | .order-manage .action-buttons .control-button.disabled { 32 | display: none; 33 | pointer-events: none !important; 34 | } 35 | 36 | .order-manage .action-buttons .control-button.disabled span { 37 | pointer-events: none !important; 38 | } 39 | 40 | .order-manage .action-buttons .control-button.disabled:hover { 41 | background: #556578; 42 | cursor: not-allowed; 43 | } 44 | 45 | .order-manage .action-buttons .control-button.btn-label { 46 | margin-left: 10px !important; 47 | font-size: 18px; 48 | padding-right: 25px; 49 | } 50 | 51 | 52 | .order-manage .order-container .btn-app { 53 | border-radius: 3px; 54 | position: relative; 55 | min-width: 80px; 56 | width: 100%; 57 | text-align: center; 58 | vertical-align: center; 59 | font-size: 16px; 60 | margin-bottom: 5px !important; 61 | border-top-right-radius: 10px !important; 62 | border: var(--default_line); 63 | padding: 1rem 1rem !important; 64 | } 65 | 66 | .order-manage .badge-tag { 67 | position: absolute; 68 | top: 0; 69 | right: 0; 70 | display: inline-block; 71 | min-width: 10px; 72 | font-size: 12px; 73 | font-weight: 700; 74 | line-height: 1; 75 | text-align: center; 76 | white-space: nowrap; 77 | vertical-align: middle; 78 | border-radius:0 0 0 10px; 79 | background-color: var(--orange); 80 | color: var(--white) !important; 81 | } 82 | 83 | .order-manage .order-container .btn-app .badge-btn { 84 | left: 0; 85 | border-radius:0 0 10px 0; 86 | right: unset !important; 87 | } 88 | 89 | .order-manage .action-buttons .control-button.btn-small { 90 | width: 35px !important; 91 | min-width: 35px !important; 92 | max-width: 35px !important; 93 | } 94 | 95 | .order-manage .action-buttons .control-button.btn-label.warning { 96 | background: rgba(255, 0, 0, 0.49) !important; 97 | } 98 | 99 | .order-manage .order-container .btn-app.btn-order.selected { 100 | background-color: var(--selected_color) !important; 101 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/order-items-container.css: -------------------------------------------------------------------------------- 1 | .container-order-items { 2 | width: 450px; 3 | min-width: 450px !important; 4 | max-width: 450px !important; 5 | } 6 | 7 | .container-order-items .panel-order-items { 8 | top: 0; 9 | height: calc(100% - 334px); 10 | overflow-y: auto; 11 | scroll-behavior: smooth; 12 | } 13 | 14 | .container-order-items .panel-order-edit { 15 | height: 65px; 16 | border-right: var(--default_line); 17 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/order-items.css: -------------------------------------------------------------------------------- 1 | .media.event{ 2 | display: block; 3 | } 4 | 5 | .media.event .card{ 6 | background-color: var(--light-gray) !important; 7 | border: unset; 8 | } 9 | 10 | .media.event .card .card-footer{ 11 | border: unset; 12 | } 13 | 14 | .erp-items { 15 | border-right: var(--default_line); 16 | border-left: var(--default_line); 17 | } 18 | 19 | .panel-order-items { 20 | border-bottom: var(--default_line); 21 | } 22 | 23 | .panel-order-items ul.products-list { 24 | /*height: 330px;*/ 25 | width: 100%; 26 | padding-left: 0; 27 | } 28 | 29 | .panel-order-items ul.products-list li:nth-child(odd) { 30 | background-color: var(--fill_color); 31 | } 32 | 33 | .panel-order-items ul.products-list li { 34 | margin: 0; 35 | padding: 3px 5px; 36 | cursor: pointer; 37 | border-bottom: var(--default_line); 38 | } 39 | 40 | .panel-order-items ul.products-list li.selected { 41 | background-color: var(--selected-color) !important; 42 | } 43 | 44 | .panel-order-items ul.products-list li .form-editor { 45 | max-height: 250px; 46 | overflow-y: auto; 47 | } 48 | 49 | .panel-order-items ul.products-list li:not(.selected) .form-editor { 50 | display: none !important; 51 | } 52 | 53 | .panel-order-items ul.products-list li.selected .form-editor { 54 | display: block; 55 | } 56 | 57 | .panel-order-items .media-body { 58 | -ms-flex: 1; 59 | flex: 1; 60 | } 61 | 62 | .panel-order-items .media .profile_thumb { 63 | border: var(--default_line); 64 | width: 50px; 65 | height: 50px; 66 | margin: 5px 10px 5px 0; 67 | border-radius: 50%; 68 | padding: 9px 12px; 69 | } 70 | 71 | .panel-order-items .media .profile_thumb i { 72 | font-size: 30px; 73 | text-align: center !important; 74 | } 75 | 76 | .panel-order-items .event .media-body a.title { 77 | font-weight: bold; 78 | } 79 | 80 | .panel-order-items .event .media-body p { 81 | margin-bottom: 0; 82 | } 83 | 84 | .panel-order-items a:not([href]):not([tabindex]) { 85 | text-decoration: none; 86 | } 87 | 88 | .panel-order-items .fa { 89 | display: inline-block; 90 | font: normal normal normal 14px/1 FontAwesome; 91 | font-size: inherit; 92 | text-rendering: auto; 93 | -webkit-font-smoothing: antialiased; 94 | -moz-osx-font-smoothing: grayscale; 95 | } 96 | 97 | .panel-order-items a { 98 | text-decoration: none; 99 | background-color: transparent; 100 | } 101 | 102 | .panel-order-items p { 103 | margin-top: 0; 104 | margin-bottom: 1rem; 105 | } 106 | 107 | .panel-order-items .notes { 108 | color: orangered; 109 | } 110 | 111 | .panel-order-items b, strong { 112 | font-weight: bolder; 113 | } 114 | 115 | .panel-order-items .border-aero { 116 | border: var(--default_line) !important; 117 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/order-manage.css: -------------------------------------------------------------------------------- 1 | .order-manage { 2 | position: absolute; 3 | width: 100%; 4 | height: 100%; 5 | overflow-x: auto; 6 | overflow-y: hidden; 7 | } 8 | 9 | .order-manage .order-entry-container { 10 | display: none; 11 | } 12 | .order-manage .order-entry-container { 13 | display: none; 14 | } 15 | 16 | .order-manage .products-list{ 17 | display: none; 18 | padding: 5px !important; 19 | } 20 | 21 | .order-manage .empty-carts{ 22 | display: none; 23 | } 24 | 25 | .order-manage .no-order-message{ 26 | display: block; 27 | } 28 | 29 | .order-manage.has-order .empty-carts{ 30 | display: block; 31 | } 32 | 33 | .order-manage.has-order .no-order-message{ 34 | display: none; 35 | } 36 | 37 | .order-manage.has-order.has-items .no-order-message{ 38 | display: none; 39 | } 40 | 41 | .order-manage.has-order.has-items .products-list{ 42 | display: block; 43 | } 44 | 45 | .order-manage.has-order.has-items .empty-carts{ 46 | display: none; 47 | } 48 | 49 | .order-manage .order-entry-container.active { 50 | display: block; 51 | } 52 | 53 | .order-manage .table { 54 | padding: 0 !important; 55 | margin: 0 !important; 56 | color: var(--text-light) !important; 57 | } 58 | 59 | .order-manage .layout-table { 60 | border: none; 61 | width: 100%; 62 | height: 100% !important; 63 | } 64 | 65 | .order-manage .header-row { 66 | border: none; 67 | width: 100%; 68 | height: 0; 69 | } 70 | 71 | .order-manage .header-cell { 72 | border: none; 73 | width: 100%; 74 | height: 0; 75 | } 76 | 77 | .order-manage .order-manage-buttons { 78 | padding: 0; 79 | text-align: center; 80 | } 81 | 82 | .order-manage .content-row { 83 | width: 100%; 84 | height: 100%; 85 | } 86 | 87 | .order-manage .content-container { 88 | height: 100%; 89 | top: 0; 90 | } 91 | 92 | .order-manage .order-container{ 93 | padding: 3px; 94 | width: auto; 95 | min-width: 90px; 96 | max-width: 90px; 97 | height: calc(100% - 0px); 98 | vertical-align: top; 99 | overflow-y: auto; 100 | } 101 | 102 | -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/process-manage.css: -------------------------------------------------------------------------------- 1 | .process-manage { 2 | position: absolute; 3 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/product-list.css: -------------------------------------------------------------------------------- 1 | .erp-items .product-list { 2 | padding: 0 10px 10px 10px; 3 | text-align: left; 4 | -webkit-transform: translate3d(0, 0, 0); 5 | } 6 | 7 | .erp-items .product { 8 | position: relative; 9 | vertical-align: top; 10 | display: inline-block; 11 | line-height: 100px; 12 | font-size: 11px; 13 | margin: var(--margin-grid) !important; 14 | width: 122px; 15 | height: 115px; 16 | background: #fff; 17 | border: var(--default_line); 18 | border-radius: 3px; 19 | border-bottom-width: 3px; 20 | overflow: hidden; 21 | cursor: pointer; 22 | } 23 | 24 | article { 25 | display: block; 26 | } 27 | 28 | .erp-items .product .product-img { 29 | position: relative; 30 | width: 120px; 31 | height: 100px; 32 | background: white; 33 | text-align: center; 34 | } 35 | 36 | div { 37 | display: block; 38 | } 39 | 40 | .erp-items .product .product-name { 41 | color: var(--gray-dark); 42 | position: absolute; 43 | -webkit-box-sizing: border-box; 44 | -moz-box-sizing: border-box; 45 | -ms-box-sizing: border-box; 46 | box-sizing: border-box; 47 | bottom: 0; 48 | top: auto; 49 | line-height: 14px; 50 | width: 100%; 51 | overflow: hidden; 52 | text-overflow: ellipsis; 53 | background: -webkit-linear-gradient(-90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 1)); 54 | background: -moz-linear-gradient(-90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 1)); 55 | background: -ms-linear-gradient(-90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 1)); 56 | padding: 15px 3px 3px; 57 | } 58 | 59 | .erp-items .product .price-tag { 60 | position: absolute; 61 | top: 2px; 62 | right: 2px; 63 | vertical-align: top; 64 | color: white; 65 | font-size: 16px; 66 | line-height: 13px; 67 | background: var(--gray-500); 68 | padding: 2px 5px; 69 | border-radius: 2px; 70 | } 71 | 72 | .erp-items .product .no-image { 73 | font-size: 6em; 74 | padding-top: 25px; 75 | color: #b0bac2 76 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/restaurant-object.css: -------------------------------------------------------------------------------- 1 | :root{ 2 | --table-border-radius: 7px; 3 | --table-round-border-radius: 50%; 4 | } 5 | .restaurant-manage .floor-map .d-table { 6 | text-align: center; 7 | font-size: 32px !important; 8 | cursor: pointer !important; 9 | transition: background, background-color 300ms ease-in-out; 10 | border-radius: var(--table-border-radius); 11 | border: 1px solid var(--gray); 12 | touch-action: none; 13 | user-select: none; 14 | box-sizing: border-box; 15 | position: absolute; 16 | } 17 | 18 | .restaurant-manage .floor-map .d-table.selected { 19 | cursor: move !important; 20 | z-index: 50; 21 | } 22 | 23 | .floor-map .d-table .resize-handle-container { 24 | width: 100%; 25 | height: 100%; 26 | overflow: hidden; 27 | position: absolute; 28 | border-radius: var(--table-border-radius); 29 | } 30 | 31 | .restaurant-manage .floor-map .d-table.round-type .resize-handle-container { 32 | border-radius: 50%; 33 | } 34 | 35 | .restaurant-manage .floor-map .d-table.round-type { 36 | border-radius: 50%; 37 | } 38 | 39 | .restaurant-manage .floor-map .d-table.drag { 40 | opacity: 0.8; 41 | } 42 | 43 | .restaurant-manage .floor-map .d-table.hide{ 44 | display: none !important; 45 | } 46 | 47 | .restaurant-manage .floor-map .d-table .d-toll-box { 48 | display: none; 49 | } 50 | 51 | .restaurant-manage .floor-map .d-table.selected .d-toll-box { 52 | display: block; 53 | } 54 | 55 | .restaurant-manage .floor-map .d-table.p-center .d-table-seats { 56 | display: none; 57 | } 58 | 59 | .restaurant-manage .floor-map .d-table.p-center .shape-button { 60 | display: none; 61 | } 62 | 63 | .restaurant-manage .floor-map .d-table.selected .d-label { 64 | font-size: 22px; 65 | } 66 | 67 | .restaurant-manage .floor-map .d-table .d-label { 68 | position: relative; 69 | top: 50%; 70 | transform: translate(0, -50%); 71 | text-align: center; 72 | width: 100%; 73 | z-index: 5; 74 | font-weight: 150 !important; 75 | color: var(--white); 76 | } 77 | 78 | .restaurant-manage .floor-map .d-table .d-table-seats { 79 | position: absolute; 80 | display: inline-block; 81 | bottom: 0; 82 | left: 50%; 83 | height: 20px; 84 | width: 40px; 85 | line-height: 20px; 86 | font-size: 16px; 87 | border-radius: 5px; 88 | margin-left: -20px; 89 | margin-bottom: 4px; 90 | background: var(--gray-900); 91 | color: var(--yellow); 92 | opacity: 0.4; 93 | z-index: 3; 94 | } 95 | 96 | .restaurant-manage .floor-map .d-table .order-count { 97 | display: block; 98 | position: absolute; 99 | top: 0; 100 | left: 50%; 101 | background: var(--dark); 102 | color: var(--white); 103 | width: 40px; 104 | margin-top: 1px; 105 | margin-left: -20px; 106 | height: 20px; 107 | line-height: 20px; 108 | border-radius: 5px; 109 | font-size: 16px; 110 | z-index: 10; 111 | } 112 | 113 | .restaurant-manage .floor-map .d-table .order-count.block { 114 | background: red !important; 115 | } 116 | 117 | .restaurant-manage.editing .floor-map .d-table .order-count { 118 | display: none; 119 | } 120 | 121 | .restaurant-manage .floor-map .d-table.selected .resize-handle { 122 | position: absolute; 123 | background: var(--white); 124 | opacity: 0.6; 125 | z-index: 100; 126 | cursor: grab; 127 | } 128 | 129 | .restaurant-manage .floor-map .d-table.selected .resize-handle:hover { 130 | opacity: 0.9; 131 | } 132 | 133 | .restaurant-manage .floor-map .d-table.selected .resize-handle.c { 134 | width: 20px; 135 | height: 20px; 136 | } 137 | 138 | .restaurant-manage .floor-map .d-table.round-type .resize-handle.c { 139 | display: none; 140 | } 141 | 142 | .restaurant-manage .floor-map .d-table .resize-handle.c.nw { 143 | left: 0; top: 0; border-bottom-right-radius: 100%; border-top-left-radius: 5px; 144 | } 145 | 146 | .restaurant-manage .floor-map .d-table .resize-handle.c.ne { 147 | right: 0; top: 0; border-bottom-left-radius: 100%; border-top-right-radius: 5px; 148 | } 149 | 150 | .restaurant-manage .floor-map .d-table .resize-handle.c.se { 151 | right: 0; bottom: -1px; border-top-left-radius: 100%; border-bottom-right-radius: 5px; 152 | } 153 | 154 | .restaurant-manage .floor-map .d-table .resize-handle.c.sw { 155 | left: 0; bottom: -1px; border-top-right-radius: 100%; border-bottom-left-radius: 5px; 156 | } 157 | 158 | .restaurant-manage .floor-map .d-table.selected .resize-handle.b { 159 | border-radius: 50%; 160 | } 161 | 162 | 163 | .restaurant-manage .floor-map .d-table.selected .resize-handle.b.v { 164 | width: 10px; 165 | height: 24px; 166 | top: calc(50% - 12px); 167 | } 168 | 169 | .restaurant-manage .floor-map .d-table.selected .resize-handle.b.h { 170 | width: 24px; 171 | height: 10px; 172 | left: calc(50% - 12px); 173 | } 174 | 175 | .restaurant-manage .floor-map .d-table.selected .resize-handle.b.v.w { 176 | -moz-border-radius: 0 100px 100px 0; 177 | -webkit-border-radius: 0 100px 100px 0; 178 | border-radius: 0 100px 100px 0; 179 | left: 0; 180 | } 181 | .restaurant-manage .floor-map .d-table.selected .resize-handle.b.v.e { 182 | -moz-border-radius: 100px 0 0 100px; 183 | -webkit-border-radius: 100px 0 100px; 184 | border-radius: 100px 0 0 100px; 185 | right: 0; 186 | } 187 | .restaurant-manage .floor-map .d-table.selected .resize-handle.b.h.n { 188 | -moz-border-radius: 0 0 100px 100px; 189 | -webkit-border-radius: 0 0 100px 100px; 190 | border-radius: 0 0 100px 100px; 191 | top: 0; 192 | } 193 | .restaurant-manage .floor-map .d-table.selected .resize-handle.b.h.s { 194 | -moz-border-radius: 100px 100px 0 0; 195 | -webkit-border-radius: 100px 100px 0; 196 | border-radius: 100px 100px 0 0; 197 | bottom: -1px; 198 | } 199 | 200 | .pos .oe_hidden { 201 | display: none !important; 202 | } 203 | 204 | .oe_hidden { 205 | display: none !important; 206 | } 207 | 208 | .restaurant-manage .d-table.selected .d-toll-box { 209 | position: relative; 210 | height: 100%; 211 | width: 10px; 212 | transition: all 150ms linear; 213 | z-index: 50; 214 | display: block; 215 | left: calc(100% + 4px); 216 | } 217 | 218 | .restaurant-manage .d-table .option-button{ 219 | position: absolute; 220 | top: 50%; 221 | transform: translate(0, -50%); 222 | } 223 | 224 | .restaurant-manage .d-table.selected .d-toll-box .option-button .d-table-btn{ 225 | border: var(--default_line); 226 | width: 36px !important; 227 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/css/restaurant-room.css: -------------------------------------------------------------------------------- 1 | /**ROOMS**/ 2 | .restaurant-manage .floor-selector .button { 3 | position: relative; 4 | cursor: pointer; 5 | background-color: var(--fill_color); 6 | -webkit-flex: 1; 7 | flex: 1; 8 | -moz-user-select: none; 9 | -webkit-user-select: none; 10 | -ms-user-select: none; 11 | user-select: none; 12 | color: var(--text-color); 13 | border: var(--default_line) 14 | } 15 | 16 | .restaurant-manage .floor-map .table-container { 17 | height: 100%; 18 | width: 100%; 19 | position: relative; 20 | display: none; 21 | } 22 | 23 | .restaurant-manage .table-container.active{ 24 | display: block; 25 | } 26 | 27 | .restaurant-manage .floor-selector .button.active { 28 | background: var(--selected_color); 29 | color: var(--text-color); 30 | border: 1px solid !important; 31 | border-color: var(--selected_color) !important; 32 | } 33 | 34 | .restaurant-manage .floor-selector .button a{ 35 | margin-right: -3px; 36 | } 37 | 38 | .restaurant-manage .floor-selector .button .badge{ 39 | position: absolute; 40 | top: 0; 41 | right: 0; 42 | display: inline-block; 43 | min-width: 10px; 44 | padding: 3px 7px; 45 | font-size: 12px; 46 | font-weight: 700; 47 | line-height: 1; 48 | text-align: center; 49 | white-space: nowrap; 50 | vertical-align: middle; 51 | border-top-left-radius: 0 !important; 52 | border-top-right-radius: 0 !important; 53 | border-bottom-right-radius: 0 !important; 54 | border-bottom-left-radius: 10px; 55 | } 56 | 57 | .restaurant-manage.editing .button .badge{ 58 | display: none; 59 | } 60 | 61 | .restaurant-manage .floor-selector .edit-bar-room .btn-room{ 62 | border-radius: 0 !important; 63 | font-size: 14px !important; 64 | width: 30px !important; 65 | height: 100% !important; 66 | } 67 | /***ROOMS***/ -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/js/food-command-class.js: -------------------------------------------------------------------------------- 1 | class FoodCommand { 2 | constructor(options) { 3 | Object.assign(this, options); 4 | this.rendered = false; 5 | this.item = null; 6 | this.render(); 7 | RM.object(this.identifier + this.process_manage.identifier, this); 8 | } 9 | 10 | render() { 11 | if (!this.rendered) { 12 | this.action_button = frappe.jshtml({ 13 | tag: "h5", 14 | properties: { 15 | class: `btn btn-default btn-flat btn-food-command`, 16 | style: 'border-radius: 0 !important' 17 | }, 18 | content: '{{text}}', 19 | text: this.data.process_status_data.next_action_message, 20 | }).on("click", () => { 21 | this.execute(); 22 | }, !RM.restrictions.to_change_status_order ? DOUBLE_CLICK : null) 23 | 24 | this.status_label = frappe.jshtml({ 25 | tag: "h5", 26 | properties: { 27 | class: "btn btn-flat btn-food-command status-label", 28 | style: `background-color: ${this.data.process_status_data.color};` 29 | }, 30 | content: ` ${this.data.process_status_data.status_message}`, 31 | }); 32 | 33 | this._time_elapsed = frappe.jshtml({ 34 | tag: "strong", 35 | properties: { 36 | style: "font-size: 25px; left: 100%; position: sticky;" 37 | }, 38 | content: '' 39 | }); 40 | 41 | this.description = frappe.jshtml({ 42 | tag: "span", 43 | content: `${this.data.table_description} | ${this.data.short_name}`, 44 | }); 45 | 46 | this.title = frappe.jshtml({ 47 | tag: "h5", 48 | content: `${this.description.html()} ${this._time_elapsed.html()}`, 49 | }); 50 | 51 | this.item = frappe.jshtml({ 52 | tag: "article", 53 | properties: { 54 | class: "food-command-container" 55 | }, 56 | content: this.template 57 | }); 58 | 59 | $(this.process_manage.command_container()).append( 60 | this.item.html() 61 | ); 62 | 63 | this.rendered = true; 64 | this.show_notes(); 65 | 66 | this.time_elapsed; 67 | } 68 | } 69 | 70 | update_title() { 71 | this.description.val(this.data.table_description + " | " + this.data.short_name); 72 | } 73 | 74 | refresh_html() { 75 | const psd = this.data.process_status_data; 76 | this.update_title(); 77 | this.detail.val(this.html_detail); 78 | this.action_button.val(psd.next_action_message); 79 | 80 | this.show_notes(); 81 | 82 | this.status_label.val( 83 | ` ${psd.status_message}` 84 | ).css([ 85 | { prop: "background-color", value: psd.color } 86 | ]); 87 | } 88 | 89 | execute() { 90 | if (RM.busy_message()) { 91 | return; 92 | } 93 | RM.working(this.data.next_action_message, false); 94 | 95 | frappeHelper.api.call({ 96 | model: "Restaurant Object", 97 | name: this.process_manage.table.data.name, 98 | method: "set_status_command", 99 | args: { 100 | identifier: this.data.identifier 101 | }, 102 | always: () => { 103 | RM.ready(false, "success"); 104 | }, 105 | }); 106 | } 107 | 108 | remove() { 109 | this.item.remove(); 110 | 111 | const items = Object.keys(this.process_manage.items); 112 | 113 | items.forEach((item) => { 114 | if (this.process_manage.items[item].data.identifier === this.data.identifier) { 115 | delete this.process_manage.items[item]; 116 | } 117 | }); 118 | } 119 | 120 | get html_detail() { 121 | return ` 122 |
123 |
124 |
${this.data.qty}
125 |
126 |
127 |
Rate
128 |
${RM.format_currency(this.data.rate)}
129 |
130 |
131 |
Total
132 |
${RM.format_currency(this.data.amount)}
133 |
134 |
135 | ` 136 | } 137 | 138 | get time_elapsed() { 139 | this._time_elapsed.val(RMHelper.prettyDate(this.data.ordered_time, true, time_elapsed => this.show_alert_time_elapsed(time_elapsed))); 140 | } 141 | 142 | show_alert_time_elapsed(time_elapsed) { 143 | const five_minuts = 60 * 5; 144 | const fifteen_minuts = 60 * 15; 145 | 146 | if (time_elapsed <= five_minuts) { 147 | this._time_elapsed.css('color', 'green'); 148 | } else if (time_elapsed > five_minuts && time_elapsed <= fifteen_minuts) { 149 | this._time_elapsed.css('color', 'orange'); 150 | } else if (time_elapsed > fifteen_minuts) { 151 | this._time_elapsed.css('color', 'red'); 152 | this._time_elapsed.add_class('alert-time'); 153 | } 154 | } 155 | 156 | 157 | get template() { 158 | this.detail = frappe.jshtml({ 159 | tag: "div", 160 | properties: { 161 | class: "row food-command-detail" 162 | }, 163 | content: this.html_detail 164 | }); 165 | 166 | this.notes = frappe.jshtml({ 167 | tag: "div", 168 | properties: { class: "row product-notes", style: "display: none;" }, 169 | content: '
{{text}}
', 170 | text: "" 171 | }); 172 | 173 | return ` 174 |
175 |
176 | ${this.title.html()} 177 |
178 | ${this.detail.html()} 179 |
180 |

${this.data.item_name}

181 |
182 |
183 |
184 | ${this.notes.html()} 185 | 193 |
` 194 | } 195 | 196 | show_notes() { 197 | setTimeout(() => { 198 | if (this.notes.obj != null) { 199 | if (typeof this.data.notes == "object" || this.data.notes === "" || this.data.notes === "") { 200 | this.notes.val(__("No annotations")).hide(); 201 | } else { 202 | this.notes.val(this.data.notes).show(); 203 | } 204 | } 205 | }, 0); 206 | } 207 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/js/pay-form-class.js: -------------------------------------------------------------------------------- 1 | class PayForm extends DeskForm { 2 | button_payment = null; 3 | num_pad = null; 4 | payment_methods = {}; 5 | dinners = null; 6 | form_name = "Payment Order"; 7 | has_primary_action = false; 8 | 9 | constructor(options) { 10 | super(options); 11 | 12 | this.doc_name = this.order.data.name; 13 | this.title = this.order.data.name; 14 | this.primary_action = () => { 15 | this.send_payment(); 16 | }; 17 | 18 | this.primary_action_label = __("Pay"); 19 | 20 | super.initialize(); 21 | } 22 | 23 | async make() { 24 | await super.make(); 25 | 26 | this.init_synchronize(); 27 | 28 | setTimeout(() => { 29 | this.make_inputs(); 30 | this.make_pad(); 31 | this.make_payment_button(); 32 | }, 200); 33 | 34 | this.fields_dict.address.df.onchange = () => { 35 | frappe.call({ 36 | method: 'frappe.contacts.doctype.address.address.get_address_display', 37 | args: { 38 | "address_dict": this.get_value("address") 39 | }, 40 | callback: (r) => { 41 | this.set_value("primary_address", r.message); 42 | } 43 | }); 44 | } 45 | } 46 | 47 | init_synchronize() { 48 | frappe.realtime.on("pos_profile_update", () => { 49 | this.hide(); 50 | }); 51 | } 52 | 53 | make_pad() { 54 | this.num_pad = new NumPad({ 55 | on_enter: () => { 56 | this.update_paid_value(); 57 | } 58 | }); 59 | 60 | this.get_field("num_pad").$wrapper.empty().append( 61 | `
62 | ${this.num_pad.html} 63 |
` 64 | ); 65 | 66 | this.get_field("num_pad").$wrapper.parent().parent().css("max-width", "300px"); 67 | this.get_field("payment_methods").$wrapper.parent().parent().removeClass("col-sm-6").addClass("col"); 68 | } 69 | 70 | async reload(){ 71 | await super.reload(null, true); 72 | 73 | this.set_dinners_input(); 74 | this.update_paid_value(); 75 | } 76 | 77 | make_inputs() { 78 | let payment_methods = ""; 79 | RM.pos_profile.payments.forEach(mode_of_payment => { 80 | this.payment_methods[mode_of_payment.mode_of_payment] = frappe.jshtml({ 81 | tag: "input", 82 | properties: { 83 | type: "text", 84 | class: `input-with-feedback form-control bold` 85 | }, 86 | }).on(["change", "keyup"], () => { 87 | this.update_paid_value(); 88 | }).on("click", (obj) => { 89 | this.num_pad.input = obj; 90 | }).float(); 91 | 92 | if (mode_of_payment.default === 1) { 93 | this.payment_methods[mode_of_payment.mode_of_payment].val(this.order.data.amount); 94 | 95 | setTimeout(() => { 96 | this.payment_methods[mode_of_payment.mode_of_payment].select(); 97 | this.num_pad.input = this.payment_methods[mode_of_payment.mode_of_payment]; 98 | }, 200); 99 | } 100 | 101 | payment_methods += this.form_tag ( 102 | mode_of_payment.mode_of_payment, this.payment_methods[mode_of_payment.mode_of_payment] 103 | ); 104 | }); 105 | 106 | this.get_field("payment_methods").$wrapper.empty().append(payment_methods); 107 | 108 | this.set_dinners_input(); 109 | 110 | this.update_paid_value(); 111 | 112 | /*RM.pos_profile.payments.forEach(mode_of_payment => { 113 | console.log(this.payment_methods[mode_of_payment.mode_of_payment]) 114 | });*/ 115 | } 116 | 117 | set_dinners_input(){ 118 | this.dinners = frappe.jshtml({ 119 | tag: "input", 120 | properties: { 121 | type: "text", 122 | class: `input-with-feedback form-control bold` 123 | }, 124 | }).on("click", (obj) => { 125 | this.num_pad.input = obj; 126 | }).val(this.doc.dinners).int(); 127 | 128 | this.get_field("dinners").$wrapper.empty().append( 129 | this.form_tag("Dinners", this.dinners) 130 | ); 131 | 132 | } 133 | 134 | form_tag(label, input) { 135 | return ` 136 |
137 |
138 | 139 |
140 |
141 | ${input.html()} 142 |
143 |
` 144 | } 145 | 146 | make_payment_button() { 147 | this.button_payment = frappe.jshtml({ 148 | tag: "button", 149 | wrapper: this.get_field("payment_button").$wrapper, 150 | properties: { 151 | type: "button", 152 | class: `btn btn-primary btn-lg btn-flat`, 153 | style: "width: 100%; height: 60px;" 154 | }, 155 | content: `{{text}} ${this.order.total_money}`, 156 | text: `${__("Pay")}` 157 | }).on("click", () => { 158 | if (!RM.can_pay) return; 159 | this.button_payment.disable().val(__("Paying")); 160 | this.send_payment(); 161 | }, !RM.restrictions.to_pay ? DOUBLE_CLICK : null).prop("disabled", !RM.can_pay); 162 | } 163 | 164 | get payments_values() { 165 | const payment_values = {}; 166 | RM.pos_profile.payments.forEach((mode_of_payment) => { 167 | let value = this.payment_methods[mode_of_payment.mode_of_payment].float_val; 168 | if (value > 0) { 169 | payment_values[mode_of_payment.mode_of_payment] = value; 170 | } 171 | }); 172 | 173 | return payment_values; 174 | } 175 | 176 | send_payment() { 177 | RM.working("Saving Invoice"); 178 | this.#send_payment(); 179 | } 180 | 181 | reset_payment_button() { 182 | RM.ready(); 183 | if (!RM.can_pay) { 184 | this.button_payment.disable(); 185 | return; 186 | } 187 | this.button_payment.enable().val(__("Pay")).remove_class("btn-warning"); 188 | } 189 | 190 | #send_payment() { 191 | if (!RM.can_pay) return; 192 | const order_manage = this.order.order_manage; 193 | 194 | RM.working("Generating Invoice"); 195 | this.order.data.dinners = this.dinners.val(); 196 | 197 | frappeHelper.api.call({ 198 | model: "Table Order", 199 | name: this.order.data.name, 200 | method: "make_invoice", 201 | args: { 202 | mode_of_payment: this.payments_values, 203 | customer: this.get_value("customer"), 204 | dinners: this.dinners.float_val 205 | }, 206 | always: (r) => { 207 | RM.ready(); 208 | 209 | if (r.message && r.message.status) { 210 | order_manage.clear_current_order(); 211 | order_manage.check_buttons_status(); 212 | order_manage.check_item_editor_status(); 213 | 214 | this.hide(); 215 | this.print(r.message.invoice_name); 216 | order_manage.make_orders(); 217 | } else { 218 | this.reset_payment_button(); 219 | } 220 | }, 221 | freeze: true 222 | }); 223 | } 224 | 225 | print(invoice_name) { 226 | if (!RM.can_pay) return; 227 | 228 | const title = invoice_name + " (" + __("Print") + ")"; 229 | const order_manage = this.order.order_manage; 230 | 231 | const props = { 232 | model: "POS Invoice", 233 | model_name: invoice_name, 234 | args: { 235 | format: RM.pos_profile.print_format, 236 | _lang: RM.lang, 237 | no_letterhead: RM.pos_profile.letter_head || 1, 238 | letterhead: RM.pos_profile.letter_head || 'No%20Letterhead' 239 | }, 240 | from_server: true, 241 | set_buttons: true, 242 | is_pdf: true, 243 | customize: true, 244 | title: title 245 | }; 246 | 247 | if (order_manage.print_modal) { 248 | order_manage.print_modal.set_props(props); 249 | order_manage.print_modal.set_title(title); 250 | order_manage.print_modal.reload().show(); 251 | } else { 252 | order_manage.print_modal = new DeskModal(props); 253 | } 254 | } 255 | 256 | update_paid_value() { 257 | let total = 0; 258 | 259 | setTimeout(() => { 260 | Object.keys(this.payment_methods).forEach((payment_method) => { 261 | total += this.payment_methods[payment_method].float_val; 262 | }); 263 | 264 | this.set_value("total_payment", total); 265 | this.set_value("change_amount", (total - this.order.amount)); 266 | }, 0); 267 | } 268 | } 269 | -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/js/process-manage-class.js: -------------------------------------------------------------------------------- 1 | ProcessManage = class ProcessManage { 2 | constructor(options) { 3 | Object.assign(this, options); 4 | this.status = "close"; 5 | this.modal = null; 6 | this.items = {}; 7 | this.command_container_name = this.table.data.name + "-command_container"; 8 | this.new_items_keys = []; 9 | 10 | this.initialize(); 11 | } 12 | 13 | reload() { 14 | this.get_commands_food(); 15 | } 16 | 17 | initialize() { 18 | this.title = this.table.room.data.description + " (" + this.table.data.description + ")"; 19 | if (this.modal == null) { 20 | this.modal = RMHelper.default_full_modal(this.title, () => this.make()); 21 | } else { 22 | this.show(); 23 | } 24 | } 25 | 26 | show() { 27 | this.modal.show(); 28 | } 29 | 30 | is_open() { 31 | return this.modal.modal.display; 32 | } 33 | 34 | close() { 35 | this.modal.hide(); 36 | this.status = "close"; 37 | } 38 | 39 | make() { 40 | this.make_dom(); 41 | this.get_commands_food(); 42 | } 43 | 44 | make_dom() { 45 | this.modal.container.empty().append(this.template()); 46 | this.modal.title_container.empty().append( 47 | RMHelper.return_main_button(this.title, () => this.modal.hide()).html() 48 | ); 49 | } 50 | 51 | template() { 52 | return ` 53 |
54 |
55 |
`; 56 | } 57 | 58 | get_commands_food() { 59 | RM.working("Load commands food"); 60 | frappeHelper.api.call({ 61 | model: "Restaurant Object", 62 | name: this.table.data.name, 63 | method: "commands_food", 64 | args: {}, 65 | always: (r) => { 66 | RM.ready(); 67 | this.make_food_commands(r.message); 68 | }, 69 | }); 70 | } 71 | 72 | make_food_commands(items = []) { 73 | const _items = Object.keys(this.items); 74 | this.new_items_keys = []; 75 | 76 | items.forEach((item) => { 77 | this.new_items_keys.push(item.identifier); 78 | 79 | if (_items.includes(item.identifier)) { 80 | this.items[item.identifier].data = item; 81 | } else { 82 | this.add_item(item); 83 | } 84 | 85 | this.items[item.identifier].process_manage = this; 86 | }); 87 | 88 | setTimeout(() => { 89 | this.debug_items(); 90 | }, 100); 91 | 92 | this.time_elapsed(); 93 | } 94 | 95 | time_elapsed() { 96 | setInterval(() => { 97 | this.in_items(item => { 98 | item.time_elapsed 99 | }); 100 | }, 1000); 101 | } 102 | 103 | in_items(f) { 104 | Object.keys(this.items).forEach(k => { 105 | f(this.items[k]); 106 | }) 107 | } 108 | 109 | check_items(items) { 110 | items.forEach((item) => { 111 | this.check_item(item); 112 | }); 113 | } 114 | 115 | check_item(item) { 116 | if (Object.keys(this.items).includes(item.identifier)) { 117 | const _item = this.items[item.identifier]; 118 | if (this.include_status(item.status)) { 119 | _item.data = item; 120 | _item.refresh_html(); 121 | } else { 122 | _item.remove(); 123 | } 124 | } else { 125 | if (this.include_status(item.status) && this.include_item_group(item.item_group)) { 126 | this.new_items_keys.push(item.identifier); 127 | this.add_item(item); 128 | } 129 | } 130 | } 131 | 132 | debug_items() { 133 | Object.keys(this.items).filter(x => !this.new_items_keys.includes(x)).forEach((r) => { 134 | this.items[r].remove(); 135 | }); 136 | } 137 | 138 | remove_item(item) { 139 | if (this.items[item]) { 140 | this.items[item].remove(); 141 | } 142 | } 143 | 144 | add_item(item) { 145 | this.items[item.identifier] = new FoodCommand({ 146 | identifier: item.identifier, 147 | process_manage: this, 148 | data: item 149 | }); 150 | } 151 | 152 | include_status(status) { 153 | return this.table.data.status_managed.includes(status); 154 | } 155 | 156 | include_item_group(item_group) { 157 | return this.table.data.items_group.includes(item_group); 158 | } 159 | 160 | container() { 161 | return $(`#orders-${this.table.data.name}`); 162 | } 163 | 164 | command_container() { 165 | return document.getElementById(this.command_container_name); 166 | } 167 | } -------------------------------------------------------------------------------- /restaurant_management/public/restaurant/js/restaurant-room-class.js: -------------------------------------------------------------------------------- 1 | class RestaurantRoom extends ObjectManage { 2 | constructor(data) { 3 | super(data); 4 | 5 | this.identifier = data.identifier; 6 | this.edit_form = null; 7 | this.data = data; 8 | this.init_synchronize(); 9 | this.render(); 10 | } 11 | 12 | init_synchronize() { 13 | frappe.realtime.on(this.data.name, (data) => { 14 | if (data.action === "Notifications") { 15 | this.data.orders_count = data.orders_count; 16 | this.reset_html(); 17 | } else if (data.action === ADD) { 18 | if (this.data.name === RM.current_room.data.name) { 19 | this.append_table(data.table, true); 20 | } 21 | } else if (data.action === DELETE) { 22 | this.unselect_all_tables(); 23 | if ( 24 | RM.current_room != null && 25 | RM.current_room.data.name === this.data.name 26 | ) { 27 | RM.delete_current_room(); 28 | } 29 | this.obj.remove(); 30 | } else if (data.action === UPDATE) { 31 | this.data = data.data; 32 | this.reset_html(); 33 | } 34 | }); 35 | } 36 | 37 | remove() { 38 | this.obj.remove(); 39 | this.tables_container.remove(); 40 | } 41 | 42 | make_objects(tables = []) { 43 | tables.forEach((table, index) => { 44 | table.index = index; 45 | 46 | this.append_table(table); 47 | }); 48 | } 49 | 50 | append_table(table, adding = false) { 51 | super.append_child({ 52 | child: table, 53 | exist: t => { 54 | t.reset_data(table); 55 | if (!adding) t.show(); 56 | }, 57 | not_exist: () => { 58 | return new RestaurantObject(this, table); 59 | }, 60 | always: t => { 61 | if (RM.editing && adding && t) { 62 | setTimeout(() => { 63 | t.select(); 64 | this.resize_container(t); 65 | }, 0); 66 | } 67 | } 68 | }); 69 | } 70 | 71 | resize_container(obj) { 72 | let dsy = this.obj_max_heigth; 73 | let dsx = this.obj_max_width; 74 | 75 | if (dsx == null || obj.absolute_width > dsx.absolute_width) { 76 | this.obj_max_width = obj; 77 | dsx = obj; 78 | } 79 | 80 | if (dsy == null || obj.absolute_height > dsy.absolute_height) { 81 | this.obj_max_heigth = obj; 82 | dsy = obj; 83 | } 84 | 85 | obj.room.tables_container.css([{ 86 | prop: "min-width", 87 | value: dsx.absolute_width + 35 + "px", 88 | }, 89 | { 90 | prop: "min-height", 91 | value: dsy.absolute_height + "px", 92 | } 93 | ]); 94 | } 95 | 96 | render() { 97 | this.tables_container = frappe.jshtml({ 98 | tag: "div", 99 | properties: { 100 | class: "table-container", 101 | } 102 | }).on("click", () => { 103 | RM.unselect_all_tables(); 104 | }); 105 | 106 | this.obj = frappe.jshtml({ 107 | tag: "div", 108 | properties: { 109 | class: "btn-default button room", 110 | }, 111 | content: this.template, 112 | }).on("click", () => { 113 | this.select(); 114 | }); 115 | RM.rooms_container.append(this.obj.html()); 116 | RM.floor_map.append(this.tables_container.html()); 117 | } 118 | 119 | get template() { 120 | this.indicator = frappe.jshtml({ 121 | tag: "span", 122 | properties: { 123 | class: `badge ${this.data.orders_count > 0 ? "bg-yellow" : "bg-none"}`, 124 | }, 125 | content: this.data.orders_count, 126 | }); 127 | 128 | this.description = frappe.jshtml({ 129 | tag: "span", 130 | content: this.data.description, 131 | }); 132 | 133 | return ` ${this.description.html()}${this.indicator.html()}`; 134 | } 135 | 136 | select() { 137 | this.obj.toggle_common("button.room", "active"); 138 | this.tables_container.toggle_common("table-container", "active"); 139 | RM.set_current_room(this); 140 | this.get_tables(); 141 | } 142 | 143 | in_tables(f, condition = null) { 144 | super.in_childs((t, key) => { 145 | if (condition == null || condition.value === t.data[condition.field]) { 146 | f(t, key); 147 | } 148 | }); 149 | } 150 | 151 | hide_tables() { 152 | this.in_tables(t => { 153 | t.hide(); 154 | }); 155 | } 156 | 157 | unselect_all_tables() { 158 | this.in_tables(t => { 159 | t.unselect(true); 160 | }); 161 | } 162 | 163 | edit() { 164 | if (this.edit_form == null) { 165 | this.edit_form = new DeskForm({ 166 | doc_name: this.data.name, 167 | form_name: "Restaurant Room", 168 | callback: () => { 169 | this.edit_form.hide(); 170 | }, 171 | title: __("Update Room"), 172 | field_properties: { 173 | type: { 174 | read_only: true, 175 | }, 176 | room: { 177 | hidden: true, 178 | } 179 | }, 180 | }); 181 | } else { 182 | this.edit_form.reload(); 183 | this.edit_form.show(); 184 | } 185 | } 186 | 187 | delete() { 188 | if (RM.busy_message()) { 189 | return; 190 | } 191 | RM.working("Deleting Room"); 192 | frappeHelper.api.call({ 193 | model: "Restaurant Object", 194 | name: this.data.name, 195 | method: "_delete", 196 | always: (r) => { 197 | RM.ready(); 198 | }, 199 | freeze: false, 200 | }); 201 | } 202 | 203 | show_tables() { 204 | this.in_tables(t => { 205 | t.show(); 206 | }); 207 | } 208 | 209 | get_tables() { 210 | RM.working("Loading Objects"); 211 | frappeHelper.api.call({ 212 | model: "Restaurant Object", 213 | name: this.data.name, 214 | method: "get_objects", 215 | args: {}, 216 | always: (r) => { 217 | this.make_objects(r.message); 218 | RM.ready(); 219 | }, 220 | freeze: false, 221 | }); 222 | } 223 | 224 | add_object(t) { 225 | RM.working("Adding Table"); 226 | frappeHelper.api.call({ 227 | model: "Restaurant Object", 228 | name: this.data.name, 229 | method: "add_object", 230 | args: { 231 | t: t, 232 | }, 233 | always: () => { 234 | RM.ready(); 235 | }, 236 | }); 237 | } 238 | 239 | reset_html() { 240 | this.indicator.val(this.data.orders_count); 241 | this.description.val(this.data.description); 242 | 243 | if (flt(this.data.orders_count) > 0) { 244 | this.indicator.remove_class("bg-none").add_class("bg-yellow"); 245 | } else { 246 | this.indicator.remove_class("bg-yellow").add_class("bg-none"); 247 | } 248 | } 249 | 250 | update_notifications(data) { 251 | this.data.orders_count = data; 252 | this.indicator.val(data); 253 | 254 | if (flt(data) > 0) { 255 | this.indicator.remove_class("bg-none").add_class("bg-yellow"); 256 | } else { 257 | this.indicator.remove_class("bg-yellow").add_class("bg-none"); 258 | } 259 | } 260 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_editor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/order_item_editor/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_editor/order_item_editor.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_editor/order_item_editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 0, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 20:03:28.920147", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 0, 13 | "collapsible": 0, 14 | "extra_field": 0, 15 | "fetch_if_empty": 0, 16 | "fieldname": "item_code", 17 | "fieldtype": "Link", 18 | "hidden": 0, 19 | "label": "Item Code", 20 | "max_length": 0, 21 | "max_value": 0, 22 | "options": "Item", 23 | "read_only": 0, 24 | "reqd": 1, 25 | "show_in_filter": 0 26 | }, 27 | { 28 | "allow_read_on_all_link_options": 0, 29 | "collapsible": 0, 30 | "extra_field": 0, 31 | "fetch_if_empty": 0, 32 | "fieldname": "qty", 33 | "fieldtype": "Float", 34 | "hidden": 0, 35 | "label": "Qty", 36 | "max_length": 0, 37 | "max_value": 0, 38 | "read_only": 0, 39 | "reqd": 0, 40 | "show_in_filter": 0 41 | }, 42 | { 43 | "allow_read_on_all_link_options": 0, 44 | "collapsible": 0, 45 | "extra_field": 0, 46 | "fetch_if_empty": 0, 47 | "fieldname": "discount_percentage", 48 | "fieldtype": "Float", 49 | "hidden": 0, 50 | "label": "Discount Percentage", 51 | "max_length": 0, 52 | "max_value": 0, 53 | "read_only": 0, 54 | "reqd": 0, 55 | "show_in_filter": 0 56 | }, 57 | { 58 | "allow_read_on_all_link_options": 0, 59 | "collapsible": 0, 60 | "extra_field": 0, 61 | "fetch_if_empty": 0, 62 | "fieldname": "item_tax_rate", 63 | "fieldtype": "Read Only", 64 | "hidden": 0, 65 | "label": "Item Tax Rate", 66 | "max_length": 0, 67 | "max_value": 0, 68 | "read_only": 0, 69 | "reqd": 0, 70 | "show_in_filter": 0 71 | }, 72 | { 73 | "allow_read_on_all_link_options": 0, 74 | "collapsible": 0, 75 | "extra_field": 0, 76 | "fetch_if_empty": 0, 77 | "fieldname": "price_list_rate", 78 | "fieldtype": "Currency", 79 | "hidden": 0, 80 | "label": "Price List Rate", 81 | "max_length": 0, 82 | "max_value": 0, 83 | "read_only": 0, 84 | "reqd": 0, 85 | "show_in_filter": 0 86 | }, 87 | { 88 | "allow_read_on_all_link_options": 0, 89 | "collapsible": 0, 90 | "extra_field": 0, 91 | "fetch_if_empty": 0, 92 | "fieldname": "has_batch_no", 93 | "fieldtype": "Check", 94 | "hidden": 0, 95 | "label": "Has Batch No", 96 | "max_length": 0, 97 | "max_value": 0, 98 | "options": "", 99 | "read_only": 0, 100 | "reqd": 0, 101 | "show_in_filter": 0 102 | }, 103 | { 104 | "allow_read_on_all_link_options": 0, 105 | "collapsible": 0, 106 | "extra_field": 0, 107 | "fetch_if_empty": 0, 108 | "fieldname": "batch_no", 109 | "fieldtype": "Link", 110 | "hidden": 0, 111 | "label": "Batch No", 112 | "max_length": 0, 113 | "max_value": 0, 114 | "options": "Batch", 115 | "read_only": 0, 116 | "reqd": 0, 117 | "show_in_filter": 0 118 | }, 119 | { 120 | "allow_read_on_all_link_options": 0, 121 | "collapsible": 0, 122 | "extra_field": 0, 123 | "fetch_if_empty": 0, 124 | "fieldname": "", 125 | "fieldtype": "Column Break", 126 | "hidden": 0, 127 | "max_length": 0, 128 | "max_value": 0, 129 | "read_only": 0, 130 | "reqd": 0, 131 | "show_in_filter": 0 132 | }, 133 | { 134 | "allow_read_on_all_link_options": 0, 135 | "collapsible": 0, 136 | "extra_field": 0, 137 | "fetch_if_empty": 0, 138 | "fieldname": "rate", 139 | "fieldtype": "Currency", 140 | "hidden": 0, 141 | "label": "Rate", 142 | "max_length": 0, 143 | "max_value": 0, 144 | "read_only": 0, 145 | "reqd": 1, 146 | "show_in_filter": 0 147 | }, 148 | { 149 | "allow_read_on_all_link_options": 0, 150 | "collapsible": 0, 151 | "extra_field": 0, 152 | "fetch_if_empty": 0, 153 | "fieldname": "amount", 154 | "fieldtype": "Currency", 155 | "hidden": 0, 156 | "label": "Amount", 157 | "max_length": 0, 158 | "max_value": 0, 159 | "read_only": 0, 160 | "reqd": 0, 161 | "show_in_filter": 0 162 | }, 163 | { 164 | "allow_read_on_all_link_options": 0, 165 | "collapsible": 0, 166 | "extra_field": 0, 167 | "fetch_if_empty": 0, 168 | "fieldname": "discount_amount", 169 | "fieldtype": "Currency", 170 | "hidden": 0, 171 | "label": "Discount Amount", 172 | "max_length": 0, 173 | "max_value": 0, 174 | "read_only": 0, 175 | "reqd": 0, 176 | "show_in_filter": 0 177 | }, 178 | { 179 | "allow_read_on_all_link_options": 0, 180 | "collapsible": 0, 181 | "extra_field": 0, 182 | "fetch_if_empty": 0, 183 | "fieldname": "tax_amount", 184 | "fieldtype": "Currency", 185 | "hidden": 0, 186 | "label": "Tax Amount", 187 | "max_length": 0, 188 | "max_value": 0, 189 | "read_only": 0, 190 | "reqd": 0, 191 | "show_in_filter": 0 192 | }, 193 | { 194 | "allow_read_on_all_link_options": 0, 195 | "collapsible": 0, 196 | "extra_field": 0, 197 | "fetch_if_empty": 0, 198 | "fieldname": "valuation_rate", 199 | "fieldtype": "Currency", 200 | "hidden": 0, 201 | "label": "Valuation Rate", 202 | "max_length": 0, 203 | "max_value": 0, 204 | "read_only": 0, 205 | "reqd": 0, 206 | "show_in_filter": 0 207 | }, 208 | { 209 | "allow_read_on_all_link_options": 0, 210 | "collapsible": 0, 211 | "extra_field": 0, 212 | "fetch_if_empty": 0, 213 | "fieldname": "has_serial_no", 214 | "fieldtype": "Check", 215 | "hidden": 0, 216 | "label": "Has Serial No", 217 | "max_length": 0, 218 | "max_value": 0, 219 | "read_only": 0, 220 | "reqd": 0, 221 | "show_in_filter": 0 222 | }, 223 | { 224 | "allow_read_on_all_link_options": 0, 225 | "collapsible": 0, 226 | "extra_field": 0, 227 | "fetch_if_empty": 0, 228 | "fieldname": "serial_no", 229 | "fieldtype": "Link", 230 | "hidden": 0, 231 | "label": "Serial No", 232 | "max_length": 0, 233 | "max_value": 0, 234 | "options": "Serial No", 235 | "read_only": 0, 236 | "reqd": 0, 237 | "show_in_filter": 0 238 | }, 239 | { 240 | "allow_read_on_all_link_options": 0, 241 | "collapsible": 0, 242 | "extra_field": 0, 243 | "fetch_if_empty": 0, 244 | "fieldname": "", 245 | "fieldtype": "Section Break", 246 | "hidden": 0, 247 | "max_length": 0, 248 | "max_value": 0, 249 | "read_only": 0, 250 | "reqd": 0, 251 | "show_in_filter": 0 252 | }, 253 | { 254 | "allow_read_on_all_link_options": 0, 255 | "collapsible": 0, 256 | "extra_field": 0, 257 | "fetch_if_empty": 0, 258 | "fieldname": "notes", 259 | "fieldtype": "Text", 260 | "hidden": 0, 261 | "label": "Notes", 262 | "max_length": 0, 263 | "max_value": 0, 264 | "read_only": 0, 265 | "reqd": 0, 266 | "show_in_filter": 0 267 | } 268 | ], 269 | "doc_type": "Order Entry Item", 270 | "docstatus": 0, 271 | "doctype": "Desk Form", 272 | "idx": 0, 273 | "is_standard": 1, 274 | "login_required": 1, 275 | "max_attachment_size": 0, 276 | "modified": "2023-01-07 20:51:23.174679", 277 | "modified_by": "Administrator", 278 | "module": "Restaurant Management", 279 | "name": "order-item-editor", 280 | "owner": "Administrator", 281 | "published": 1, 282 | "route": "order-item-editor", 283 | "route_to_success_link": 0, 284 | "show_attachments": 0, 285 | "show_in_grid": 0, 286 | "success_url": "/order-item-editor", 287 | "title": "Order Item Editor" 288 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_editor/order_item_editor.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_note/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/order_item_note/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_note/order_item_note.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_note/order_item_note.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:44.857962", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "depends_on": "", 16 | "description": "", 17 | "extra_field": 0, 18 | "fetch_if_empty": 0, 19 | "fieldname": "notes", 20 | "fieldtype": "Text", 21 | "hidden": 0, 22 | "label": "Notes", 23 | "max_length": 0, 24 | "max_value": 0, 25 | "read_only": 0, 26 | "reqd": 0, 27 | "show_in_filter": 0 28 | } 29 | ], 30 | "doc_type": "Order Entry Item", 31 | "docstatus": 0, 32 | "doctype": "Desk Form", 33 | "idx": 0, 34 | "is_standard": 1, 35 | "login_required": 1, 36 | "max_attachment_size": 0, 37 | "modified": "2023-01-07 20:51:23.321756", 38 | "modified_by": "Administrator", 39 | "module": "Restaurant Management", 40 | "name": "order-item-note", 41 | "owner": "Administrator", 42 | "published": 1, 43 | "route": "order-item-note", 44 | "route_to_success_link": 0, 45 | "show_attachments": 0, 46 | "show_in_grid": 0, 47 | "title": "Order Item Note" 48 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/order_item_note/order_item_note.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/payment_order/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/payment_order/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/payment_order/payment_order.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/payment_order/payment_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:44.791806", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "description": "", 16 | "extra_field": 0, 17 | "fetch_if_empty": 0, 18 | "fieldname": "customer", 19 | "fieldtype": "Link", 20 | "hidden": 0, 21 | "label": "Customer", 22 | "max_length": 0, 23 | "max_value": 0, 24 | "options": "Customer", 25 | "read_only": 0, 26 | "reqd": 0, 27 | "show_in_filter": 0 28 | }, 29 | { 30 | "allow_read_on_all_link_options": 1, 31 | "collapsible": 0, 32 | "default": "", 33 | "depends_on": "", 34 | "description": "", 35 | "extra_field": 0, 36 | "fetch_if_empty": 0, 37 | "fieldtype": "Column Break", 38 | "hidden": 0, 39 | "max_length": 0, 40 | "max_value": 0, 41 | "read_only": 0, 42 | "reqd": 0, 43 | "show_in_filter": 0 44 | }, 45 | { 46 | "allow_read_on_all_link_options": 1, 47 | "collapsible": 0, 48 | "default": "", 49 | "depends_on": "", 50 | "description": "", 51 | "extra_field": 0, 52 | "fetch_if_empty": 0, 53 | "fieldname": "dinners", 54 | "fieldtype": "HTML", 55 | "hidden": 0, 56 | "label": "Dinners Number", 57 | "max_length": 0, 58 | "max_value": 0, 59 | "read_only": 0, 60 | "reqd": 0, 61 | "show_in_filter": 0 62 | }, 63 | { 64 | "allow_read_on_all_link_options": 0, 65 | "collapsible": 0, 66 | "extra_field": 0, 67 | "fetch_if_empty": 0, 68 | "fieldname": "delivery_options", 69 | "fieldtype": "Section Break", 70 | "hidden": 1, 71 | "label": "Delivery Options", 72 | "max_length": 0, 73 | "max_value": 0, 74 | "read_only": 0, 75 | "reqd": 0, 76 | "show_in_filter": 0 77 | }, 78 | { 79 | "allow_read_on_all_link_options": 0, 80 | "collapsible": 0, 81 | "extra_field": 1, 82 | "fetch_if_empty": 0, 83 | "fieldname": "address", 84 | "fieldtype": "Link", 85 | "hidden": 0, 86 | "label": "Address", 87 | "max_length": 0, 88 | "max_value": 0, 89 | "options": "Address", 90 | "read_only": 0, 91 | "reqd": 0, 92 | "show_in_filter": 0 93 | }, 94 | { 95 | "allow_read_on_all_link_options": 0, 96 | "collapsible": 0, 97 | "extra_field": 1, 98 | "fetch_if_empty": 0, 99 | "fieldname": "primary_address", 100 | "fieldtype": "Text", 101 | "hidden": 0, 102 | "label": "Primary Address", 103 | "max_length": 0, 104 | "max_value": 0, 105 | "read_only": 1, 106 | "reqd": 0, 107 | "show_in_filter": 0 108 | }, 109 | { 110 | "allow_read_on_all_link_options": 0, 111 | "collapsible": 0, 112 | "extra_field": 0, 113 | "fetch_if_empty": 0, 114 | "fieldname": "", 115 | "fieldtype": "Column Break", 116 | "hidden": 0, 117 | "max_length": 0, 118 | "max_value": 0, 119 | "read_only": 0, 120 | "reqd": 0, 121 | "show_in_filter": 0 122 | }, 123 | { 124 | "allow_read_on_all_link_options": 0, 125 | "collapsible": 0, 126 | "extra_field": 1, 127 | "fetch_from": "address.posa_delivery_charges", 128 | "fetch_if_empty": 0, 129 | "fieldname": "delivery_charges", 130 | "fieldtype": "Read Only", 131 | "hidden": 0, 132 | "label": "Delivery Charges", 133 | "max_length": 0, 134 | "max_value": 0, 135 | "options": "", 136 | "read_only": 1, 137 | "reqd": 0, 138 | "show_in_filter": 0 139 | }, 140 | { 141 | "allow_read_on_all_link_options": 1, 142 | "collapsible": 0, 143 | "default": "", 144 | "depends_on": "", 145 | "description": "", 146 | "extra_field": 0, 147 | "fetch_if_empty": 0, 148 | "fieldtype": "Section Break", 149 | "hidden": 0, 150 | "max_length": 0, 151 | "max_value": 0, 152 | "read_only": 0, 153 | "reqd": 0, 154 | "show_in_filter": 0 155 | }, 156 | { 157 | "allow_read_on_all_link_options": 1, 158 | "collapsible": 0, 159 | "default": "", 160 | "depends_on": "", 161 | "description": "", 162 | "extra_field": 0, 163 | "fetch_if_empty": 0, 164 | "fieldname": "payment_methods", 165 | "fieldtype": "HTML", 166 | "hidden": 0, 167 | "label": "Payment Methods", 168 | "max_length": 0, 169 | "max_value": 0, 170 | "read_only": 0, 171 | "reqd": 0, 172 | "show_in_filter": 0 173 | }, 174 | { 175 | "allow_read_on_all_link_options": 1, 176 | "collapsible": 0, 177 | "default": "", 178 | "depends_on": "", 179 | "description": "", 180 | "extra_field": 0, 181 | "fetch_if_empty": 0, 182 | "fieldtype": "Column Break", 183 | "hidden": 0, 184 | "max_length": 0, 185 | "max_value": 0, 186 | "read_only": 0, 187 | "reqd": 0, 188 | "show_in_filter": 0 189 | }, 190 | { 191 | "allow_read_on_all_link_options": 1, 192 | "collapsible": 0, 193 | "default": "", 194 | "depends_on": "", 195 | "description": "", 196 | "extra_field": 0, 197 | "fetch_if_empty": 0, 198 | "fieldname": "num_pad", 199 | "fieldtype": "HTML", 200 | "hidden": 0, 201 | "label": "Num Pad", 202 | "max_length": 0, 203 | "max_value": 0, 204 | "read_only": 0, 205 | "reqd": 0, 206 | "show_in_filter": 0 207 | }, 208 | { 209 | "allow_read_on_all_link_options": 1, 210 | "collapsible": 0, 211 | "default": "", 212 | "depends_on": "", 213 | "description": "", 214 | "extra_field": 0, 215 | "fetch_if_empty": 0, 216 | "fieldtype": "Section Break", 217 | "hidden": 0, 218 | "max_length": 0, 219 | "max_value": 0, 220 | "read_only": 0, 221 | "reqd": 0, 222 | "show_in_filter": 0 223 | }, 224 | { 225 | "allow_read_on_all_link_options": 1, 226 | "collapsible": 0, 227 | "default": "", 228 | "depends_on": "", 229 | "description": "", 230 | "extra_field": 1, 231 | "fetch_if_empty": 0, 232 | "fieldname": "total_payment", 233 | "fieldtype": "Currency", 234 | "hidden": 0, 235 | "label": "Total Payment", 236 | "max_length": 0, 237 | "max_value": 0, 238 | "read_only": 1, 239 | "reqd": 0, 240 | "show_in_filter": 0 241 | }, 242 | { 243 | "allow_read_on_all_link_options": 1, 244 | "collapsible": 0, 245 | "default": "", 246 | "depends_on": "", 247 | "description": "", 248 | "extra_field": 0, 249 | "fetch_if_empty": 0, 250 | "fieldtype": "Column Break", 251 | "hidden": 0, 252 | "max_length": 0, 253 | "max_value": 0, 254 | "read_only": 0, 255 | "reqd": 0, 256 | "show_in_filter": 0 257 | }, 258 | { 259 | "allow_read_on_all_link_options": 1, 260 | "collapsible": 0, 261 | "default": "", 262 | "depends_on": "", 263 | "description": "", 264 | "extra_field": 1, 265 | "fetch_if_empty": 0, 266 | "fieldname": "change_amount", 267 | "fieldtype": "Currency", 268 | "hidden": 0, 269 | "label": "Change Amount", 270 | "max_length": 0, 271 | "max_value": 0, 272 | "read_only": 1, 273 | "reqd": 0, 274 | "show_in_filter": 0 275 | }, 276 | { 277 | "allow_read_on_all_link_options": 1, 278 | "collapsible": 0, 279 | "default": "", 280 | "depends_on": "", 281 | "description": "", 282 | "extra_field": 0, 283 | "fetch_if_empty": 0, 284 | "fieldtype": "Section Break", 285 | "hidden": 0, 286 | "max_length": 0, 287 | "max_value": 0, 288 | "read_only": 0, 289 | "reqd": 0, 290 | "show_in_filter": 0 291 | }, 292 | { 293 | "allow_read_on_all_link_options": 1, 294 | "collapsible": 0, 295 | "default": "", 296 | "description": "", 297 | "extra_field": 0, 298 | "fetch_if_empty": 0, 299 | "fieldname": "amount", 300 | "fieldtype": "Currency", 301 | "hidden": 0, 302 | "label": "Amount", 303 | "max_length": 0, 304 | "max_value": 0, 305 | "read_only": 1, 306 | "reqd": 1, 307 | "show_in_filter": 0 308 | }, 309 | { 310 | "allow_read_on_all_link_options": 1, 311 | "collapsible": 0, 312 | "default": "", 313 | "depends_on": "", 314 | "description": "", 315 | "extra_field": 0, 316 | "fetch_if_empty": 0, 317 | "fieldtype": "Column Break", 318 | "hidden": 0, 319 | "max_length": 0, 320 | "max_value": 0, 321 | "read_only": 0, 322 | "reqd": 0, 323 | "show_in_filter": 0 324 | }, 325 | { 326 | "allow_read_on_all_link_options": 1, 327 | "collapsible": 0, 328 | "default": "", 329 | "depends_on": "", 330 | "description": "", 331 | "extra_field": 0, 332 | "fetch_if_empty": 0, 333 | "fieldname": "payment_button", 334 | "fieldtype": "HTML", 335 | "hidden": 0, 336 | "label": "Payment Button", 337 | "max_length": 0, 338 | "max_value": 0, 339 | "read_only": 0, 340 | "reqd": 0, 341 | "show_in_filter": 0 342 | } 343 | ], 344 | "doc_type": "Table Order", 345 | "docstatus": 0, 346 | "doctype": "Desk Form", 347 | "idx": 0, 348 | "is_standard": 1, 349 | "login_required": 1, 350 | "max_attachment_size": 0, 351 | "modified": "2023-01-07 20:51:23.274359", 352 | "modified_by": "Administrator", 353 | "module": "Restaurant Management", 354 | "name": "payment-order", 355 | "owner": "Administrator", 356 | "published": 1, 357 | "route": "payment-order", 358 | "route_to_success_link": 0, 359 | "show_attachments": 0, 360 | "show_in_grid": 0, 361 | "title": "Payment Order" 362 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/payment_order/payment_order.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_customer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/restaurant_order_customer/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_customer/restaurant_order_customer.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_customer/restaurant_order_customer.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:44.888594", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "depends_on": "", 16 | "description": "", 17 | "extra_field": 0, 18 | "fetch_if_empty": 0, 19 | "fieldname": "customer", 20 | "fieldtype": "Link", 21 | "hidden": 0, 22 | "label": "Customer", 23 | "max_length": 0, 24 | "max_value": 0, 25 | "options": "Customer", 26 | "read_only": 0, 27 | "reqd": 0, 28 | "show_in_filter": 0 29 | } 30 | ], 31 | "doc_type": "Table Order", 32 | "docstatus": 0, 33 | "doctype": "Desk Form", 34 | "idx": 0, 35 | "is_standard": 1, 36 | "login_required": 1, 37 | "max_attachment_size": 0, 38 | "modified": "2023-01-07 20:51:23.220759", 39 | "modified_by": "Administrator", 40 | "module": "Restaurant Management", 41 | "name": "restaurant-order-customer", 42 | "owner": "Administrator", 43 | "published": 1, 44 | "route": "restaurant-order-customer", 45 | "route_to_success_link": 0, 46 | "show_attachments": 0, 47 | "show_in_grid": 0, 48 | "title": "Restaurant Order Customer" 49 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_customer/restaurant_order_customer.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_dinners/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/restaurant_order_dinners/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_dinners/restaurant_order_dinners.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_dinners/restaurant_order_dinners.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:44.909532", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "depends_on": "", 16 | "description": "", 17 | "extra_field": 0, 18 | "fetch_if_empty": 0, 19 | "fieldname": "dinners", 20 | "fieldtype": "Int", 21 | "hidden": 0, 22 | "label": "Dinners", 23 | "max_length": 0, 24 | "max_value": 0, 25 | "read_only": 0, 26 | "reqd": 0, 27 | "show_in_filter": 0 28 | } 29 | ], 30 | "doc_type": "Table Order", 31 | "docstatus": 0, 32 | "doctype": "Desk Form", 33 | "idx": 0, 34 | "is_standard": 1, 35 | "login_required": 1, 36 | "max_attachment_size": 0, 37 | "modified": "2023-01-07 20:51:23.263754", 38 | "modified_by": "Administrator", 39 | "module": "Restaurant Management", 40 | "name": "restaurant-order-dinners", 41 | "owner": "Administrator", 42 | "published": 1, 43 | "route": "restaurant-order-dinners", 44 | "route_to_success_link": 0, 45 | "show_attachments": 0, 46 | "show_in_grid": 0, 47 | "title": "Restaurant Order Dinners" 48 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_order_dinners/restaurant_order_dinners.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_permission_manage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/restaurant_permission_manage/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_permission_manage/restaurant_permission_manage.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_permission_manage/restaurant_permission_manage.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:44.929919", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "description": "", 16 | "extra_field": 0, 17 | "fetch_from": "pos_profile_user.user", 18 | "fetch_if_empty": 0, 19 | "fieldname": "user", 20 | "fieldtype": "Read Only", 21 | "hidden": 0, 22 | "label": "User", 23 | "max_length": 0, 24 | "max_value": 0, 25 | "options": "", 26 | "read_only": 0, 27 | "reqd": 0, 28 | "show_in_filter": 0 29 | }, 30 | { 31 | "allow_read_on_all_link_options": 1, 32 | "collapsible": 0, 33 | "default": "", 34 | "depends_on": "", 35 | "description": "", 36 | "extra_field": 0, 37 | "fetch_if_empty": 0, 38 | "fieldtype": "Column Break", 39 | "hidden": 0, 40 | "max_length": 0, 41 | "max_value": 0, 42 | "read_only": 0, 43 | "reqd": 0, 44 | "show_in_filter": 0 45 | }, 46 | { 47 | "allow_read_on_all_link_options": 1, 48 | "collapsible": 0, 49 | "extra_field": 0, 50 | "fetch_if_empty": 0, 51 | "fieldname": "pos_profile_user", 52 | "fieldtype": "Link", 53 | "hidden": 1, 54 | "label": "POS Profile User", 55 | "max_length": 0, 56 | "max_value": 0, 57 | "options": "POS Profile User", 58 | "read_only": 1, 59 | "reqd": 1, 60 | "show_in_filter": 0 61 | }, 62 | { 63 | "allow_read_on_all_link_options": 1, 64 | "collapsible": 0, 65 | "default": "", 66 | "depends_on": "", 67 | "description": "", 68 | "extra_field": 0, 69 | "fetch_if_empty": 0, 70 | "fieldtype": "Section Break", 71 | "hidden": 0, 72 | "max_length": 0, 73 | "max_value": 0, 74 | "read_only": 0, 75 | "reqd": 0, 76 | "show_in_filter": 0 77 | }, 78 | { 79 | "allow_read_on_all_link_options": 1, 80 | "collapsible": 0, 81 | "extra_field": 0, 82 | "fetch_if_empty": 0, 83 | "fieldname": "restaurant_permission", 84 | "fieldtype": "Table", 85 | "hidden": 0, 86 | "label": "Restaurant Permissions", 87 | "max_length": 0, 88 | "max_value": 0, 89 | "options": "Restaurant Permission", 90 | "read_only": 0, 91 | "reqd": 0, 92 | "show_in_filter": 0 93 | } 94 | ], 95 | "doc_type": "Restaurant Permission Manage", 96 | "docstatus": 0, 97 | "doctype": "Desk Form", 98 | "idx": 0, 99 | "is_standard": 1, 100 | "login_required": 1, 101 | "max_attachment_size": 0, 102 | "modified": "2023-01-07 20:51:23.241233", 103 | "modified_by": "Administrator", 104 | "module": "Restaurant Management", 105 | "name": "restaurant-permission-manage", 106 | "owner": "Administrator", 107 | "published": 1, 108 | "route": "restaurant-permission-manage", 109 | "route_to_success_link": 0, 110 | "show_attachments": 0, 111 | "show_in_grid": 0, 112 | "title": "Restaurant Permission Manage" 113 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_permission_manage/restaurant_permission_manage.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_production_center/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/restaurant_production_center/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_production_center/restaurant_production_center.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_production_center/restaurant_production_center.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:45.028329", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "depends_on": "", 16 | "description": "", 17 | "extra_field": 0, 18 | "fetch_if_empty": 0, 19 | "fieldname": "type", 20 | "fieldtype": "Read Only", 21 | "hidden": 0, 22 | "label": "Type", 23 | "max_length": 0, 24 | "max_value": 0, 25 | "read_only": 0, 26 | "reqd": 0, 27 | "show_in_filter": 0 28 | }, 29 | { 30 | "allow_read_on_all_link_options": 1, 31 | "collapsible": 0, 32 | "default": "", 33 | "depends_on": "", 34 | "description": "", 35 | "extra_field": 0, 36 | "fetch_if_empty": 0, 37 | "fieldtype": "Column Break", 38 | "hidden": 0, 39 | "max_length": 0, 40 | "max_value": 0, 41 | "read_only": 0, 42 | "reqd": 0, 43 | "show_in_filter": 0 44 | }, 45 | { 46 | "allow_read_on_all_link_options": 1, 47 | "collapsible": 0, 48 | "default": "", 49 | "description": "", 50 | "extra_field": 0, 51 | "fetch_if_empty": 0, 52 | "fieldname": "room", 53 | "fieldtype": "Link", 54 | "hidden": 1, 55 | "label": "Room", 56 | "max_length": 0, 57 | "max_value": 0, 58 | "read_only": 0, 59 | "reqd": 0, 60 | "show_in_filter": 0 61 | }, 62 | { 63 | "allow_read_on_all_link_options": 0, 64 | "collapsible": 0, 65 | "extra_field": 0, 66 | "fetch_from": "room.description", 67 | "fetch_if_empty": 0, 68 | "fieldname": "description", 69 | "fieldtype": "Read Only", 70 | "hidden": 0, 71 | "label": "Room", 72 | "max_length": 0, 73 | "max_value": 0, 74 | "read_only": 0, 75 | "reqd": 0, 76 | "show_in_filter": 0 77 | }, 78 | { 79 | "allow_read_on_all_link_options": 1, 80 | "collapsible": 0, 81 | "default": "", 82 | "depends_on": "", 83 | "description": "", 84 | "extra_field": 0, 85 | "fetch_if_empty": 0, 86 | "fieldtype": "Section Break", 87 | "hidden": 0, 88 | "max_length": 0, 89 | "max_value": 0, 90 | "read_only": 0, 91 | "reqd": 0, 92 | "show_in_filter": 0 93 | }, 94 | { 95 | "allow_read_on_all_link_options": 1, 96 | "collapsible": 0, 97 | "default": "", 98 | "description": "", 99 | "extra_field": 0, 100 | "fetch_if_empty": 0, 101 | "fieldname": "description", 102 | "fieldtype": "Data", 103 | "hidden": 0, 104 | "label": "Description", 105 | "max_length": 0, 106 | "max_value": 0, 107 | "read_only": 0, 108 | "reqd": 0, 109 | "show_in_filter": 0 110 | }, 111 | { 112 | "allow_read_on_all_link_options": 1, 113 | "collapsible": 0, 114 | "default": "", 115 | "depends_on": "", 116 | "description": "", 117 | "extra_field": 0, 118 | "fetch_if_empty": 0, 119 | "fieldtype": "Column Break", 120 | "hidden": 0, 121 | "max_length": 0, 122 | "max_value": 0, 123 | "read_only": 0, 124 | "reqd": 0, 125 | "show_in_filter": 0 126 | }, 127 | { 128 | "allow_read_on_all_link_options": 1, 129 | "collapsible": 0, 130 | "default": "", 131 | "description": "", 132 | "extra_field": 0, 133 | "fetch_if_empty": 0, 134 | "fieldname": "color", 135 | "fieldtype": "Color", 136 | "hidden": 0, 137 | "label": "Color", 138 | "max_length": 0, 139 | "max_value": 0, 140 | "read_only": 0, 141 | "reqd": 0, 142 | "show_in_filter": 0 143 | }, 144 | { 145 | "allow_read_on_all_link_options": 1, 146 | "collapsible": 0, 147 | "default": "", 148 | "depends_on": "", 149 | "description": "", 150 | "extra_field": 0, 151 | "fetch_if_empty": 0, 152 | "fieldtype": "Section Break", 153 | "hidden": 0, 154 | "max_length": 0, 155 | "max_value": 0, 156 | "read_only": 0, 157 | "reqd": 0, 158 | "show_in_filter": 0 159 | }, 160 | { 161 | "allow_read_on_all_link_options": 1, 162 | "collapsible": 0, 163 | "default": "", 164 | "description": "", 165 | "extra_field": 0, 166 | "fetch_if_empty": 0, 167 | "fieldname": "status_managed", 168 | "fieldtype": "Table", 169 | "hidden": 0, 170 | "label": "Status Managed", 171 | "max_length": 0, 172 | "max_value": 0, 173 | "options": "Status Managed Production Center", 174 | "read_only": 0, 175 | "reqd": 0, 176 | "show_in_filter": 0 177 | }, 178 | { 179 | "allow_read_on_all_link_options": 1, 180 | "collapsible": 0, 181 | "default": "", 182 | "depends_on": "", 183 | "description": "", 184 | "extra_field": 0, 185 | "fetch_if_empty": 0, 186 | "fieldtype": "Section Break", 187 | "hidden": 0, 188 | "max_length": 0, 189 | "max_value": 0, 190 | "read_only": 0, 191 | "reqd": 0, 192 | "show_in_filter": 0 193 | }, 194 | { 195 | "allow_read_on_all_link_options": 1, 196 | "collapsible": 0, 197 | "default": "", 198 | "description": "", 199 | "extra_field": 0, 200 | "fetch_if_empty": 0, 201 | "fieldname": "production_center_group", 202 | "fieldtype": "Table", 203 | "hidden": 0, 204 | "label": "Item Group", 205 | "max_length": 0, 206 | "max_value": 0, 207 | "options": "Production Center Group", 208 | "read_only": 0, 209 | "reqd": 0, 210 | "show_in_filter": 0 211 | } 212 | ], 213 | "doc_type": "Restaurant Object", 214 | "docstatus": 0, 215 | "doctype": "Desk Form", 216 | "idx": 0, 217 | "is_standard": 1, 218 | "login_required": 1, 219 | "max_attachment_size": 0, 220 | "modified": "2023-01-07 20:51:23.121317", 221 | "modified_by": "Administrator", 222 | "module": "Restaurant Management", 223 | "name": "restaurant-production-center", 224 | "owner": "Administrator", 225 | "published": 1, 226 | "route": "restaurant-production-center", 227 | "route_to_success_link": 0, 228 | "show_attachments": 0, 229 | "show_in_grid": 0, 230 | "title": "Restaurant Production Center" 231 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_production_center/restaurant_production_center.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_room/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/restaurant_room/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_room/restaurant_room.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_room/restaurant_room.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:45.005551", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "description": "", 16 | "extra_field": 0, 17 | "fetch_if_empty": 0, 18 | "fieldname": "type", 19 | "fieldtype": "Read Only", 20 | "hidden": 0, 21 | "label": "Type", 22 | "max_length": 0, 23 | "max_value": 0, 24 | "options": "", 25 | "read_only": 0, 26 | "reqd": 0, 27 | "show_in_filter": 0 28 | }, 29 | { 30 | "allow_read_on_all_link_options": 1, 31 | "collapsible": 0, 32 | "default": "", 33 | "depends_on": "", 34 | "description": "", 35 | "extra_field": 0, 36 | "fetch_if_empty": 0, 37 | "fieldname": "", 38 | "fieldtype": "Column Break", 39 | "hidden": 0, 40 | "max_length": 0, 41 | "max_value": 0, 42 | "read_only": 0, 43 | "reqd": 0, 44 | "show_in_filter": 0 45 | }, 46 | { 47 | "allow_read_on_all_link_options": 1, 48 | "collapsible": 0, 49 | "default": "", 50 | "description": "", 51 | "extra_field": 0, 52 | "fetch_if_empty": 0, 53 | "fieldname": "description", 54 | "fieldtype": "Data", 55 | "hidden": 0, 56 | "label": "Description", 57 | "max_length": 0, 58 | "max_value": 0, 59 | "read_only": 0, 60 | "reqd": 0, 61 | "show_in_filter": 0 62 | } 63 | ], 64 | "doc_type": "Restaurant Object", 65 | "docstatus": 0, 66 | "doctype": "Desk Form", 67 | "idx": 0, 68 | "is_standard": 1, 69 | "login_required": 1, 70 | "max_attachment_size": 0, 71 | "modified": "2023-01-07 20:51:23.209541", 72 | "modified_by": "Administrator", 73 | "module": "Restaurant Management", 74 | "name": "restaurant-room", 75 | "owner": "Administrator", 76 | "published": 1, 77 | "route": "restaurant-room", 78 | "route_to_success_link": 0, 79 | "show_attachments": 0, 80 | "show_in_grid": 0, 81 | "title": "Restaurant Room" 82 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_room/restaurant_room.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_form/restaurant_table/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_table/restaurant_table.js: -------------------------------------------------------------------------------- 1 | frappe.ready(function() { 2 | // bind events here 3 | }) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_table/restaurant_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_comments": 0, 3 | "allow_delete": 0, 4 | "allow_edit": 1, 5 | "allow_incomplete": 0, 6 | "allow_multiple": 0, 7 | "allow_print": 0, 8 | "button_label": "Save", 9 | "creation": "2022-08-23 16:06:44.963180", 10 | "desk_form_fields": [ 11 | { 12 | "allow_read_on_all_link_options": 1, 13 | "collapsible": 0, 14 | "default": "", 15 | "depends_on": "", 16 | "description": "", 17 | "extra_field": 0, 18 | "fetch_if_empty": 0, 19 | "fieldname": "type", 20 | "fieldtype": "Read Only", 21 | "hidden": 0, 22 | "label": "Type", 23 | "max_length": 0, 24 | "max_value": 0, 25 | "read_only": 0, 26 | "reqd": 0, 27 | "show_in_filter": 0 28 | }, 29 | { 30 | "allow_read_on_all_link_options": 1, 31 | "collapsible": 0, 32 | "default": "", 33 | "depends_on": "", 34 | "description": "", 35 | "extra_field": 0, 36 | "fetch_if_empty": 0, 37 | "fieldtype": "Column Break", 38 | "hidden": 0, 39 | "max_length": 0, 40 | "max_value": 0, 41 | "read_only": 0, 42 | "reqd": 0, 43 | "show_in_filter": 0 44 | }, 45 | { 46 | "allow_read_on_all_link_options": 0, 47 | "collapsible": 0, 48 | "extra_field": 0, 49 | "fetch_from": "room.descriptioin", 50 | "fetch_if_empty": 0, 51 | "fieldname": "description", 52 | "fieldtype": "Read Only", 53 | "hidden": 0, 54 | "label": "Room", 55 | "max_length": 0, 56 | "max_value": 0, 57 | "read_only": 0, 58 | "reqd": 0, 59 | "show_in_filter": 0 60 | }, 61 | { 62 | "allow_read_on_all_link_options": 1, 63 | "collapsible": 0, 64 | "default": "", 65 | "depends_on": "", 66 | "description": "", 67 | "extra_field": 0, 68 | "fetch_if_empty": 0, 69 | "fieldname": "room", 70 | "fieldtype": "Link", 71 | "hidden": 1, 72 | "label": "Room", 73 | "max_length": 0, 74 | "max_value": 0, 75 | "read_only": 0, 76 | "reqd": 0, 77 | "show_in_filter": 0 78 | }, 79 | { 80 | "allow_read_on_all_link_options": 1, 81 | "collapsible": 0, 82 | "default": "", 83 | "depends_on": "", 84 | "description": "", 85 | "extra_field": 0, 86 | "fetch_if_empty": 0, 87 | "fieldtype": "Section Break", 88 | "hidden": 0, 89 | "max_length": 0, 90 | "max_value": 0, 91 | "read_only": 0, 92 | "reqd": 0, 93 | "show_in_filter": 0 94 | }, 95 | { 96 | "allow_read_on_all_link_options": 1, 97 | "collapsible": 0, 98 | "default": "", 99 | "description": "", 100 | "extra_field": 0, 101 | "fetch_if_empty": 0, 102 | "fieldname": "no_of_seats", 103 | "fieldtype": "Int", 104 | "hidden": 0, 105 | "label": "No of Seats", 106 | "max_length": 0, 107 | "max_value": 0, 108 | "read_only": 0, 109 | "reqd": 0, 110 | "show_in_filter": 0 111 | }, 112 | { 113 | "allow_read_on_all_link_options": 1, 114 | "collapsible": 0, 115 | "default": "", 116 | "depends_on": "", 117 | "description": "", 118 | "extra_field": 0, 119 | "fetch_if_empty": 0, 120 | "fieldtype": "Column Break", 121 | "hidden": 0, 122 | "max_length": 0, 123 | "max_value": 0, 124 | "read_only": 0, 125 | "reqd": 0, 126 | "show_in_filter": 0 127 | }, 128 | { 129 | "allow_read_on_all_link_options": 1, 130 | "collapsible": 0, 131 | "default": "", 132 | "description": "", 133 | "extra_field": 0, 134 | "fetch_if_empty": 0, 135 | "fieldname": "minimum_seating", 136 | "fieldtype": "Int", 137 | "hidden": 0, 138 | "label": "Minimum Seating", 139 | "max_length": 0, 140 | "max_value": 0, 141 | "read_only": 0, 142 | "reqd": 0, 143 | "show_in_filter": 0 144 | }, 145 | { 146 | "allow_read_on_all_link_options": 1, 147 | "collapsible": 0, 148 | "default": "", 149 | "depends_on": "", 150 | "description": "", 151 | "extra_field": 0, 152 | "fetch_if_empty": 0, 153 | "fieldtype": "Section Break", 154 | "hidden": 0, 155 | "max_length": 0, 156 | "max_value": 0, 157 | "read_only": 0, 158 | "reqd": 0, 159 | "show_in_filter": 0 160 | }, 161 | { 162 | "allow_read_on_all_link_options": 1, 163 | "collapsible": 0, 164 | "default": "", 165 | "description": "", 166 | "extra_field": 0, 167 | "fetch_if_empty": 0, 168 | "fieldname": "description", 169 | "fieldtype": "Data", 170 | "hidden": 0, 171 | "label": "Description", 172 | "max_length": 0, 173 | "max_value": 0, 174 | "read_only": 0, 175 | "reqd": 0, 176 | "show_in_filter": 0 177 | }, 178 | { 179 | "allow_read_on_all_link_options": 1, 180 | "collapsible": 0, 181 | "default": "", 182 | "depends_on": "", 183 | "description": "", 184 | "extra_field": 0, 185 | "fetch_if_empty": 0, 186 | "fieldtype": "Column Break", 187 | "hidden": 0, 188 | "max_length": 0, 189 | "max_value": 0, 190 | "read_only": 0, 191 | "reqd": 0, 192 | "show_in_filter": 0 193 | }, 194 | { 195 | "allow_read_on_all_link_options": 1, 196 | "collapsible": 0, 197 | "default": "", 198 | "description": "", 199 | "extra_field": 0, 200 | "fetch_if_empty": 0, 201 | "fieldname": "color", 202 | "fieldtype": "Color", 203 | "hidden": 0, 204 | "label": "Color", 205 | "max_length": 0, 206 | "max_value": 0, 207 | "read_only": 0, 208 | "reqd": 0, 209 | "show_in_filter": 0 210 | } 211 | ], 212 | "doc_type": "Restaurant Object", 213 | "docstatus": 0, 214 | "doctype": "Desk Form", 215 | "idx": 0, 216 | "is_standard": 1, 217 | "login_required": 1, 218 | "max_attachment_size": 0, 219 | "modified": "2023-01-07 20:51:23.302003", 220 | "modified_by": "Administrator", 221 | "module": "Restaurant Management", 222 | "name": "restaurant-table", 223 | "owner": "Administrator", 224 | "published": 1, 225 | "route": "restaurant-table", 226 | "route_to_success_link": 0, 227 | "show_attachments": 0, 228 | "show_in_grid": 0, 229 | "title": "Restaurant Table" 230 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_form/restaurant_table/restaurant_table.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | import frappe 4 | 5 | def get_context(context): 6 | # do your desk here 7 | pass 8 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_formorder_item_note.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/desk_formorder_item_note.json -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/desk_page/restaurant/restaurant.json: -------------------------------------------------------------------------------- 1 | { 2 | "_liked_by": "[]", 3 | "cards": [ 4 | { 5 | "hidden": 0, 6 | "label": "Restaurant", 7 | "links": "[\n {\n \"label\": \"Restaurant Object\",\n \"name\": \"Restaurant Object\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Restaurant Order\",\n \"name\": \"Table Order\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Restaurant\",\n \"name\": \"Restaurant Manage\",\n \"type\": \"page\"\n }\n]" 8 | } 9 | ], 10 | "category": "Modules", 11 | "charts": [ 12 | { 13 | "chart_name": "Attending Orders", 14 | "label": "Attending Orders" 15 | }, 16 | { 17 | "chart_name": "Served Orders", 18 | "label": "Attending Orders" 19 | } 20 | ], 21 | "charts_label": "Orders", 22 | "creation": "2020-07-23 00:49:13.610074", 23 | "developer_mode_only": 0, 24 | "disable_user_customization": 0, 25 | "docstatus": 0, 26 | "doctype": "Desk Page", 27 | "extends_another_page": 0, 28 | "hide_custom": 0, 29 | "idx": 0, 30 | "is_standard": 1, 31 | "label": "Restaurant", 32 | "modified": "2020-08-07 23:01:09.725730", 33 | "modified_by": "Administrator", 34 | "module": "Restaurant Management", 35 | "name": "Restaurant", 36 | "owner": "Administrator", 37 | "pin_to_bottom": 0, 38 | "pin_to_top": 0, 39 | "shortcuts": [ 40 | { 41 | "icon": "fa fa-gear", 42 | "label": "Settings", 43 | "link_to": "Restaurant Settings", 44 | "type": "DocType" 45 | }, 46 | { 47 | "icon": "fa fa-clone", 48 | "label": "Objects", 49 | "link_to": "Restaurant Object", 50 | "type": "DocType" 51 | }, 52 | { 53 | "color": "#ff8989", 54 | "format": "{} Pending", 55 | "icon": "fa fa-list-ul", 56 | "label": "Order", 57 | "link_to": "Table Order", 58 | "stats_filter": "{ \"status\": \"Attending\" }", 59 | "type": "DocType" 60 | }, 61 | { 62 | "icon": "fa fa-cutlery ", 63 | "label": "Restaurant", 64 | "link_to": "restaurant-manage", 65 | "type": "Page" 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_entry_item/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/order_entry_item/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_entry_item/order_entry_item.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Quantum Bit Core and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Order Entry Item', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_entry_item/order_entry_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-04-12 01:14:42.191962", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "item_code", 9 | "item_group", 10 | "item_name", 11 | "status", 12 | "notes", 13 | "item_invoice", 14 | "qty", 15 | "rate", 16 | "valuation_rate", 17 | "amount", 18 | "price_list_rate", 19 | "discount_percentage", 20 | "identifier", 21 | "item_tax_template", 22 | "item_tax_rate", 23 | "table_description", 24 | "discount_amount", 25 | "tax_amount", 26 | "ordered_time", 27 | "has_batch_no", 28 | "batch_no", 29 | "has_serial_no", 30 | "serial_no" 31 | ], 32 | "fields": [ 33 | { 34 | "fetch_from": "item_code.item_group", 35 | "fieldname": "item_group", 36 | "fieldtype": "Read Only", 37 | "label": "Item Group" 38 | }, 39 | { 40 | "default": "Attending", 41 | "fieldname": "status", 42 | "fieldtype": "Select", 43 | "in_global_search": 1, 44 | "in_list_view": 1, 45 | "in_preview": 1, 46 | "in_standard_filter": 1, 47 | "label": "Status", 48 | "options": "Attending\nSent\nProcessing\nCompleted\nDelivering\nDelivered\nInvoiced", 49 | "reqd": 1 50 | }, 51 | { 52 | "fieldname": "notes", 53 | "fieldtype": "Text", 54 | "label": "Notes" 55 | }, 56 | { 57 | "fieldname": "item_code", 58 | "fieldtype": "Link", 59 | "in_global_search": 1, 60 | "in_list_view": 1, 61 | "in_preview": 1, 62 | "in_standard_filter": 1, 63 | "label": "Item Code", 64 | "options": "Item", 65 | "reqd": 1 66 | }, 67 | { 68 | "fieldname": "item_invoice", 69 | "fieldtype": "Read Only", 70 | "label": "item_invoice" 71 | }, 72 | { 73 | "fieldname": "qty", 74 | "fieldtype": "Float", 75 | "label": "Qty" 76 | }, 77 | { 78 | "fieldname": "rate", 79 | "fieldtype": "Currency", 80 | "label": "Rate" 81 | }, 82 | { 83 | "fieldname": "discount_percentage", 84 | "fieldtype": "Float", 85 | "label": "Discount Percentage" 86 | }, 87 | { 88 | "fieldname": "identifier", 89 | "fieldtype": "Read Only", 90 | "label": "Identifier" 91 | }, 92 | { 93 | "fetch_from": "item_code.item_name", 94 | "fieldname": "item_name", 95 | "fieldtype": "Read Only", 96 | "label": "Item Name" 97 | }, 98 | { 99 | "fieldname": "price_list_rate", 100 | "fieldtype": "Currency", 101 | "label": "Price List Rate" 102 | }, 103 | { 104 | "fieldname": "amount", 105 | "fieldtype": "Currency", 106 | "label": "Amount" 107 | }, 108 | { 109 | "fieldname": "item_tax_template", 110 | "fieldtype": "Link", 111 | "label": "Item Tax Template", 112 | "options": "Item Tax Template" 113 | }, 114 | { 115 | "fieldname": "item_tax_rate", 116 | "fieldtype": "Data", 117 | "label": "Item Tax Rate" 118 | }, 119 | { 120 | "fieldname": "table_description", 121 | "fieldtype": "Data", 122 | "label": "Table Description" 123 | }, 124 | { 125 | "fieldname": "valuation_rate", 126 | "fieldtype": "Currency", 127 | "label": "Valuation Rate" 128 | }, 129 | { 130 | "fieldname": "discount_amount", 131 | "fieldtype": "Currency", 132 | "label": "Discount Amount" 133 | }, 134 | { 135 | "fieldname": "tax_amount", 136 | "fieldtype": "Currency", 137 | "label": "Tax Amount" 138 | }, 139 | { 140 | "fieldname": "ordered_time", 141 | "fieldtype": "Datetime", 142 | "label": "Ordered Time" 143 | }, 144 | { 145 | "fieldname": "batch_no", 146 | "fieldtype": "Link", 147 | "label": "Batch No", 148 | "options": "Batch" 149 | }, 150 | { 151 | "default": "0", 152 | "fetch_from": "item_code.has_batch_no", 153 | "fieldname": "has_batch_no", 154 | "fieldtype": "Check", 155 | "label": "Has Batch No", 156 | "read_only": 1 157 | }, 158 | { 159 | "default": "0", 160 | "fetch_from": "item_code.has_serial_no", 161 | "fieldname": "has_serial_no", 162 | "fieldtype": "Check", 163 | "label": "Has Serial No", 164 | "read_only": 1 165 | }, 166 | { 167 | "fieldname": "serial_no", 168 | "fieldtype": "Link", 169 | "label": "Serial No", 170 | "options": "Serial No" 171 | } 172 | ], 173 | "index_web_pages_for_search": 1, 174 | "istable": 1, 175 | "links": [], 176 | "modified": "2022-09-12 16:34:06.730751", 177 | "modified_by": "Administrator", 178 | "module": "Restaurant Management", 179 | "name": "Order Entry Item", 180 | "owner": "Administrator", 181 | "permissions": [], 182 | "quick_entry": 1, 183 | "sort_field": "modified", 184 | "sort_order": "DESC", 185 | "track_changes": 1 186 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_entry_item/order_entry_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class OrderEntryItem(Document): 11 | pass -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_entry_item/test_order_entry_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | # import frappe 7 | import unittest 8 | 9 | class TestOrderEntryItem(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/order_payment/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_payment/order_payment.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-04-14 00:36:40.730591", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "mode_of_payment", 9 | "amount" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "mode_of_payment", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "Mode of Payment", 17 | "options": "Mode of Payment", 18 | "reqd": 1 19 | }, 20 | { 21 | "fieldname": "amount", 22 | "fieldtype": "Currency", 23 | "in_list_view": 1, 24 | "label": "Amount", 25 | "reqd": 1 26 | } 27 | ], 28 | "istable": 1, 29 | "links": [], 30 | "modified": "2020-04-14 00:41:03.602761", 31 | "modified_by": "Administrator", 32 | "module": "Restaurant Management", 33 | "name": "Order Payment", 34 | "owner": "Administrator", 35 | "permissions": [], 36 | "quick_entry": 1, 37 | "sort_field": "modified", 38 | "sort_order": "DESC", 39 | "track_changes": 1 40 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/order_payment/order_payment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | # import frappe 7 | from frappe.model.document import Document 8 | 9 | class OrderPayment(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/production_center_group/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/production_center_group/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/production_center_group/production_center_group.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-04-04 00:09:40.141055", 4 | "doctype": "DocType", 5 | "engine": "InnoDB", 6 | "field_order": [ 7 | "item_group" 8 | ], 9 | "fields": [ 10 | { 11 | "fieldname": "item_group", 12 | "fieldtype": "Link", 13 | "in_list_view": 1, 14 | "label": "Group", 15 | "options": "Item Group", 16 | "reqd": 1 17 | } 18 | ], 19 | "istable": 1, 20 | "links": [], 21 | "modified": "2020-04-09 17:50:54.418273", 22 | "modified_by": "Administrator", 23 | "module": "Restaurant Management", 24 | "name": "Production Center Group", 25 | "owner": "Administrator", 26 | "permissions": [], 27 | "quick_entry": 1, 28 | "sort_field": "modified", 29 | "sort_order": "DESC", 30 | "track_changes": 1 31 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/production_center_group/production_center_group.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | # import frappe 7 | from frappe.model.document import Document 8 | 9 | class ProductionCenterGroup(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_exceptions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/restaurant_exceptions/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_exceptions/restaurant_exceptions.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-06-11 20:52:37.635763", 4 | "doctype": "DocType", 5 | "engine": "InnoDB", 6 | "field_order": [ 7 | "role_profile", 8 | "section_break_2", 9 | "order_manage", 10 | "order_create", 11 | "order_write", 12 | "column_break_5", 13 | "order_delete", 14 | "order_pay" 15 | ], 16 | "fields": [ 17 | { 18 | "fieldname": "role_profile", 19 | "fieldtype": "Link", 20 | "in_list_view": 1, 21 | "label": "Role Profile", 22 | "options": "Role Profile", 23 | "reqd": 1 24 | }, 25 | { 26 | "default": "0", 27 | "fieldname": "order_delete", 28 | "fieldtype": "Check", 29 | "in_list_view": 1, 30 | "label": "Delete Order" 31 | }, 32 | { 33 | "default": "0", 34 | "fieldname": "order_pay", 35 | "fieldtype": "Check", 36 | "in_list_view": 1, 37 | "label": " Pay" 38 | }, 39 | { 40 | "collapsible": 1, 41 | "fieldname": "section_break_2", 42 | "fieldtype": "Section Break", 43 | "label": "Exceptions" 44 | }, 45 | { 46 | "default": "0", 47 | "fieldname": "order_manage", 48 | "fieldtype": "Check", 49 | "label": "Order Manage" 50 | }, 51 | { 52 | "fieldname": "column_break_5", 53 | "fieldtype": "Column Break" 54 | }, 55 | { 56 | "default": "0", 57 | "fieldname": "order_write", 58 | "fieldtype": "Check", 59 | "label": "Update Order" 60 | }, 61 | { 62 | "default": "0", 63 | "fieldname": "order_create", 64 | "fieldtype": "Check", 65 | "label": "Add Order" 66 | } 67 | ], 68 | "index_web_pages_for_search": 1, 69 | "istable": 1, 70 | "links": [], 71 | "modified": "2021-05-11 12:49:05.673549", 72 | "modified_by": "Administrator", 73 | "module": "Restaurant Management", 74 | "name": "Restaurant Exceptions", 75 | "owner": "Administrator", 76 | "permissions": [], 77 | "quick_entry": 1, 78 | "sort_field": "modified", 79 | "sort_order": "DESC", 80 | "track_changes": 1 81 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_exceptions/restaurant_exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | # import frappe 7 | from frappe.model.document import Document 8 | 9 | class RestaurantExceptions(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_object/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/restaurant_object/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_object/order_manage.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 10 | 11 | 12 | 15 | 20 | 27 | 28 |
5 |
6 |
Order
7 |
Close
8 |
9 |
13 | 14 | 16 |
17 |
18 |
19 |
21 |
22 |
23 | 24 | 25 |
26 |
29 |
-------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_object/restaurant_object.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Quantum Bit Core and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Restaurant Object', { 5 | refresh: function(frm) {} 6 | }); 7 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_object/restaurant_object.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-04-03 21:41:52.229718", 4 | "doctype": "DocType", 5 | "document_type": "Setup", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "type", 10 | "column_break_2", 11 | "room", 12 | "section_break_2", 13 | "no_of_seats", 14 | "column_break_4", 15 | "minimum_seating", 16 | "section_break_6", 17 | "description", 18 | "column_break_8", 19 | "color", 20 | "section_break_10", 21 | "data_style", 22 | "section_break_14", 23 | "status_managed", 24 | "section_break_12", 25 | "production_center_group", 26 | "current_user", 27 | "room_description", 28 | "shape" 29 | ], 30 | "fields": [ 31 | { 32 | "fieldname": "no_of_seats", 33 | "fieldtype": "Int", 34 | "label": "No of Seats" 35 | }, 36 | { 37 | "default": "1", 38 | "fieldname": "minimum_seating", 39 | "fieldtype": "Int", 40 | "in_list_view": 1, 41 | "label": "Minimum Seating" 42 | }, 43 | { 44 | "fieldname": "description", 45 | "fieldtype": "Data", 46 | "in_list_view": 1, 47 | "label": "Description" 48 | }, 49 | { 50 | "fieldname": "type", 51 | "fieldtype": "Select", 52 | "in_global_search": 1, 53 | "in_list_view": 1, 54 | "in_standard_filter": 1, 55 | "label": "Type", 56 | "options": "Room\nTable\nProduction Center", 57 | "reqd": 1 58 | }, 59 | { 60 | "fieldname": "section_break_2", 61 | "fieldtype": "Section Break" 62 | }, 63 | { 64 | "fieldname": "column_break_4", 65 | "fieldtype": "Column Break" 66 | }, 67 | { 68 | "fieldname": "section_break_6", 69 | "fieldtype": "Section Break" 70 | }, 71 | { 72 | "fieldname": "column_break_8", 73 | "fieldtype": "Column Break" 74 | }, 75 | { 76 | "fieldname": "color", 77 | "fieldtype": "Color", 78 | "label": "Color" 79 | }, 80 | { 81 | "fieldname": "section_break_10", 82 | "fieldtype": "Section Break" 83 | }, 84 | { 85 | "fieldname": "section_break_12", 86 | "fieldtype": "Section Break" 87 | }, 88 | { 89 | "fieldname": "column_break_2", 90 | "fieldtype": "Column Break" 91 | }, 92 | { 93 | "fieldname": "room", 94 | "fieldtype": "Link", 95 | "label": "Room", 96 | "options": "Restaurant Object" 97 | }, 98 | { 99 | "fieldname": "section_break_14", 100 | "fieldtype": "Section Break" 101 | }, 102 | { 103 | "fieldname": "status_managed", 104 | "fieldtype": "Table", 105 | "label": "Status Managed", 106 | "options": "Status Managed Production Center" 107 | }, 108 | { 109 | "fieldname": "production_center_group", 110 | "fieldtype": "Table", 111 | "label": "Item Group", 112 | "options": "Production Center Group" 113 | }, 114 | { 115 | "fieldname": "current_user", 116 | "fieldtype": "Link", 117 | "label": "Current User", 118 | "options": "User" 119 | }, 120 | { 121 | "fieldname": "data_style", 122 | "fieldtype": "Code", 123 | "label": "Data Style" 124 | }, 125 | { 126 | "fetch_from": "room.description", 127 | "fieldname": "room_description", 128 | "fieldtype": "Read Only", 129 | "label": "Room Description" 130 | }, 131 | { 132 | "fieldname": "shape", 133 | "fieldtype": "Select", 134 | "label": "Shape", 135 | "options": "Square\nRound" 136 | } 137 | ], 138 | "index_web_pages_for_search": 1, 139 | "links": [], 140 | "modified": "2022-09-25 11:12:36.299549", 141 | "modified_by": "Administrator", 142 | "module": "Restaurant Management", 143 | "name": "Restaurant Object", 144 | "owner": "Administrator", 145 | "permissions": [ 146 | { 147 | "create": 1, 148 | "delete": 1, 149 | "email": 1, 150 | "export": 1, 151 | "print": 1, 152 | "read": 1, 153 | "report": 1, 154 | "role": "System Manager", 155 | "share": 1, 156 | "write": 1 157 | }, 158 | { 159 | "create": 1, 160 | "delete": 1, 161 | "email": 1, 162 | "export": 1, 163 | "print": 1, 164 | "read": 1, 165 | "report": 1, 166 | "role": "Restaurant Manager", 167 | "share": 1, 168 | "write": 1 169 | }, 170 | { 171 | "create": 1, 172 | "email": 1, 173 | "export": 1, 174 | "print": 1, 175 | "read": 1, 176 | "report": 1, 177 | "role": "Restaurant User", 178 | "share": 1 179 | } 180 | ], 181 | "quick_entry": 1, 182 | "restrict_to_domain": "Services", 183 | "search_fields": "description,type", 184 | "sort_field": "modified", 185 | "sort_order": "DESC", 186 | "title_field": "description", 187 | "track_changes": 1 188 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_object/test_restaurant_object.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | # import frappe 7 | import unittest 8 | 9 | class TestRestaurantObject(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/restaurant_permission/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission/restaurant_permission.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Quantum Bit Core and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Restaurant Permission', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission/restaurant_permission.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2022-06-28 17:05:07.365248", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "room", 9 | "room_description" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "room", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "Room", 17 | "options": "Restaurant Object" 18 | }, 19 | { 20 | "fetch_from": "room.description", 21 | "fieldname": "room_description", 22 | "fieldtype": "Read Only", 23 | "in_list_view": 1, 24 | "label": "Room Description" 25 | } 26 | ], 27 | "index_web_pages_for_search": 1, 28 | "istable": 1, 29 | "links": [], 30 | "modified": "2022-06-28 20:15:42.922881", 31 | "modified_by": "Administrator", 32 | "module": "Restaurant Management", 33 | "name": "Restaurant Permission", 34 | "owner": "Administrator", 35 | "permissions": [], 36 | "sort_field": "modified", 37 | "sort_order": "DESC", 38 | "track_changes": 1 39 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission/restaurant_permission.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2022, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | # import frappe 7 | from frappe.model.document import Document 8 | 9 | class RestaurantPermission(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission/test_restaurant_permission.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2022, Quantum Bit Core and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | # import frappe 7 | import unittest 8 | 9 | class TestRestaurantPermission(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission_manage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/restaurant_permission_manage/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission_manage/restaurant_permission_manage.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Quantum Bit Core and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Restaurant Permission Manage', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission_manage/restaurant_permission_manage.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "field:pos_profile_user", 4 | "creation": "2022-09-24 09:50:46.852432", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "pos_profile_user", 10 | "user", 11 | "restaurant_permission" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "pos_profile_user", 16 | "fieldtype": "Link", 17 | "label": "POS Profile", 18 | "options": "POS Profile User", 19 | "unique": 1 20 | }, 21 | { 22 | "fetch_from": "pos_profile_user.user", 23 | "fieldname": "user", 24 | "fieldtype": "Read Only", 25 | "label": "User" 26 | }, 27 | { 28 | "fieldname": "restaurant_permission", 29 | "fieldtype": "Table", 30 | "label": "Restaurant Permissions", 31 | "options": "Restaurant Permission" 32 | } 33 | ], 34 | "index_web_pages_for_search": 1, 35 | "links": [], 36 | "modified": "2022-09-24 10:03:40.466159", 37 | "modified_by": "Administrator", 38 | "module": "Restaurant Management", 39 | "name": "Restaurant Permission Manage", 40 | "owner": "Administrator", 41 | "permissions": [ 42 | { 43 | "create": 1, 44 | "delete": 1, 45 | "email": 1, 46 | "export": 1, 47 | "print": 1, 48 | "read": 1, 49 | "report": 1, 50 | "role": "System Manager", 51 | "share": 1, 52 | "write": 1 53 | } 54 | ], 55 | "sort_field": "modified", 56 | "sort_order": "DESC", 57 | "track_changes": 1 58 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission_manage/restaurant_permission_manage.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2022, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class RestaurantPermissionManage(Document): 10 | def on_update(self): 11 | frappe.publish_realtime("update_settings") 12 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_permission_manage/test_restaurant_permission_manage.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2022, Quantum Bit Core and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | # import frappe 7 | import unittest 8 | 9 | class TestRestaurantPermissionManage(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/restaurant_settings/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_settings/restaurant_settings.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Quantum Bit Core and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Restaurant Settings', { 5 | refresh: function(frm) { 6 | const permission_message = "Restaurant permissions are enabled for restricted areas, for example: a user with permission to edit an order will not be able to edit it if the order belongs to another user, this permission removes that restriction for a specific role type."; 7 | 8 | frm.fields_dict.restaurant_permissions_info.$wrapper.empty().append(` 9 | ${__(permission_message)} 10 | `); 11 | 12 | const one_click_events_message = "This option changes the double click events in the main system processes to a single click." 13 | 14 | frm.fields_dict.double_click_events_info.$wrapper.empty().append(` 15 | ${__(one_click_events_message)} 16 | `); 17 | }, 18 | 19 | setup: function(frm) { 20 | frm.set_query("print_format", function () { 21 | return { 22 | filters: [ 23 | ['Print Format', 'doc_type', '=', 'Table Order'] 24 | ] 25 | }; 26 | }); 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_settings/restaurant_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-06-07 20:39:44.010918", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "for_tables_section", 9 | "restricted_to_owner_table", 10 | "for_orders_section", 11 | "restricted_to_owner_order", 12 | "column_break_5", 13 | "multiple_pending_order", 14 | "section_break_12", 15 | "pos_profile", 16 | "column_break_9", 17 | "color", 18 | "column_break_7", 19 | "print_format", 20 | "double_click_events_section", 21 | "double_click_events_info", 22 | "column_break_10", 23 | "to_new_order", 24 | "to_pay", 25 | "column_break_13", 26 | "to_transfer_order", 27 | "to_change_status_order", 28 | "section_break_11", 29 | "restaurant_permissions_info", 30 | "restaurant_exceptions" 31 | ], 32 | "fields": [ 33 | { 34 | "fieldname": "for_tables_section", 35 | "fieldtype": "Section Break", 36 | "label": "Restrictions" 37 | }, 38 | { 39 | "fieldname": "for_orders_section", 40 | "fieldtype": "Column Break" 41 | }, 42 | { 43 | "fieldname": "section_break_11", 44 | "fieldtype": "Section Break", 45 | "label": "Exceptions" 46 | }, 47 | { 48 | "fieldname": "restaurant_permissions_info", 49 | "fieldtype": "HTML" 50 | }, 51 | { 52 | "default": "0", 53 | "fieldname": "restricted_to_owner_table", 54 | "fieldtype": "Check", 55 | "label": "Restrict tables by owner" 56 | }, 57 | { 58 | "default": "0", 59 | "fieldname": "restricted_to_owner_order", 60 | "fieldtype": "Check", 61 | "label": "Restrict order by owner" 62 | }, 63 | { 64 | "fieldname": "color", 65 | "fieldtype": "Color", 66 | "label": "Restriction Color" 67 | }, 68 | { 69 | "fieldname": "section_break_12", 70 | "fieldtype": "Section Break" 71 | }, 72 | { 73 | "fieldname": "column_break_7", 74 | "fieldtype": "Column Break" 75 | }, 76 | { 77 | "fieldname": "print_format", 78 | "fieldtype": "Link", 79 | "label": "Print Format", 80 | "options": "Print Format" 81 | }, 82 | { 83 | "fieldname": "double_click_events_section", 84 | "fieldtype": "Section Break", 85 | "label": "One Click Events" 86 | }, 87 | { 88 | "fieldname": "column_break_10", 89 | "fieldtype": "Column Break" 90 | }, 91 | { 92 | "default": "1", 93 | "fieldname": "to_new_order", 94 | "fieldtype": "Check", 95 | "label": "To new Order" 96 | }, 97 | { 98 | "default": "1", 99 | "fieldname": "to_pay", 100 | "fieldtype": "Check", 101 | "label": "To Pay" 102 | }, 103 | { 104 | "fieldname": "column_break_13", 105 | "fieldtype": "Column Break" 106 | }, 107 | { 108 | "default": "1", 109 | "fieldname": "to_transfer_order", 110 | "fieldtype": "Check", 111 | "label": "To transfer Order" 112 | }, 113 | { 114 | "default": "0", 115 | "fieldname": "to_change_status_order", 116 | "fieldtype": "Check", 117 | "label": "To Change status Order" 118 | }, 119 | { 120 | "fieldname": "double_click_events_info", 121 | "fieldtype": "HTML" 122 | }, 123 | { 124 | "fieldname": "restaurant_exceptions", 125 | "fieldtype": "Table", 126 | "label": "Restaurant Exceptions", 127 | "options": "Restaurant Exceptions" 128 | }, 129 | { 130 | "fieldname": "column_break_5", 131 | "fieldtype": "Column Break" 132 | }, 133 | { 134 | "default": "0", 135 | "fieldname": "multiple_pending_order", 136 | "fieldtype": "Check", 137 | "label": "Multiple pending order" 138 | }, 139 | { 140 | "fieldname": "pos_profile", 141 | "fieldtype": "Link", 142 | "label": "POS Profile", 143 | "options": "POS Profile" 144 | }, 145 | { 146 | "fieldname": "column_break_9", 147 | "fieldtype": "Column Break" 148 | } 149 | ], 150 | "index_web_pages_for_search": 1, 151 | "issingle": 1, 152 | "links": [], 153 | "modified": "2022-07-13 21:07:25.854704", 154 | "modified_by": "Administrator", 155 | "module": "Restaurant Management", 156 | "name": "Restaurant Settings", 157 | "owner": "Administrator", 158 | "permissions": [ 159 | { 160 | "create": 1, 161 | "delete": 1, 162 | "email": 1, 163 | "print": 1, 164 | "read": 1, 165 | "role": "System Manager", 166 | "share": 1, 167 | "write": 1 168 | } 169 | ], 170 | "quick_entry": 1, 171 | "sort_field": "modified", 172 | "sort_order": "DESC", 173 | "track_changes": 1 174 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_settings/restaurant_settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | from restaurant_management.setup import install 9 | from erpnext.stock.get_item_details import get_pos_profile 10 | 11 | 12 | class RestaurantSettings(Document): 13 | def on_update(self): 14 | frappe.publish_realtime("update_settings") 15 | 16 | def settings_data(self): 17 | profile = frappe.db.get_value("User", frappe.session.user, "role_profile_name") 18 | restaurant_settings = frappe.get_single("Restaurant Settings") 19 | 20 | return dict( 21 | pos=self.pos_profile_data(), 22 | permissions=dict( 23 | invoice=frappe.permissions.get_doc_permissions(frappe.new_doc("Sales Invoice")), 24 | order=frappe.permissions.get_doc_permissions(frappe.new_doc("Table Order")), 25 | restaurant_object=frappe.permissions.get_doc_permissions(frappe.new_doc("Restaurant Object")), 26 | rooms_access=self.rooms_access() 27 | ), 28 | restrictions=restaurant_settings, 29 | exceptions=[item for item in restaurant_settings.restaurant_exceptions if item.role_profile == profile], 30 | lang=frappe.session.data.lang, 31 | order_item_editor_form=self.get_order_item_editor_form(), 32 | ) 33 | 34 | def pos_profile_data(self): 35 | pos_profile_name = self.get_current_pos_profile_name() 36 | 37 | return dict( 38 | has_pos=pos_profile_name is not None, 39 | pos=frappe.get_doc( 40 | "POS Profile", pos_profile_name) if pos_profile_name is not None else None 41 | ) 42 | 43 | def get_order_item_editor_form(self): 44 | return frappe.get_doc("Desk Form", "order-item-editor") 45 | 46 | def get_current_pos_profile_name(self): 47 | #return self.pos_profile 48 | pos_profile = get_pos_profile(frappe.defaults.get_user_default('company')) 49 | return pos_profile.name if pos_profile else None 50 | 51 | def rooms_access(self): 52 | pos_profile_name = self.get_current_pos_profile_name() 53 | 54 | if pos_profile_name is not None: 55 | permission_parent = frappe.db.get_value( 56 | "POS Profile User", 57 | filters={"parenttype": "POS Profile", 58 | "parent": pos_profile_name, "user": frappe.session.user}, 59 | fieldname="name" 60 | ) 61 | 62 | restaurant_permissions = frappe.db.get_all("Restaurant Permission", fields=("room"), 63 | filters={ 64 | "parenttype": "Restaurant Permission Manage", 65 | "parent": permission_parent, 66 | } 67 | ) if permission_parent else [] 68 | 69 | return (item.room for item in restaurant_permissions) 70 | 71 | return [] 72 | 73 | 74 | @frappe.whitelist() 75 | def reinstall(): 76 | return install.after_install() 77 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/restaurant_settings/test_restaurant_settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | # import frappe 7 | import unittest 8 | 9 | class TestRestaurantSettings(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/status_managed_production_center/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/status_managed_production_center/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/status_managed_production_center/status_managed_production_center.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2020-04-07 23:01:38.448531", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "status_managed", 9 | "next_status" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "next_status", 14 | "fieldtype": "Select", 15 | "in_list_view": 1, 16 | "label": "Next Status", 17 | "options": "Sent\nProcessing\nCompleted\nDelivering\nDelivered", 18 | "reqd": 1 19 | }, 20 | { 21 | "fieldname": "status_managed", 22 | "fieldtype": "Select", 23 | "in_list_view": 1, 24 | "label": "Status Managed", 25 | "options": "Sent\nProcessing\nCompleted\nDelivering\nDelivered", 26 | "reqd": 1 27 | } 28 | ], 29 | "istable": 1, 30 | "links": [], 31 | "modified": "2020-04-10 16:21:24.753187", 32 | "modified_by": "Administrator", 33 | "module": "Restaurant Management", 34 | "name": "Status Managed Production Center", 35 | "owner": "Administrator", 36 | "permissions": [], 37 | "quick_entry": 1, 38 | "sort_field": "modified", 39 | "sort_order": "DESC", 40 | "track_changes": 1 41 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/status_managed_production_center/status_managed_production_center.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Quantum Bit Core and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | # import frappe 7 | from frappe.model.document import Document 8 | 9 | class StatusManagedProductionCenter(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/table_order/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/doctype/table_order/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/table_order/divide_template.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 82 | 83 | 84 |
6 | 7 | 8 | 9 | 17 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | {% for item in items %} 43 | {% set base_name = model.name + '-' + item.entry_name %} 44 | 45 | 50 | 51 | 52 | 55 | 56 | 61 | 62 | 65 | 70 | 71 | 76 | 77 | {% endfor %} 78 | 79 | 80 |
10 |
11 | {{_("Current")}} 12 | 15 |
16 |
18 | 19 |
20 | {{_("New")}} 21 | 24 |
25 |
...{{_("Item")}}{{_("Qty")}}{{_("Rate")}}{{_("Discount")}}{{_("Total")}} 36 | {{_("Qty")}}{{_("Total")}}...
46 | 47 | 48 | 49 | {{item.item_name}}{{item.qty}} 53 | {{frappe.format_value(item.rate, {"fieldtype": "Currency"})}} 54 | {{item.discount_percentage}}% 57 | 58 | {{frappe.format_value(item.amount, {"fieldtype": "Currency"})}} 59 | 60 | 63 | 64 | 0 66 | 67 | {{frappe.format_value('0', {"fieldtype": "Currency"})}} 68 | 69 | 72 | 73 | 74 | 75 |
81 |
85 |
-------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/table_order/table_order.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Quantum Bit Core and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Table Order', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/table_order/table_order.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "naming_series:", 4 | "creation": "2020-04-03 21:45:19.214036", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "table", 10 | "table_description", 11 | "room", 12 | "room_description", 13 | "naming_series", 14 | "status", 15 | "customer", 16 | "address", 17 | "dinners", 18 | "link_invoice", 19 | "discount", 20 | "tax", 21 | "amount", 22 | "entry_items", 23 | "amended_from", 24 | "pos_profile", 25 | "taxes_and_charges", 26 | "selling_price_list", 27 | "company", 28 | "customer_name" 29 | ], 30 | "fields": [ 31 | { 32 | "fieldname": "table", 33 | "fieldtype": "Link", 34 | "label": "Table", 35 | "options": "Restaurant Object" 36 | }, 37 | { 38 | "fieldname": "naming_series", 39 | "fieldtype": "Select", 40 | "label": "Series", 41 | "options": "OR-.YYYY.-" 42 | }, 43 | { 44 | "fieldname": "status", 45 | "fieldtype": "Select", 46 | "label": "Status", 47 | "options": "Attending\nInvoiced" 48 | }, 49 | { 50 | "fetch_from": "table.room", 51 | "fieldname": "room", 52 | "fieldtype": "Link", 53 | "label": "Room", 54 | "options": "Restaurant Object" 55 | }, 56 | { 57 | "fieldname": "customer", 58 | "fieldtype": "Link", 59 | "label": "Customer", 60 | "options": "Customer" 61 | }, 62 | { 63 | "fieldname": "dinners", 64 | "fieldtype": "Int", 65 | "label": "Dinners" 66 | }, 67 | { 68 | "fieldname": "link_invoice", 69 | "fieldtype": "Link", 70 | "label": "Invoice", 71 | "options": "POS Invoice", 72 | "read_only": 1 73 | }, 74 | { 75 | "fieldname": "amount", 76 | "fieldtype": "Currency", 77 | "label": "Amount", 78 | "read_only": 1 79 | }, 80 | { 81 | "fieldname": "entry_items", 82 | "fieldtype": "Table", 83 | "label": "Entry Items", 84 | "options": "Order Entry Item" 85 | }, 86 | { 87 | "fieldname": "discount", 88 | "fieldtype": "Currency", 89 | "label": "Discount", 90 | "read_only": 1 91 | }, 92 | { 93 | "fieldname": "tax", 94 | "fieldtype": "Currency", 95 | "label": "Tax", 96 | "read_only": 1 97 | }, 98 | { 99 | "fieldname": "amended_from", 100 | "fieldtype": "Link", 101 | "label": "Amended From", 102 | "no_copy": 1, 103 | "options": "Table Order", 104 | "print_hide": 1, 105 | "read_only": 1 106 | }, 107 | { 108 | "fieldname": "pos_profile", 109 | "fieldtype": "Link", 110 | "label": "POS Profile", 111 | "options": "POS Profile" 112 | }, 113 | { 114 | "fieldname": "taxes_and_charges", 115 | "fieldtype": "Data", 116 | "label": "Taxes and Charges" 117 | }, 118 | { 119 | "fieldname": "selling_price_list", 120 | "fieldtype": "Data", 121 | "label": "Selling Price List" 122 | }, 123 | { 124 | "fieldname": "company", 125 | "fieldtype": "Link", 126 | "label": "Company", 127 | "options": "Company" 128 | }, 129 | { 130 | "fetch_from": "table.description", 131 | "fieldname": "table_description", 132 | "fieldtype": "Read Only", 133 | "label": "Table Description" 134 | }, 135 | { 136 | "fetch_from": "room.description", 137 | "fieldname": "room_description", 138 | "fieldtype": "Read Only", 139 | "label": "Room Description" 140 | }, 141 | { 142 | "fetch_from": "customer.name", 143 | "fieldname": "customer_name", 144 | "fieldtype": "Read Only", 145 | "label": "Customer" 146 | }, 147 | { 148 | "fieldname": "address", 149 | "fieldtype": "Link", 150 | "label": "Address", 151 | "options": "Address" 152 | } 153 | ], 154 | "index_web_pages_for_search": 1, 155 | "is_submittable": 1, 156 | "links": [], 157 | "modified": "2022-11-25 07:58:48.917404", 158 | "modified_by": "Administrator", 159 | "module": "Restaurant Management", 160 | "name": "Table Order", 161 | "owner": "Administrator", 162 | "permissions": [ 163 | { 164 | "create": 1, 165 | "delete": 1, 166 | "email": 1, 167 | "export": 1, 168 | "print": 1, 169 | "read": 1, 170 | "report": 1, 171 | "role": "System Manager", 172 | "share": 1, 173 | "submit": 1, 174 | "write": 1 175 | }, 176 | { 177 | "create": 1, 178 | "delete": 1, 179 | "email": 1, 180 | "export": 1, 181 | "print": 1, 182 | "read": 1, 183 | "report": 1, 184 | "role": "Restaurant Manager", 185 | "share": 1, 186 | "submit": 1, 187 | "write": 1 188 | }, 189 | { 190 | "create": 1, 191 | "email": 1, 192 | "export": 1, 193 | "print": 1, 194 | "read": 1, 195 | "report": 1, 196 | "role": "Restaurant User", 197 | "share": 1, 198 | "write": 1 199 | } 200 | ], 201 | "quick_entry": 1, 202 | "sort_field": "modified", 203 | "sort_order": "DESC", 204 | "track_changes": 1 205 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/doctype/table_order/test_table_order.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2020, Quantum Bit Core and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | # import frappe 7 | import unittest 8 | 9 | class TestTableOrder(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/page/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/page/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/page/restaurant_manage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/page/restaurant_manage/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/page/restaurant_manage/restaurant_manage.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --default_line: 1px solid rgba(119, 136, 153, 0.39); 3 | --fill_color: rgba(119, 136, 153, 0.07); 4 | --selected_color: rgba(67, 96, 125, 0.39); 5 | --margin-grid: 5px; 6 | } 7 | 8 | .restaurant-manage { 9 | position: fixed; 10 | line-height: 0; 11 | z-index: 200 !important; 12 | left: 0; 13 | top: 60px; 14 | width: 100%; 15 | height: calc(100% - 58px); 16 | } 17 | 18 | .restaurant-manage .floor-map{ 19 | height: calc(100% - 80px); 20 | position: absolute; 21 | width: 100%; 22 | } 23 | 24 | .restaurant-manage .floor-map .table-container-scroll{ 25 | height: 100%; 26 | width: 100%; 27 | overflow: auto; 28 | } 29 | 30 | .restaurant-manage .floor-selector .general-editor-button{ 31 | max-width: 50px !important; 32 | min-width: 50px !important; 33 | color: var(--selected_color) !important; 34 | } 35 | 36 | .restaurant-manage .floor-selector .btn-default.button:not(.active):not(.general-editor-button):hover{ 37 | background-color: var(--selected_color); 38 | opacity: 0.7 !important; 39 | color: var(--text-light) !important; 40 | } 41 | 42 | .restaurant-manage.editing .floor-selector .general-editor-button{ 43 | color: var(--text-color) !important; 44 | } 45 | 46 | .restaurant-manage .floor-selector .general-editor-button:hover{ 47 | border: var(--default_line); 48 | background-color: unset; 49 | color: var(--text-light) !important; 50 | } 51 | 52 | .restaurant-manage .floor-selector .general-editor-button.setting{ 53 | color: var(--text-color) !important; 54 | } 55 | 56 | .restaurant-manage.editing .floor-selector .general-editor-button.setting{ 57 | display: none; 58 | } 59 | 60 | .restaurant-manage .floor-selector .general-editor-button.add-room{ 61 | display: none; 62 | } 63 | 64 | .restaurant-manage.editing .floor-selector .general-editor-button.add-room{ 65 | display: block; 66 | } 67 | 68 | .sidebar-footer { 69 | bottom: 0; 70 | clear: both; 71 | display: block; 72 | left: 0; 73 | padding-left: 2px; 74 | position: fixed; 75 | z-index: 9999999999999 !important; 76 | width: 100%; 77 | height: 25px; 78 | background-color: var(--gray-900); 79 | color: var(--gray-300); 80 | } 81 | 82 | .sidebar-footer .restaurant-manage-status{ 83 | font-size: 14px; 84 | padding: 0; 85 | } 86 | 87 | .sidebar-footer .pos-profile{ 88 | float: right; 89 | color: var(--orange); 90 | font-size: 14px; 91 | /*font-weight: bold;*/ 92 | padding: 0 5px 0 0; 93 | } 94 | 95 | .restaurant-manage .floor-selector { 96 | line-height: 48px; 97 | font-size: 16px; 98 | display: -webkit-flex; 99 | display: flex; 100 | text-align: center; 101 | width: 100%; 102 | } 103 | 104 | .restaurant-manage.editing .floor-map .floor-map-editor{ 105 | display: block; 106 | } 107 | 108 | .restaurant-manage .floor-map .floor-map-editor.left{ 109 | left: 3px; 110 | } 111 | 112 | .restaurant-manage .floor-map .floor-map-editor.right{ 113 | right: 3px; 114 | } 115 | 116 | .restaurant-manage .floor-map .floor-map-editor{ 117 | position: absolute; 118 | display: none; 119 | margin: 5px 3px 0 0; 120 | z-index: 100000; 121 | } 122 | 123 | .restaurant-manage .floor-map .floor-map-editor .btn { 124 | opacity: 0.8; 125 | border: var(--default_line); 126 | } 127 | 128 | .restaurant-manage .floor-map .floor-map-editor .edit-button { 129 | color: #9CC2CB; 130 | } 131 | 132 | .restaurant-manage .floor-map .floor-map-editor .edit-button:hover { 133 | color: white !important; 134 | } 135 | 136 | .restaurant-manage .floor-map .floor-map-editor .edit-button small { 137 | font-size: 14px; 138 | color: white; 139 | } 140 | 141 | .restaurant-manage .bg-yellow{ 142 | background-color: #f39c12 !important; 143 | } 144 | 145 | .restaurant-manage .bg-none{ 146 | background-color: rgba(130, 130, 129, 0.44) !important; 147 | color: #7f82ac; 148 | } 149 | 150 | .restaurant-manage .fa { 151 | display: inline-block; 152 | font: normal normal normal 14px/1 FontAwesome; 153 | font-size: inherit; 154 | text-rendering: auto; 155 | -webkit-font-smoothing: antialiased; 156 | -moz-osx-font-smoothing: grayscale; 157 | } 158 | 159 | .non-selectable { 160 | -moz-user-select: none; 161 | -webkit-user-select: none; 162 | -ms-user-select: none; 163 | user-select: none; 164 | } 165 | 166 | .btn-flat{ 167 | border-radius: 1px !important; 168 | } 169 | 170 | .navbar.navbar-default.navbar-fixed-top { 171 | max-height: 20px !important; 172 | } 173 | 174 | .navbar-default .navbar-brand.navbar-home { 175 | display: block !important; 176 | } 177 | /****BUTTONS***/ -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/page/restaurant_manage/restaurant_manage.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/page/restaurant_manage/restaurant_manage.html -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/page/restaurant_manage/restaurant_manage.json: -------------------------------------------------------------------------------- 1 | { 2 | "content": null, 3 | "creation": "2020-04-03 22:00:20.706491", 4 | "docstatus": 0, 5 | "doctype": "Page", 6 | "icon": "fa fa-cutlery", 7 | "idx": 0, 8 | "modified": "2021-04-27 10:41:04.051132", 9 | "modified_by": "Administrator", 10 | "module": "Restaurant Management", 11 | "name": "restaurant-manage", 12 | "owner": "Administrator", 13 | "page_name": "Restaurant Manage", 14 | "roles": [ 15 | { 16 | "role": "Sales User" 17 | }, 18 | { 19 | "role": "Purchase User" 20 | }, 21 | { 22 | "role": "Accounts User" 23 | }, 24 | { 25 | "role": "System Manager" 26 | }, 27 | { 28 | "role": "Restaurant User" 29 | } 30 | ], 31 | "script": null, 32 | "standard": "Yes", 33 | "style": null, 34 | "system_page": 0, 35 | "title": "Restaurant Manage" 36 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/page/restaurant_manage/restaurant_manage.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | import frappe 3 | from erpnext.accounts.doctype.pos_profile.pos_profile import get_item_groups 4 | from erpnext.accounts.doctype.pos_invoice.pos_invoice import get_stock_availability 5 | 6 | class RestaurantManage: 7 | @staticmethod 8 | def production_center_notify(status): 9 | object_in_status = frappe.get_all("Status Managed Production Center", "parent", filters={ 10 | "parentType": "Restaurant Object", 11 | "status_managed": ("in", status) 12 | }) 13 | 14 | for item in object_in_status: 15 | obj = frappe.get_doc("Restaurant Object", item.parent) 16 | obj.synchronize() 17 | 18 | @staticmethod 19 | def get_rooms(): 20 | user_perm = frappe.permissions.get_doc_permissions( 21 | frappe.new_doc("Restaurant Object")) 22 | 23 | if frappe.session.user == "Administrator" or user_perm.get("write") or user_perm.get("create"): 24 | rooms = frappe.get_all("Restaurant Object", "name, description", { 25 | "type": "Room", 26 | }) 27 | else: 28 | restaurant_settings = frappe.get_single("Restaurant Settings") 29 | rooms_enabled = restaurant_settings.rooms_access() 30 | 31 | rooms = frappe.get_all("Restaurant Object", "name, description", { 32 | "type": "Room", 33 | "name": ("in", rooms_enabled) 34 | }) 35 | 36 | for room in rooms: 37 | t = frappe.get_doc("Restaurant Object", room.name) 38 | room["orders_count"] = t.orders_count 39 | 40 | return rooms 41 | 42 | @staticmethod 43 | def add_room(): 44 | room = frappe.new_doc("Restaurant Object") 45 | room.type = "Room" 46 | room.description = f"Room {(RestaurantManage().count_roms() + 1)}" 47 | room.save() 48 | 49 | return room 50 | 51 | @staticmethod 52 | def count_roms(): 53 | return frappe.db.count("Restaurant Object", filters={"type": "Room"}) 54 | 55 | @staticmethod 56 | def listener(data): 57 | for d in data: 58 | if len(data[d]["data"]) == 0: 59 | return data 60 | 61 | if d == "Table": 62 | cond = "and `table` in (%s)" % (', '.join([f"'{row}'" for row in data[d]["data"]])) 63 | 64 | oc = frappe.db.sql(f""" 65 | SELECT `table` as name, count(`table`) as count 66 | FROM `tabTable Order` 67 | WHERE status = 'Attending' {cond} 68 | GROUP by `table` 69 | """, as_dict=True) 70 | 71 | for o in oc: 72 | data[d]["data"][o.name]["count"] = o.count 73 | 74 | if d == "Room": 75 | cond = "and `room` in (%s)" % (', '.join([f"'{row}'" for row in data[d]["data"]])) 76 | 77 | oc = frappe.db.sql(f""" 78 | SELECT `room` as name, count(`room`) as count 79 | FROM `tabTable Order` 80 | WHERE status = 'Attending' {cond} 81 | GROUP by `room` 82 | """, as_dict=True) 83 | 84 | for o in oc: 85 | data[d]["data"][o.name]["count"] = o.count 86 | 87 | if d == "Production Center": 88 | for pc in data[d]["data"]: 89 | production_center = frappe.get_doc("Restaurant Object", pc) 90 | 91 | data[d]["data"][pc]["count"] = production_center.orders_count_in_production_center 92 | 93 | if d == "Process": 94 | production_center = frappe.get_doc("Restaurant Object", data[d]["data"]) 95 | status_managed = production_center.status_managed 96 | 97 | filters = { 98 | "status": ("in", [item.status_managed for item in status_managed]), 99 | "item_group": ("in", production_center._items_group), 100 | "parent": ("!=", "") 101 | } 102 | 103 | data = dict(Process=frappe.get_all("Order Entry Item", "identifier,status", filters=filters)) 104 | 105 | return data 106 | 107 | 108 | @frappe.whitelist() 109 | def get_rooms(): 110 | return RestaurantManage().get_rooms() 111 | 112 | 113 | @frappe.whitelist() 114 | def add_room(client=None): 115 | frappe.publish_realtime("check_rooms", dict( 116 | client=client, 117 | current_room=RestaurantManage().add_room().name, 118 | rooms=RestaurantManage().get_rooms() 119 | )) 120 | 121 | 122 | @frappe.whitelist(allow_guest=True) 123 | def get_work_station(): 124 | work_stations = frappe.get_all("Work Station") 125 | work_station = frappe.get_doc("Work Station", work_stations[0].name) 126 | return { 127 | "work_station": work_station, 128 | "pos_profile": frappe.get_doc("POS Profile", work_station.pos_profile) 129 | } 130 | 131 | 132 | @frappe.whitelist() 133 | def listeners(args): 134 | import json 135 | return RestaurantManage().listener(json.loads(args)) 136 | 137 | 138 | @frappe.whitelist() 139 | def get_settings_data(): 140 | restaurant_settings = frappe.get_single("Restaurant Settings") 141 | return restaurant_settings.settings_data() 142 | 143 | 144 | def pos_profile_data(): 145 | restaurant_settings = frappe.get_single("Restaurant Settings") 146 | return restaurant_settings.pos_profile_data() 147 | 148 | def set_settings_data(doc, method=None): 149 | frappe.publish_realtime("update_settings") 150 | 151 | def set_pos_profile(doc, method=None): 152 | frappe.publish_realtime("pos_profile_update", pos_profile_data()) 153 | 154 | 155 | def notify_to_check_command(command_foods): 156 | frappe.publish_realtime("notify_to_check_order_data", dict( 157 | commands_foods=command_foods 158 | )) 159 | 160 | 161 | def debug_data(data): 162 | frappe.publish_realtime("debug_data", data) 163 | 164 | 165 | @frappe.whitelist() 166 | def get_items(start, page_length, price_list, item_group, pos_profile, search_value=""): 167 | data = dict() 168 | result = [] 169 | 170 | allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock') 171 | warehouse, hide_unavailable_items = frappe.db.get_value('POS Profile', pos_profile, 172 | ['warehouse', 'hide_unavailable_items']) 173 | 174 | if not frappe.db.exists('Item Group', item_group): 175 | item_group = get_root_of('Item Group') 176 | 177 | if search_value: 178 | data = search_serial_or_batch_or_barcode_number(search_value) 179 | 180 | item_code = data.get("item_code") if data.get("item_code") else search_value 181 | serial_no = data.get("serial_no") if data.get("serial_no") else "" 182 | batch_no = data.get("batch_no") if data.get("batch_no") else "" 183 | barcode = data.get("barcode") if data.get("barcode") else "" 184 | 185 | if data: 186 | item_info = frappe.db.get_value( 187 | "Item", data.get("item_code"), 188 | ["name as item_code", "item_name", "description", "stock_uom", "image as item_image", "is_stock_item"] 189 | , as_dict=1) 190 | item_info.setdefault('serial_no', serial_no) 191 | item_info.setdefault('batch_no', batch_no) 192 | item_info.setdefault('barcode', barcode) 193 | 194 | return {'items': [item_info]} 195 | 196 | condition = get_conditions(item_code, serial_no, batch_no, barcode) 197 | condition += get_item_group_condition(pos_profile) 198 | 199 | lft, rgt = frappe.db.get_value('Item Group', item_group, ['lft', 'rgt']) 200 | 201 | bin_join_selection, bin_join_condition = "", "" 202 | if hide_unavailable_items: 203 | bin_join_selection = ", `tabBin` bin" 204 | bin_join_condition = "AND bin.warehouse = %(warehouse)s AND bin.item_code = item.name AND bin.actual_qty > 0" 205 | 206 | items_data = frappe.db.sql(""" 207 | SELECT 208 | item.name AS item_code, 209 | item.item_name, 210 | item.description, 211 | item.stock_uom, 212 | item.image AS item_image, 213 | item.is_stock_item 214 | FROM 215 | `tabItem` item {bin_join_selection} 216 | WHERE 217 | item.disabled = 0 218 | AND item.has_variants = 0 219 | AND item.is_sales_item = 1 220 | AND item.is_fixed_asset = 0 221 | AND item.item_group in (SELECT name FROM `tabItem Group` WHERE lft >= {lft} AND rgt <= {rgt}) 222 | AND {condition} 223 | {bin_join_condition} 224 | ORDER BY 225 | item.name asc 226 | LIMIT 227 | {start}, {page_length}""" 228 | .format( 229 | start=start, 230 | page_length=page_length, 231 | lft=lft, 232 | rgt=rgt, 233 | condition=condition, 234 | bin_join_selection=bin_join_selection, 235 | bin_join_condition=bin_join_condition 236 | ), {'warehouse': warehouse}, as_dict=1) 237 | 238 | if items_data: 239 | items = [d.item_code for d in items_data] 240 | item_prices_data = frappe.get_all("Item Price", 241 | fields=["item_code", "price_list_rate", "currency"], 242 | filters={'price_list': price_list, 'item_code': ['in', items]}) 243 | 244 | item_prices = {} 245 | for d in item_prices_data: 246 | item_prices[d.item_code] = d 247 | 248 | for item in items_data: 249 | item_code = item.item_code 250 | item_price = item_prices.get(item_code) or {} 251 | if allow_negative_stock: 252 | item_stock_qty = \ 253 | frappe.db.sql("""select ifnull(sum(actual_qty), 0) from `tabBin` where item_code = %s""", item_code)[0][ 254 | 0] 255 | else: 256 | item_stock_qty = get_stock_availability(item_code, warehouse) 257 | 258 | row = {} 259 | row.update(item) 260 | row.update({ 261 | 'price_list_rate': item_price.get('price_list_rate'), 262 | 'currency': item_price.get('currency'), 263 | 'actual_qty': item_stock_qty, 264 | }) 265 | result.append(row) 266 | 267 | res = { 268 | 'items': result 269 | } 270 | 271 | return res 272 | 273 | def get_conditions(item_code, serial_no, batch_no, barcode): 274 | if serial_no or batch_no or barcode: 275 | return "item.name = {0}".format(frappe.db.escape(item_code)) 276 | 277 | return """(item.name like {item_code} 278 | or item.item_name like {item_code})""".format(item_code = frappe.db.escape('%' + item_code + '%')) 279 | 280 | def get_item_group_condition(pos_profile): 281 | cond = "and 1=1" 282 | item_groups = get_item_groups(pos_profile) 283 | if item_groups: 284 | cond = "and item.item_group in (%s)"%(', '.join(['%s']*len(item_groups))) 285 | 286 | return cond % tuple(item_groups) -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/print_format/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/print_format/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/print_format/order_account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/print_format/order_account/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/print_format/order_account/order_account.json: -------------------------------------------------------------------------------- 1 | { 2 | "absolute_value": 0, 3 | "align_labels_right": 0, 4 | "creation": "2021-07-21 20:04:12.382449", 5 | "custom_format": 1, 6 | "default_print_language": "en", 7 | "disabled": 0, 8 | "doc_type": "Table Order", 9 | "docstatus": 0, 10 | "doctype": "Print Format", 11 | "font": "Default", 12 | "html": "\n\n{% if letter_head %}\n {{ letter_head }}\n{% endif %}\n\n

\n\t{{ doc.company }}
\n\t{{ _(\"Restaurant Order\") }}
\n

\n

\n\t{{ _(\"Receipt No\") }}: {{ doc.name }}
\n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}
\n\t{{ _(\"Table\") }}: {{ doc.table_description }}\n

\n\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{%- for item in doc.entry_items -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endfor -%}\n\t\n
{{ _(\"Item\") }}{{ _(\"Qty\") }}{{ _(\"Amount\") }}
\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t
{{ item.item_name }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.serial_no -%}\n\t\t\t\t\t
{{ _(\"SR.No\") }}:
\n\t\t\t\t\t{{ item.serial_no | replace(\"\\n\", \", \") }}\n\t\t\t\t{%- endif -%}\n\t\t\t
{{ item.qty }}
@ {{ item.get_formatted(\"rate\") }}
{{ item.get_formatted(\"amount\") }}
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t{{ _(\"Tax\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"tax\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"amount\") }}\n\t\t\t
\n
\n
\n

{{ _(\"Thank you, please visit again.\") }}

", 13 | "idx": 0, 14 | "line_breaks": 0, 15 | "modified": "2021-07-23 18:00:28.460556", 16 | "modified_by": "Administrator", 17 | "module": "Restaurant Management", 18 | "name": "Order Account", 19 | "owner": "Administrator", 20 | "print_format_builder": 0, 21 | "print_format_type": "Jinja", 22 | "raw_printing": 0, 23 | "show_section_headings": 0, 24 | "standard": "Yes" 25 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/report/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/report/restaurant_order_analytics/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/restaurant_management/report/restaurant_order_analytics/__init__.py -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/report/restaurant_order_analytics/restaurant_order_analytics.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Quantum Bit Core and contributors 2 | // For license information, please see license.txt 3 | /* eslint-disable */ 4 | 5 | frappe.query_reports["Restaurant Order Analytics"] = { 6 | "filters": [ 7 | 8 | ] 9 | }; 10 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/report/restaurant_order_analytics/restaurant_order_analytics.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 1, 3 | "creation": "2020-07-23 23:54:31.089254", 4 | "disable_prepared_report": 0, 5 | "disabled": 0, 6 | "docstatus": 0, 7 | "doctype": "Report", 8 | "idx": 0, 9 | "is_standard": "Yes", 10 | "json": "{}", 11 | "modified": "2020-07-23 23:54:49.631440", 12 | "modified_by": "Administrator", 13 | "module": "Restaurant Management", 14 | "name": "Restaurant Order Analytics", 15 | "owner": "Administrator", 16 | "prepared_report": 0, 17 | "ref_doctype": "Table Order", 18 | "report_name": "Restaurant Order Analytics", 19 | "report_type": "Report Builder", 20 | "roles": [ 21 | { 22 | "role": "Stock User" 23 | }, 24 | { 25 | "role": "Accounts User" 26 | }, 27 | { 28 | "role": "Sales Manager" 29 | }, 30 | { 31 | "role": "Restaurant Manager" 32 | }, 33 | { 34 | "role": "Restaurant User" 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/report/restaurant_order_analytics/restaurant_order_analytics.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Quantum Bit Core and contributors 2 | # For license information, please see license.txt 3 | 4 | from __future__ import unicode_literals 5 | # import frappe 6 | 7 | def execute(filters=None): 8 | columns, data = [], [] 9 | return columns, data 10 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/restaurant_manage.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | import frappe 3 | from frappe import _ 4 | 5 | 6 | def check_exceptions(model, error_message): 7 | if frappe.session.user == "Administrator": 8 | return True 9 | 10 | if frappe.has_permission(model["name"], model["action"]): 11 | has_permission = True 12 | 13 | if model["data"].owner != frappe.session.user or model["short_name"] == "table": 14 | has_permission = False 15 | 16 | exceptions = frappe.get_single("Restaurant Settings") 17 | profile = frappe.db.get_value("User", frappe.session.user, "role_profile_name") 18 | 19 | permissions = frappe.db.get_all("Restaurant Exceptions", fields=( 20 | "order_write", "order_delete", "order_manage" 21 | ), filters={ 22 | "role_profile": profile 23 | }) 24 | 25 | if model["short_name"] == "order" and not exceptions.restricted_to_owner_order: 26 | has_permission = True 27 | 28 | if model["short_name"] == "table" and not exceptions.restricted_to_owner_table: 29 | has_permission = True 30 | 31 | for permission in permissions: 32 | if model["short_name"] == "order" and exceptions.restricted_to_owner_order: 33 | has_permission = permission[f'{model["short_name"]}_{model["action"]}'] 34 | 35 | if model["short_name"] == "table" and exceptions.restricted_to_owner_table: 36 | has_permission = permission[f'{model["short_name"]}_{model["action"]}'] 37 | 38 | if not has_permission: 39 | frappe.throw(_(error_message)) 40 | else: 41 | frappe.throw(_("You do not have permissions to update " + model["short_name"])) 42 | 43 | return True 44 | -------------------------------------------------------------------------------- /restaurant_management/restaurant_management/workspace/restaurant_management/restaurant_management.json: -------------------------------------------------------------------------------- 1 | { 2 | "charts": [], 3 | "content": "[{\"id\":\"s5pXpGLdkx\",\"type\":\"header\",\"data\":{\"text\":\"Restaurant Management\",\"col\":12}},{\"id\":\"hRP5CGZTdn\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"POS Restaurant\",\"col\":3}},{\"id\":\"XeZ7JpnXpW\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"SGeM1vjaSO\",\"type\":\"card\",\"data\":{\"card_name\":\"Profile\",\"col\":4}},{\"id\":\"TakfKRxIpo\",\"type\":\"card\",\"data\":{\"card_name\":\"Shift\",\"col\":4}},{\"id\":\"f9pyLDHT6e\",\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}}]", 4 | "creation": "2023-04-26 17:15:35.609631", 5 | "docstatus": 0, 6 | "doctype": "Workspace", 7 | "for_user": "", 8 | "hide_custom": 0, 9 | "icon": "sell", 10 | "idx": 0, 11 | "is_hidden": 0, 12 | "label": "Restaurant Management", 13 | "links": [ 14 | { 15 | "hidden": 0, 16 | "is_query_report": 0, 17 | "label": "POS Restaurant", 18 | "link_count": 0, 19 | "link_to": "restaurant-manage", 20 | "link_type": "Page", 21 | "onboard": 0, 22 | "type": "Link" 23 | }, 24 | { 25 | "hidden": 0, 26 | "is_query_report": 0, 27 | "label": "POS Profile", 28 | "link_count": 0, 29 | "link_to": "POS Profile", 30 | "link_type": "DocType", 31 | "onboard": 0, 32 | "type": "Link" 33 | }, 34 | { 35 | "hidden": 0, 36 | "is_query_report": 0, 37 | "label": "Opening Entry", 38 | "link_count": 0, 39 | "link_to": "POS Opening Entry", 40 | "link_type": "DocType", 41 | "onboard": 0, 42 | "type": "Link" 43 | }, 44 | { 45 | "hidden": 0, 46 | "is_query_report": 0, 47 | "label": "Settings", 48 | "link_count": 0, 49 | "link_to": "Restaurant Settings", 50 | "link_type": "DocType", 51 | "onboard": 0, 52 | "type": "Link" 53 | }, 54 | { 55 | "hidden": 0, 56 | "is_query_report": 0, 57 | "label": "Profile", 58 | "link_count": 1, 59 | "onboard": 0, 60 | "type": "Card Break" 61 | }, 62 | { 63 | "hidden": 0, 64 | "is_query_report": 0, 65 | "label": "POS Profile", 66 | "link_count": 0, 67 | "link_to": "POS Profile", 68 | "link_type": "DocType", 69 | "onboard": 0, 70 | "type": "Link" 71 | }, 72 | { 73 | "hidden": 0, 74 | "is_query_report": 0, 75 | "label": "Shift", 76 | "link_count": 1, 77 | "onboard": 0, 78 | "type": "Card Break" 79 | }, 80 | { 81 | "hidden": 0, 82 | "is_query_report": 0, 83 | "label": "Opening Entry", 84 | "link_count": 0, 85 | "link_to": "POS Opening Entry", 86 | "link_type": "DocType", 87 | "onboard": 0, 88 | "type": "Link" 89 | }, 90 | { 91 | "hidden": 0, 92 | "is_query_report": 0, 93 | "label": "Settings", 94 | "link_count": 1, 95 | "onboard": 0, 96 | "type": "Card Break" 97 | }, 98 | { 99 | "hidden": 0, 100 | "is_query_report": 0, 101 | "label": "Settings", 102 | "link_count": 0, 103 | "link_to": "Restaurant Settings", 104 | "link_type": "DocType", 105 | "onboard": 0, 106 | "type": "Link" 107 | } 108 | ], 109 | "modified": "2023-04-26 17:26:17.825621", 110 | "modified_by": "Administrator", 111 | "module": "Restaurant Management", 112 | "name": "Restaurant Management", 113 | "number_cards": [], 114 | "owner": "Administrator", 115 | "parent_page": "", 116 | "public": 1, 117 | "quick_lists": [], 118 | "roles": [], 119 | "sequence_id": 31.0, 120 | "shortcuts": [ 121 | { 122 | "color": "Grey", 123 | "doc_view": "List", 124 | "label": "POS Restaurant", 125 | "link_to": "restaurant-manage", 126 | "type": "Page" 127 | } 128 | ], 129 | "title": "Restaurant Management" 130 | } 131 | -------------------------------------------------------------------------------- /restaurant_management/setup/install.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | from faulthandler import disable 3 | import frappe 4 | from itertools import chain 5 | 6 | docs = { 7 | "POS Profile User": dict( 8 | restaurant_permission=dict(label="Restaurant Permission", fieldtype="Button", 9 | options="Restaurant Permission", insert_after="User", in_list_view=1, read_only=1), 10 | parent=dict(label="Parent", fieldtype="Data", hidden=1), 11 | parenttype=dict(label="Parent Type", fieldtype="Data", hidden=1), 12 | restaurant_permissions=dict(label="Restaurant Permissions", fieldtype="Table", 13 | options="Restaurant Permission", hidden=1, insert_after="Restaurant Permission"), 14 | ), 15 | "POS Profile": dict( 16 | posa_tax_inclusive=dict( 17 | label="Tax Inclusive", fieldtype="Check", insert_after="tax_category", default_value=1) 18 | ), 19 | "POS Invoice Item": dict( 20 | identifier=dict(label="Identifier", fieldtype="Data"), 21 | ), 22 | "Sales Invoice Item": dict( 23 | identifier=dict(label="Identifier", fieldtype="Data"), 24 | ) 25 | } 26 | 27 | fields_not_needed = ['parent', 'parenttype', 'restaurant_permissions'] 28 | 29 | def after_install(): 30 | clear_custom_fields(); 31 | set_custom_fields() 32 | set_custom_scripts() 33 | 34 | def clear_custom_fields(): 35 | for doc in docs: 36 | for field_name in docs[doc]: 37 | if (field_name in fields_not_needed): 38 | test_field = frappe.get_value( 39 | "Custom Field", doc + "-" + field_name) 40 | 41 | if test_field is not None: 42 | frappe.db.sql("""DELETE FROM `tabCustom Field` WHERE name=%s""", test_field) 43 | 44 | def set_custom_fields(): 45 | for doc in docs: 46 | for field_name in docs[doc]: 47 | if (field_name in fields_not_needed): 48 | continue 49 | 50 | test_field = frappe.get_value( 51 | "Custom Field", doc + "-" + field_name) 52 | 53 | if test_field is None or field_name != "posa_tax_inclusive": 54 | CF = frappe.new_doc("Custom Field") if test_field is None else frappe.get_doc( 55 | "Custom Field", test_field) 56 | 57 | _values = dict(chain.from_iterable(d.items() for d in ( 58 | docs[doc][field_name], dict(dt=doc, fieldname=field_name)))) 59 | 60 | for key in _values: 61 | CF.set(key, _values[key]) 62 | 63 | CF.insert() if test_field is None else CF.save() 64 | 65 | 66 | def set_custom_scripts(): 67 | test_script = frappe.get_value("Client Script", "POS Profile-Form") 68 | if test_script is None: 69 | CS = frappe.new_doc("Client Script") 70 | CS.set("name", "POS Profile-Form") 71 | else: 72 | CS = frappe.get_doc("Client Script", test_script) 73 | 74 | CS.set("enabled", 1) 75 | CS.set("view", "Form") 76 | CS.set("dt", "POS Profile") 77 | CS.set("script", """ 78 | frappe.ui.form.on('POS Profile', { 79 | refresh(frm) { 80 | //refresh 81 | } 82 | }); 83 | 84 | frappe.ui.form.on('POS Profile User', { 85 | restaurant_permission(frm, cdt, cdn) { 86 | if(cdn.includes('new')){ 87 | frappe.show_alert(__("Save the record before assigning permissions")); 88 | return; 89 | } 90 | 91 | new DeskForm({ 92 | form_name: 'Restaurant Permission Manage', 93 | doc_name: cdn, 94 | callback: (self) => { 95 | self.hide(); 96 | }, 97 | title: __(`Room Access`), 98 | field_properties: { 99 | pos_profile_user: { 100 | value: cdn 101 | }, 102 | 'restaurant_permission.room': { 103 | "get_query": () => { 104 | return { 105 | filters: [ 106 | ['type', '=', 'Room'] 107 | ] 108 | } 109 | } 110 | } 111 | } 112 | }); 113 | } 114 | });""" 115 | ) 116 | CS.insert() if test_script is None else CS.save() 117 | -------------------------------------------------------------------------------- /restaurant_management/templates/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/templates/__init__.py -------------------------------------------------------------------------------- /restaurant_management/templates/pages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphabit-technology/erpnext-restaurant/446759bd0c5c163e614140780c5a2318e3b783d9/restaurant_management/templates/pages/__init__.py -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from setuptools import setup, find_packages 3 | 4 | with open('requirements.txt') as f: 5 | install_requires = f.read().strip().split('\n') 6 | 7 | # get version from __version__ variable in restaurant_management/__init__.py 8 | from restaurant_management import __version__ as version 9 | 10 | setup( 11 | name='restaurant_management', 12 | version=version, 13 | description='Restaurant', 14 | author='Quantum Bit Core', 15 | author_email='qubitcore.io@gmail.com', 16 | packages=find_packages(), 17 | zip_safe=False, 18 | include_package_data=True, 19 | install_requires=install_requires 20 | ) 21 | --------------------------------------------------------------------------------