diff --git a/Gemfile b/Gemfile index 63dfa163..73701b6c 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ gem 'rails', '~> 5.1.0' #gem 'mysql2', '>= 0.3.18', '< 0.5' gem 'pg' -gem 'mysql2', '>= 0.3.18', '< 0.5' +gem 'mysql2' #Use PosgreSQL @@ -41,12 +41,13 @@ gem 'rack-cors' # image upload gem 'carrierwave', '~> 1.0' gem 'mini_magick' -gem 'jquery-fileupload-rails' +gem 'jquery-fileupload-rails', '~> 0.4.7' #Report and Printing gems gem 'cups' gem 'prawn' gem 'prawn-table' +gem 'prawn-qrcode' gem 'to_xls-rails' gem 'rubyzip', '= 1.0.0' gem 'axlsx', '= 2.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index a983f5c1..0db34edf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,88 +1,92 @@ GIT remote: https://github.com/capistrano/rbenv.git - revision: c029e4128e4a8f25adda35795f5729bd4f62e51f + revision: b8807f3bbb3f424ac42cc8838a38822e028d0aa3 specs: - capistrano-rbenv (2.1.3) + capistrano-rbenv (2.1.4) capistrano (~> 3.1) sshkit (~> 1.3) GEM remote: https://rubygems.org/ specs: - actioncable (5.1.4) - actionpack (= 5.1.4) + actioncable (5.1.7) + actionpack (= 5.1.7) nio4r (~> 2.0) websocket-driver (~> 0.6.1) - actionmailer (5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) + actionmailer (5.1.7) + actionpack (= 5.1.7) + actionview (= 5.1.7) + activejob (= 5.1.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.1.4) - actionview (= 5.1.4) - activesupport (= 5.1.4) + actionpack (5.1.7) + actionview (= 5.1.7) + activesupport (= 5.1.7) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.1.4) - activesupport (= 5.1.4) + actionview (5.1.7) + activesupport (= 5.1.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.1.4) - activesupport (= 5.1.4) + activejob (5.1.7) + activesupport (= 5.1.7) globalid (>= 0.3.6) - activemodel (5.1.4) - activesupport (= 5.1.4) - activerecord (5.1.4) - activemodel (= 5.1.4) - activesupport (= 5.1.4) + activemodel (5.1.7) + activesupport (= 5.1.7) + activerecord (5.1.7) + activemodel (= 5.1.7) + activesupport (= 5.1.7) arel (~> 8.0) - activesupport (5.1.4) + activesupport (5.1.7) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) + i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) aescrypt (1.0.0) - airbrussh (1.3.0) + airbrussh (1.4.0) sshkit (>= 1.6.1, != 1.7.0) arel (8.0.0) axlsx (2.0.1) htmlentities (~> 4.3.1) nokogiri (>= 1.4.1) rubyzip (~> 1.0.0) - axlsx_rails (0.5.1) + axlsx_rails (0.5.2) actionpack (>= 3.1) axlsx (>= 2.0.1) - bcrypt (3.1.11) - bindex (0.5.0) + bcrypt (3.1.13) + bindex (0.8.1) builder (3.2.3) - byebug (9.1.0) + byebug (11.0.1) cancancan (1.17.0) capistrano (3.10.1) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) sshkit (>= 1.9.0) - capistrano-bundler (1.3.0) + capistrano-bundler (1.6.0) capistrano (~> 3.1) - sshkit (~> 1.2) - capistrano-rails (1.3.1) + capistrano-rails (1.4.0) capistrano (~> 3.1) capistrano-bundler (~> 1.1) +<<<<<<< HEAD capistrano3-puma (3.1.1) capistrano (~> 3.7) capistrano-bundler puma (~> 3.4) carrierwave (1.2.1) +======= + carrierwave (1.3.1) +>>>>>>> b025cc2cfd2b10df84cc1cee458efa4eef108752 activemodel (>= 4.0.0) activesupport (>= 4.0.0) mime-types (>= 1.16) - chartkick (2.2.5) + chartkick (3.2.1) chronic (0.10.2) + chunky_png (1.3.11) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -90,46 +94,45 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.0.5) - connection_pool (2.2.1) - crass (1.0.2) + concurrent-ruby (1.1.5) + connection_pool (2.2.2) + crass (1.0.5) cups (0.1.10) - database_cleaner (1.6.2) + database_cleaner (1.7.0) diff-lcs (1.3) - erubi (1.7.0) + erubi (1.9.0) execjs (2.7.0) factory_girl (4.9.0) activesupport (>= 3.0.0) factory_girl_rails (4.9.0) factory_girl (~> 4.9.0) railties (>= 3.0.0) - faker (1.8.4) - i18n (~> 0.5) - ffi (1.9.18) - filterrific (2.1.2) - font-awesome-rails (4.7.0.2) - railties (>= 3.2, < 5.2) - globalid (0.4.1) + faker (2.5.0) + i18n (~> 1.6.0) + ffi (1.11.1) + filterrific (5.2.1) + font-awesome-rails (4.7.0.5) + railties (>= 3.2, < 6.1) + globalid (0.4.2) activesupport (>= 4.2.0) htmlentities (4.3.4) - httparty (0.15.6) + httparty (0.15.7) multi_xml (>= 0.5.2) - i18n (0.9.1) + i18n (1.7.0) concurrent-ruby (~> 1.0) - jbuilder (2.7.0) + jbuilder (2.9.1) activesupport (>= 4.2.0) - multi_json (>= 1.2) jquery-fileupload-rails (0.4.7) actionpack (>= 3.1) railties (>= 3.1) sass (>= 3.2) - jquery-rails (4.3.1) + jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-ui-rails (6.0.1) railties (>= 3.2.16) - json (2.1.0) + json (2.2.0) kaminari (1.0.1) activesupport (>= 4.1.0) kaminari-actionview (= 1.0.1) @@ -145,108 +148,114 @@ GEM listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.1.1) + loofah (2.3.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.0) + mail (2.7.1) mini_mime (>= 0.1.1) material_icons (2.2.1) railties (>= 3.2) - method_source (0.9.0) - mime-types (3.1) + method_source (0.9.2) + mime-types (3.3) mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_magick (4.8.0) - mini_mime (1.0.0) - mini_portile2 (2.3.0) - minitest (5.10.3) - momentjs-rails (2.17.1) + mime-types-data (3.2019.1009) + mini_magick (4.9.5) + mini_mime (1.0.2) + mini_portile2 (2.4.0) + minitest (5.12.2) + momentjs-rails (2.20.1) railties (>= 3.1) - multi_json (1.12.2) multi_xml (0.6.0) - mysql2 (0.4.10) + mysql2 (0.5.2) nested_form (0.3.2) - net-scp (1.2.1) - net-ssh (>= 2.6.5) - net-ssh (4.2.0) - nio4r (2.1.0) - nokogiri (1.8.1) - mini_portile2 (~> 2.3.0) + net-scp (2.0.0) + net-ssh (>= 2.6.5, < 6.0.0) + net-ssh (5.2.0) + nio4r (2.5.2) + nokogiri (1.10.4) + mini_portile2 (~> 2.4.0) pdf-core (0.7.0) - pdfjs_viewer-rails (0.2.0) + pdfjs_viewer-rails (0.3.1) json (> 1.8.4) rails (> 4.2.0) sass-rails (~> 5.0) - pg (0.21.0) + pg (1.1.4) prawn (2.2.2) pdf-core (~> 0.7.0) ttfunk (~> 1.5) + prawn-qrcode (0.4.0) + prawn (>= 1) + rqrcode (>= 1.0.0) prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) - puma (3.10.0) - rack (2.0.3) - rack-cors (1.0.2) - rack-protection (2.0.0) + puma (3.12.1) + rack (2.0.7) + rack-cors (1.0.3) + rack-protection (2.0.7) rack - rack-test (0.7.0) + rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.1.4) - actioncable (= 5.1.4) - actionmailer (= 5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) - activemodel (= 5.1.4) - activerecord (= 5.1.4) - activesupport (= 5.1.4) + rails (5.1.7) + actioncable (= 5.1.7) + actionmailer (= 5.1.7) + actionpack (= 5.1.7) + actionview (= 5.1.7) + activejob (= 5.1.7) + activemodel (= 5.1.7) + activerecord (= 5.1.7) + activesupport (= 5.1.7) bundler (>= 1.3.0) - railties (= 5.1.4) + railties (= 5.1.7) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (5.1.4) - actionpack (= 5.1.4) - activesupport (= 5.1.4) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.1.7) + actionpack (= 5.1.7) + activesupport (= 5.1.7) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.2.1) - rb-fsevent (0.10.2) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) + rake (13.0.0) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) redis (3.3.5) roo (1.13.2) nokogiri rubyzip spreadsheet (> 0.6.4) - rspec-core (3.7.0) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) + rqrcode (1.1.1) + chunky_png (~> 1.0) + rqrcode_core (~> 0.1.0) + rqrcode_core (0.1.0) + rspec-core (3.8.2) + rspec-support (~> 3.8.0) + rspec-expectations (3.8.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-mocks (3.7.0) + rspec-support (~> 3.8.0) + rspec-mocks (3.8.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-rails (3.7.1) + rspec-support (~> 3.9.0) + rspec-rails (3.9.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.0) - ruby-ole (1.2.12.1) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-support (~> 3.8.0) + rspec-support (3.8.3) + ruby-ole (1.2.12.2) rubyzip (1.0.0) - sass (3.5.3) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.6) + sass-rails (5.0.7) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) @@ -254,57 +263,57 @@ GEM tilt (>= 1.1, < 3) schema_to_scaffold (0.8.0) activesupport (>= 3.2.1) - shoulda-matchers (3.1.2) + shoulda-matchers (3.1.3) activesupport (>= 4.0.0) - sidekiq (5.0.5) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) + sidekiq (5.2.7) + connection_pool (~> 2.2, >= 2.2.2) + rack (>= 1.5.0) rack-protection (>= 1.5.0) - redis (>= 3.3.4, < 5) - simple_form (3.5.0) - actionpack (> 4, < 5.2) - activemodel (> 4, < 5.2) - spreadsheet (1.1.4) + redis (>= 3.3.5, < 5) + simple_form (5.0.1) + actionpack (>= 5.0) + activemodel (>= 5.0) + spreadsheet (1.2.4) ruby-ole (>= 1.0) spring (2.0.2) activesupport (>= 4.2) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (3.7.1) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sshkit (1.15.1) + sshkit (1.20.0) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) tether-rails (1.4.0) rails (>= 3.1) - thor (0.20.0) + thor (0.20.3) thread_safe (0.3.6) - tilt (2.0.8) + tilt (2.0.10) to_xls-rails (1.3.1) spreadsheet (>= 0.8.5) ttfunk (1.5.1) - turbolinks (5.0.1) - turbolinks-source (~> 5) - turbolinks-source (5.0.3) - tzinfo (1.2.4) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (3.2.0) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) - web-console (3.5.1) + web-console (3.7.0) actionview (>= 5.0) activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - whenever (0.9.7) + websocket-extensions (0.1.4) + whenever (1.0.0) chronic (>= 0.6.3) PLATFORMS @@ -333,7 +342,7 @@ DEPENDENCIES font-awesome-rails (~> 4.7, >= 4.7.0.2) httparty (~> 0.15.5) jbuilder (~> 2.5) - jquery-fileupload-rails + jquery-fileupload-rails (~> 0.4.7) jquery-rails jquery-ui-rails kaminari (~> 1.0.1) @@ -341,11 +350,12 @@ DEPENDENCIES material_icons mini_magick momentjs-rails - mysql2 (>= 0.3.18, < 0.5) + mysql2 nested_form pdfjs_viewer-rails pg prawn + prawn-qrcode prawn-table puma (~> 3.0) rack-cors @@ -370,7 +380,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 2.4.1p111 + ruby 2.3.1p112 BUNDLED WITH 2.0.2 diff --git a/README.md b/README.md index 0621cc43..4d81b144 100755 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Osaka => Campaign Id => {"campaign_type_id": 5} BITP - Auth Token => pZBHXEFbGNj/G => New => V3 + Auth Token => pZBHXEFbGNj/G => New => V3 iua0SjUHzRaQw => rj0MJ0XI5GsKZehE => Old => V2 => code2lab => Old @@ -34,11 +34,11 @@ Person and Extra Time 2) must create Adult and Child in settings/item_attributes 3) must be PSA_[a-z/0-9] for Adult and PSC_[a-z/0-9] for Child in settings/menu_categories/[cat_id]/simple_menu_items 3) must be PSAI_[a-z/0-9] for Adult and PSCI_[a-z/0-9] for Child in settings/simple_menu_items/[item_id]/menu_item_instances - -For Extra Time - item_instance_code + +For Extra Time + item_instance_code * must start with 'Ext'[a..z]'_'[1..100] - * note : don't add character after '_' + * note : don't add character after '_' For Order Printing 1)) ********* Order Pdf ********* @@ -50,18 +50,18 @@ For Order Printing 1) settings/print_settings (a) Unique Code => OrderSetItemPdf & OrderSummarySetPdf (b) Font is present => {Header font size:11, Item Font Size:9} - Font is blank => {Header font size:12, Item Font Size:10} + Font is blank => {Header font size:12, Item Font Size:10} 3)) ********* Order Slim Pdf ********* 1) settings/print_settings (a) Unique Code => OrderItemSlimPdf & OrderSummarySlimPdf (b) Font is present => {Header font size:11, Item Font Size:9} Font is blank => {Header font size:12, Item Font Size:10} 4)) ********* Order Customise PDF ********* - 1) settings/print_settings + 1) settings/print_settings (a) Unique Code => OrderItemCustomisePdf & OrderSummaryCustomisePdf - (b) Can change Header font size and Item Font Size as you like + (b) Can change Header font size and Item Font Size as you like 5)) ********* Order Set Pdf ********* - 1) settings/print_settings + 1) settings/print_settings (a) Unique Code => OrderSetItemCustomisePdf & OrderSummarySetCustomisePdf (b) Can change Header font size and Item Font Size as you like 6)) ********* Order Slim Customise PDF @@ -82,6 +82,23 @@ For ReceiptBillA5Pdf For ReceiptBillAltName options 1) settings/lookups => { type:print_settings, name:ReceiptBillAltName, value:1 } +For Using Star Printer + *** Need to change these print settings + 1) settings/print_settings/unique_code => OrderItemStarPdf + 2) settings/print_settings/unique_code => ReceiptBillStarPdf + 3) settings/print_settings/unique_code => SaleItemsStarPdf + *** Other print settings aren't need to change. + +For Show Sale Items Summary at CloseCashierPrint + 1) settings/print_settings + a) Check => Shift Sale Items + +For Show/Hide AddOrder Button in QuickService + 1) settings/lookups => {type:quickservice_add_order, name: QuickServiceAddOrder, value:1 OR 0} + +For Show Print Button in ReceiptNo Report + 1) settings/lookups => {type:reprint_receipt, name: Reprint Receipt in Report, value:1} + For Bank Integration setting 1) rake db:migrate for card_sale_trans, card_settle_trans 2) settings/lookups => { type:bank_integration, name: Bank Integration, value:1 } @@ -100,20 +117,20 @@ For call waiter pdf i) Name : Calling Waiter ii) Unique Code: CallWaiterPdf iii)Template: ... - iv) Font: Zawgyi-One + iv) Font: Zawgyi-One v) Printer: #printer name Membership Actions SQL * update membership_actions set additional_parameter='{\"campaign_type_id\":5}' where id=10; SQL Update after rake clear:data runned - * update seed_generators + * update seed_generators i) TableBooking, Order, OrderItem, sale, SaleOrder, SaleItem, SaleTax, SalePayment, SaleAudit, AssignedOrderItem => { current:0, next:0 } - ** Note :: do not update Customer + ** Note :: do not update Customer Change type in mysql *run if you got font error for Myanmar, Chinese, etc... - => ALTER TABLE [table_name] CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci #for table + => ALTER TABLE [table_name] CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci #for table => ALTER DATABASE [database_name] CHARACTER SET utf8 COLLATE utf8_unicode_ci #for database For split bill @@ -124,9 +141,9 @@ For Sidekiq => Create New Lookups => lookup_type = sidekiq, Name = sidekiq , Value = 1 or 0 For Clear Menu - 1) rake clear:menu # menu,menu item,menu category,menu item instance,account,item option,item attribute,item set - -For Check CUp status + 1) rake clear:menu # menu,menu item,menu category,menu item instance,account,item option,item attribute,item set + +For Check CUp status ###please open sudo cat /etc/sudoers ### cope and parse @@ -177,16 +194,16 @@ For CloseCashierCustomisePdf in lookups 1) settings/print_settings 2) settings/lookups => { type:print_settings, name: CloseCashierCustomisePdf, value:1 } -<---- Extra Fields Script -----> -For MoveTablePdf in lookups +<---- Extra Fields Script -----> +For MoveTablePdf in lookups *** Both Table and Room Moving *** 1) settings/lookups => { type:print_settings, name: MoveTablePdf, value:1 } -For MoveTablePdf in print settings - * Backend > Printer > Print Settings > New - i) Name : Move Table - ii) Unique Code: MoveTablePdf - iii)Template: ... +For MoveTablePdf in print settings + * Backend > Printer > Print Settings > New + i) Name : Move Table + ii) Unique Code: MoveTablePdf + iii)Template: ... iv) Font: Zawgyi-One v) Printer: #printer name /* Tax Profile Group Types in lookups */ @@ -200,7 +217,7 @@ For MoveTablePdf in print settings 1) settings/lookups => { type:ReceiptPdfView, name: Receipt Pdf View, value:1 or 0 } => 1 is active and 0 is in-active -Add Kitchen Role of Employee +Add Kitchen Role of Employee => 1) settings/lookups => { type:employee_roles, name: Kitchen, value:kitchen } Add Base URL for DOEMAL @@ -235,12 +252,12 @@ For Login expiry time Menu Image (Import guideline) - => First, check shop_code, is there in shops table and prefix shop_code in image name? + => First, check shop_code, is there in shops table and prefix shop_code in image name? => You all must do this step * If there is shop_code in shops table (mark in one place/ note and set NULL for this record for a while) and prefix shop_code for image name (like (121_ABC.png)), and copy and paste images into Application/[sxrestaurant]/public/image/menu_images. * If there is shop_code/ no shop_code in shops table but no prefix in image name (* skip set NULL step) , copy and paste images into Application/…./image/menu_images. => Second, import [menu].xlsx file in /settings/menus and then checked image is uploaded into Application/[sxrestaurant]/public/image/menu_images and insert into menu_items table in database. - => Last, if shop has shop_code, update marked/noted shop_code into shops table again. + => Last, if shop has shop_code, update marked/noted shop_code into shops table again. For Edit Order Open & Close 1) settings/lookups => {type:edit_order, name:EditOrderOrigami, value: {1 or 0}} @@ -273,13 +290,22 @@ For Online Order Receipt Setting 1) settings/lookups => { type:order_reservation, name:ReceiptBill, value: {0 or 1} } 2) settings/print_settings => {name: ReceiptBillOrder, unique_code: ReceiptBillOrderPdf, ....} +For Close Cashier Print Settings +settings/lookups => {type:close_cashier_print, name:CloseCashierPrint, value: {0 or 1} } + +For Second Display View Setting +settings/lookups => {type:display_type, name: Display Type, value: 2} + +For show total before tax in receipt bill +settings/lookups => {type:show_total_before_tax, name:Show Total Before Tax, value: {0 or 1}} + * ToDo list 1. Migration 2. Quick Service 3. Order & Reservation - + * System Dependencies * Configuration @@ -299,7 +325,7 @@ For Online Order Receipt Setting 1. OQS - 1. Filter + 1. Filter 2. Order Item to each Stations 3. Edit Order Item @@ -313,12 +339,12 @@ For Online Order Receipt Setting 3. CRM - 1. Customer Management + 1. Customer Management 2. Queue Management - + 4. Backend - + 1. Dining Setup 2. Queue Station Setup @@ -355,19 +381,17 @@ For Online Order Receipt Setting 1. 2-Column => Main Content - col-9, Information - col-3 2. 3-Column => Sub Lint - col-2, Main Content - col-7, Information - col-3 - > Pixel + > Pixel Main Header Bar - height => 50 px Side Navigation - Weight => 230 px Main Content Padding => 15 px 2. Color - + > BUTTON 1. Submit/Add/Edit/Confirm buttons => btn-primary (theme color) 2. Show/Detail Buttons => btn-info 3. Delete => btn-delete 4. Cancel/Back => btn-default - - diff --git a/app/assets/images/online_order_icon.png b/app/assets/images/online_order_icon.png new file mode 100644 index 00000000..b9e74994 Binary files /dev/null and b/app/assets/images/online_order_icon.png differ diff --git a/app/assets/images/user_icon.png b/app/assets/images/user_icon.png new file mode 100644 index 00000000..a977c32e Binary files /dev/null and b/app/assets/images/user_icon.png differ diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js index 409b5c84..68cf44d7 100755 --- a/app/assets/javascripts/OQS.js +++ b/app/assets/javascripts/OQS.js @@ -37,7 +37,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',$('.oqs_click').val()); var url = 'oqs/get_items/'+$('.oqs_click').val(); - + show_details(url,null); } @@ -49,11 +49,11 @@ $(document).on('turbolinks:load', function() { $(".tables").on("click", function(){ active = $(this).hasClass('selected-table'); - if (active) { + if (active) { $(this).removeClass('bg-blue'); $(this).addClass('green'); $(this).removeClass('selected-table'); - }else{ + }else{ $(this).removeClass('green'); $(this).addClass('bg-blue'); $(this).addClass('selected-table'); @@ -63,7 +63,7 @@ $(document).on('turbolinks:load', function() { var table_id =[]; for (i = 0; i < list.length; i++) { table_id.push(list[i].value); - } + } console.log(table_id) $('#table').val(table_id); @@ -75,7 +75,7 @@ $(document).on('turbolinks:load', function() { }else{ var table = null } - + if (oqs_id > 0 || status != "All" || table != null) { $(".oqs_click").removeClass('oqs_active'); $(".queue_station").removeClass('queue_station_box'); @@ -86,7 +86,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',oqs_id); var url = 'oqs/get_items/'+oqs_id; - + show_details(url,table,status); }else{ $("#completed").removeClass('hide') @@ -95,7 +95,7 @@ $(document).on('turbolinks:load', function() { }); // $(".oqs_click").on("click", function(){ - $(document).on('change', '.oqs_click', function(event){ + $(document).on('change', '.oqs_click', function(event){ oqs_id = $(this).val(); status = $("#status").val(); var table_id = $('#table_id').val(); @@ -104,7 +104,7 @@ $(document).on('turbolinks:load', function() { }else{ var table = null } - + if (oqs_id > 0 || status != "All" || table_id != null) { $(".oqs_click").removeClass('oqs_active'); $(".queue_station").removeClass('queue_station_box'); @@ -115,7 +115,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',oqs_id); var url = 'oqs/get_items/'+oqs_id; - + show_details(url,table,status); }else{ $("#completed").removeClass('hide') @@ -124,7 +124,7 @@ $(document).on('turbolinks:load', function() { }); //End Click // $(".status_click").on("click", function(){ - $(document).on('change', '.status_click', function(event){ + $(document).on('change', '.status_click', function(event){ oqs_id = $("#oqs_id").val(); status = $(this).val(); var table_id = $('#table_id').val(); @@ -144,7 +144,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',oqs_id); var url = 'oqs/get_items/'+oqs_id; - + show_details(url,table,status); }else{ $("#completed").removeClass('hide') @@ -152,17 +152,17 @@ $(document).on('turbolinks:load', function() { } }); //End Click - - function show_details(url,table_id,status){ + + function show_details(url,table_id,status){ console.log(table_id) var oqs_append = $('.oqs_append'); oqs_append.empty(); var filter = $('.filter').text(); - + //Start Ajax - $.ajax({ - type: "GET", - url: url, + $.ajax({ + type: "GET", + url: url, data: {'filter':filter,'table_id':table_id,'status':status}, dataType: "json", success: function(data) { @@ -175,7 +175,7 @@ $(document).on('turbolinks:load', function() { var options = data[field]["options"]; } - var date = new Date(data[field]["created_at"]); + var date = new Date(data[field]["created_at"]); // var show_date = date.getDate() + "-" + (date.getMonth()+1) + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes(); var show_date =date.getHours()+ ':' + date.getMinutes() +' '+(date.getHours() >= 12 ? 'PM' : 'AM'); var set_menu_items = data[field]["set_menu_items"]; @@ -193,7 +193,7 @@ $(document).on('turbolinks:load', function() { table_type = data[field]["table_type"] +'-'+data[field]["zone"] }else{ table_type = "No Table" - + } var delivery_status = '' if (data[field]["delivery_status"] == true) { @@ -235,24 +235,24 @@ $(document).on('turbolinks:load', function() { +'' +'' - +''; - + +''; + $('.oqs_append').append(row); - } + } } }); - //end Ajax + //end Ajax } - $(document).on('click', '.queue_station', function(event){ + $(document).on('click', '.queue_station', function(event){ $('#print_order_item').removeAttr("disabled",""); $('#print_order_summary').removeAttr("disabled",""); - var orderNo = $(this).attr('data-order-no'); + var orderNo = $(this).attr('data-order-no'); var orderZone=$(this).children().children().children('.order-zone').text().trim(); var orderZoneType=$(this).children().children().children('.order-zone-type').text().trim(); // var orderItem=$(this).children().children().children('.order-item').text(); var assigned_item_id = $(this).children().find(".assigned-order-item").text(); - var orderQty = $(this).children().children().children('.order-qty').text(); + var orderQty = $(this).children().children().children('.order-qty').text(); var orderBy = $(this).children().children().children().children('.order-by').text(); var orderAt = $(this).children().children().children().children('.order-at').text(); var orderCustomer = $(this).children().children('.order-customer').text(); @@ -272,10 +272,10 @@ $(document).on('turbolinks:load', function() { data: { 'status' : order_status }, success: function(res){ // console.log(res); - for (i = 0; i < res["items"].length; i++) { - var data = JSON.stringify(res["items"][i]); - var parse_data = JSON.parse(data); - var assigned_order_items = []; + for (i = 0; i < res["items"].length; i++) { + var data = JSON.stringify(res["items"][i]); + var parse_data = JSON.parse(data); + var assigned_order_items = []; var assigned_order_item_id = ''; if(res["assigned_order_items"]!= undefined && res["assigned_order_items"]!=''){ assigned_order_items = JSON.parse(JSON.stringify(res["assigned_order_items"])); @@ -286,7 +286,7 @@ $(document).on('turbolinks:load', function() { }); } // console.log(assigned_order_item_id); - + var set_menu_items = parse_data.set_menu_items; var set_instance_items = ""; if(set_menu_items!=null){ @@ -309,16 +309,16 @@ $(document).on('turbolinks:load', function() { "
"+type+"
" $(value).each(function(i){ - row +=""; + +value[i]+""; }); - $(".options-list").append(row); + $(".options-list").append(row); } } // if($(this).hasClass('selected-instance') == true){ @@ -364,7 +405,7 @@ $(function() { var total_price = +sub_total + +total; $(this).addClass('selected-instance'); - set = "
";
}else{
image = "
";
}
-
+
}
-
+
$('#modal_box_img').append(image);
instance_attributes = []
- for(var field in instances) {
+ for(var field in instances) {
value = instances[field].values;
$(value).each(function(i){
options = value[i];
@@ -556,7 +596,7 @@ $(function() {
// data: {id:value[i]},
// success:function(result){
- // options = result["name"];
+ // options = result["name"];
// instance_attributes.push(options);
// }
// });
@@ -570,14 +610,14 @@ $(function() {
// url: '../../api/restaurant/menu_item_attributes/'+selected_item[i],
// data: {id:selected_item[i]},
// success:function(result){
- // name = result["name"];
+ // name = result["name"];
// selected_arr.push(name);
// }
// });
// });
- for(var field in attributes) {
+ for(var field in attributes) {
value = attributes[field]["values"];
type = attributes[field]["type"]
row = "| Dining | +Check In At | +Action | +
|---|
<%= notice %>
+ +<%= link_to 'Edit', edit_induties_assign_in_duty_path(@induties_assign_in_duty) %> | +<%= link_to 'Back', induties_assign_in_duties_path %> diff --git a/app/views/induties/assign_in_duties/show.json.jbuilder b/app/views/induties/assign_in_duties/show.json.jbuilder new file mode 100644 index 00000000..0367be23 --- /dev/null +++ b/app/views/induties/assign_in_duties/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "induties_assign_in_duties/induties_assign_in_duty", induties_assign_in_duty: @induties_assign_in_duty diff --git a/app/views/inventory/inventory/_inventory_list.html.erb b/app/views/inventory/inventory/_inventory_list.html.erb index 0f4813f2..061ae65f 100755 --- a/app/views/inventory/inventory/_inventory_list.html.erb +++ b/app/views/inventory/inventory/_inventory_list.html.erb @@ -1,30 +1,31 @@| <%= t("views.right_panel.header.menu_category") %> | +<%= t("views.right_panel.detail.product") %> | <%= t("views.right_panel.detail.min_order") %> | <%= t("views.right_panel.detail.max_stock") %> | <%= t("views.right_panel.detail.balance") %> | +<%= t("views.right_panel.detail.status") %> | <%= t("views.right_panel.detail.action") %> | ||
|---|---|---|---|---|---|---|---|---|
| <%= item.menu_category_name %> | - <% cate_arr.push(item.menu_category_id) %> - <% else %> -- <% end %> + + + + + + | <%= item.item_name rescue '-' %> - <%= item.instance_name%> | <%= item.min_order_level %> | <%= item.max_stock_level %> | @@ -35,9 +36,30 @@ <%= item.balance rescue 0 %> <% end %> + <% if !item.balance.nil? %> + <% if item.balance >= 0 %> +
+ OK
+ |
+ <% else %>
+
+ OUT OF STOCK
+ |
+ <% end %>
+ <% else %>
+ OK |
+ <% end %>
+
+
+ Are you sure you want to delete this row ?+This action can't be undo.+ |
+
Items | Min Qty | Max Qty | + @@ -118,7 +119,7 @@ - +
<%= form_tag transactions_bookings_path, :method => :get do %>
-
+
-
+
+
-
-
+
+
-
-
+
+
@@ -78,7 +78,7 @@
|
|
<%= form_tag transactions_card_sale_trans_path, :method => :get do %>
-
+
+
- <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
+ <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
<% end %>
<% if not defined? status %>
-
-
+
+
<% end %>
-
-
+
-
+
-
+
+
-
-
+
+
-
-
+
+ |
-
+
-
+
|
<%= form_tag transactions_credit_notes_path, :method => :get do %>
-
+
+
+
-
+
- <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %>
+ <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %>
-
-
+
+
-
-
+
+
-
-
+
+ |
-
+
-
+
| <%= t("views.right_panel.detail.order_reservation_id") %> | <%= t("views.right_panel.detail.sale_id") %> | @@ -112,8 +119,8 @@ %> <% if @order_reservations != 0 %> <% @order_reservations.each do |order_reservation| %> - <% - provider = "" + <% + provider = "" discount_amount = order_reservation.discount_amount delivery_fee = order_reservation.delivery_fee ? order_reservation.delivery_fee : 0.0 convenience_charge = order_reservation.convenience_charge @@ -187,4 +194,4 @@ $('#sel_period').val("<%= params[:period] %>"); $('#filter').val("<%= params[:filter] %>"); }); - \ No newline at end of file + diff --git a/app/views/transactions/orders/index.html.erb b/app/views/transactions/orders/index.html.erb index 41aa63e6..47216911 100755 --- a/app/views/transactions/orders/index.html.erb +++ b/app/views/transactions/orders/index.html.erb @@ -8,12 +8,19 @@ +|||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= t("views.right_panel.detail.order_id") %> | - +<%= t :table %>/<%= t :room %> | <%= t("views.right_panel.detail.order_by") %> | <%= t("views.right_panel.detail.type") %> | @@ -60,7 +67,7 @@<%= order.status %> | <%= order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> | <%= order.item_count %> | - + <% end %>
|---|
| <%= t("views.right_panel.detail.sale_id") %> | <%= t("views.right_panel.detail.receipt_no") %> | @@ -144,24 +151,24 @@ $('#from').val("<%= params[:from] %>"); $('#to').val("<%= params[:to] %>"); $('#sel_period').val("<%= params[:period] %>"); - + var check_arr = []; search_by_period(); $('#sel_period').change(function(){ - + search_by_period(); - + }); - + function search_by_period(){ var period = $('#sel_period').val(); var period_type = 0; var from = ""; var to = ""; - show_shift_name(period,period_type,from,to,'shift_item'); - } - + show_shift_name(period,period_type,from,to,'shift_item'); + } + // OK button is clicked $('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){ new_date = new Date(date) ; @@ -176,32 +183,32 @@ to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear(); $('#to').val(to); search_by_date(); - }); - + }); + function search_by_date(){ from = $("#from").val(); - to = $("#to").val(); + to = $("#to").val(); var period = 0; - var period_type = 1; + var period_type = 1; if(to != '' && from != ''){ shift_name = from + ',' + to; check_arr.push(to); - + console.log(check_arr.length) if(check_arr.length == 1){ - show_shift_name(period,period_type,from,to,'shift_item'); + show_shift_name(period,period_type,from,to,'shift_item'); } if(check_arr.length == 3){ check_arr = []; } } - + } - + function show_shift_name(period,period_type,from,to,shift_item){ var shift = $('#shift_name'); if (from == '' && to == '') { @@ -209,18 +216,18 @@ to = $("#to").val(); } shift.empty(); - + var str = ''; - var param_shift = ''; + var param_shift = ''; var param_shift = '<%= params[:shift_name] rescue '-'%>'; url = '<%= reports_get_shift_by_date_path %>'; - + $.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){ str = ''; - $(data.message).each(function(index){ - + $(data.message).each(function(index){ + var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date; var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date; var shift_id = data.message[index].shift_id ; @@ -229,18 +236,18 @@ selected = 'selected = "selected"'; } else{ - selected = ''; - } + selected = ''; + } }else{ - selected = ''; - } + selected = ''; + } str += ''; - + // console.log(sh_date) - }) + }) shift.append(str); }); } }); - \ No newline at end of file + diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index 3e4dfca0..c6ecbc6b 100755 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -60,17 +60,17 @@ <%end%> <%end%> - <% end %> + <% end %>|||||||
|---|---|---|---|---|---|---|---|---|
| <%= @sale.receipt_date.strftime("%d-%M-%Y") %> | +<%= @sale.receipt_date.strftime("%d-%m-%Y") %> | <%= @sale.receipt_no %> | <%= @sale.cashier_name rescue '-' %> | <%= @sale.sale_status %> | -<%= @sale.requested_at.strftime("%m-%d-%Y %H:%M %p") %> | -<%= @sale.requested_at.strftime("%d-%m-%Y %H:%M %p") %> | +||
| <%= t :sale %> <%= t("views.right_panel.detail.item_txt") %> <%= t("views.right_panel.detail.name_txt2") %> | <%= t("views.right_panel.detail.qty") %> | @@ -78,20 +78,20 @@<%= t("views.right_panel.detail.total_price") %> | <%= t("views.right_panel.detail.created_at") %> | <%= t("views.right_panel.detail.remark") %> | -||||
| <%=s.product_name rescue ' '%> | <%=s.qty rescue ' '%> | <%= number_with_precision(s.unit_price, :precision => 2, :delimiter => ',') rescue ' '%> | -<%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%> | +<%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%> | <%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %> | <%=s.remark rescue ' '%> | ||
| - | <%= t("views.right_panel.detail.total") %> | +<%= t("views.right_panel.detail.total") %> | <%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%> | |||||
| - | <%= r.tax_name %> | +<%= r.tax_name %> | <%= number_with_precision(r.tax_payable_amount, :precision => 2, :delimiter => ',') rescue ' '%> | |||||
| <%= t("views.right_panel.detail.grand_total") %> | @@ -122,8 +122,8 @@<%= r.payment_method.capitalize rescue ' '%> Payment | <%= number_with_precision(r.payment_amount, :precision => 2, :delimiter => ',') rescue ' '%> | -||||||
| <%= t("views.right_panel.detail.change") %> | @@ -208,7 +208,7 @@<%= t("views.right_panel.detail.receipt_no") %> | |||||||
| <%= transaction["redeem"]%> | <%= transaction["rebate"] %> | <%= transaction["balance"] %> | -<%= transaction["account_status"] %> | +<%= transaction["account_status"] %> | <%= transaction["status"] %> | <%= transaction["receipt_no"] %> | @@ -241,13 +241,13 @@ | <%= t("views.right_panel.detail.remark") %> |
| <%= audit.action%> | <%= audit.action_at.strftime("%m-%d-%Y %H:%M %p")%> | <%= audit.approved_by%> | -<%= audit.remark%> | +<%= audit.remark%> | ||||