diff --git a/.code2lab.env b/.code2lab.env new file mode 100644 index 00000000..0a6c7f0b --- /dev/null +++ b/.code2lab.env @@ -0,0 +1 @@ +RAILS_ENV=production diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..6be8c8f3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git +.dockerignore diff --git a/.gitignore b/.gitignore index 4f0ac524..66f5a09c 100755 --- a/.gitignore +++ b/.gitignore @@ -24,8 +24,10 @@ capybara-*.html /public/image /public/system/* /public/assets/* +/public/menus/* /public/uploads/* /public/swf/* +/public/receipts/ /coverage/ /spec/tmp/* *.orig @@ -35,9 +37,11 @@ pickle-email-*.html /gems/* ._*.* .rbenv-version + +/config/initializers/* config/deploy/config/* config/puma.rb -config/shops.json +#config/shops.json !/log/.keep !/tmp/.keep .ruby-version diff --git a/Capfile b/Capfile new file mode 100644 index 00000000..9cfa1807 --- /dev/null +++ b/Capfile @@ -0,0 +1,31 @@ +# Load DSL and set up stages +require "capistrano/setup" + +# Include default deployment tasks +require "capistrano/deploy" + +# Include tasks from other gems included in your Gemfile +# +# For documentation on these, see for example: +# +# https://github.com/capistrano/rvm +# https://github.com/capistrano/rbenv +# https://github.com/capistrano/chruby +# https://github.com/capistrano/bundler +# https://github.com/capistrano/rails +# https://github.com/capistrano/passenger +# +# require "capistrano/rvm" +require "capistrano/rbenv" +# require "capistrano/chruby" +require "capistrano/bundler" +require "capistrano/rails" +require "capistrano/rails/assets" +require "capistrano/rails/migrations" +# require "capistrano/passenger" + +# Load custom tasks from `lib/capistrano/tasks` if you have any defined +Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } +Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } +Dir.glob('lib/capistrano/**/*.rb').each { |r| import r } + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..69f0f58e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM ruby:2.4.1 +RUN apt-get update -qq && apt-get install -y build-essential libmysqlclient-dev libcups2-dev libpq-dev nodejs +RUN mkdir /sxrestaurant +RUN mkdir -p /sxrestaurant/tmp/puma +ENV RAILS_ENV production +WORKDIR /sxrestaurant +COPY Gemfile /sxrestaurant/Gemfile +COPY Gemfile.lock /sxrestaurant/Gemfile.lock +RUN bundle install --without development test +RUN bundle exec rails assets:precompile +COPY . /sxrestaurant + diff --git a/Gemfile b/Gemfile old mode 100755 new mode 100644 index de22a68c..6005cae2 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '2.4.0' +ruby '2.4.1' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" @@ -41,14 +41,18 @@ gem 'rack-cors' # image upload gem 'carrierwave', '~> 1.0' gem 'mini_magick' +gem 'jquery-fileupload-rails' #Report and Printing gems -gem 'cups', '~> 0.0.7' +gem 'cups' gem 'prawn' gem 'prawn-table' -gem 'spreadsheet' gem 'to_xls-rails' - +gem 'rubyzip', '= 1.0.0' +gem 'axlsx', '= 2.0.1' +gem 'axlsx_rails' +gem 'roo' +gem 'pdfjs_viewer-rails' #Reporting gem #gem 'compendium' #gem "cancan" @@ -81,7 +85,6 @@ gem 'kaminari', '~> 1.0.1' gem 'filterrific' gem 'cancancan', '~> 1.10' - #pageless no need for current # gem 'will_paginate' # gem 'pageless-rails', github: 'rorlab/pageless-rails' @@ -95,6 +98,9 @@ gem 'cancancan', '~> 1.10' #end group :development do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug', platform: :mri + # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '~> 3.0.5' @@ -126,4 +132,4 @@ gem 'momentjs-rails' # for date-range selector # gem 'bootstrap-datepicker-rails' # date picker # gem 'jquery-datetimepicker-rails' # gem 'select2-rails' # for multi-select and auto-complete select box -gem "chartkick" #chart lib +gem "chartkick" #chart lib \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock old mode 100755 new mode 100644 index b7804803..b7f4b2ca --- a/Gemfile.lock +++ b/Gemfile.lock @@ -50,9 +50,17 @@ GEM airbrussh (1.3.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) + actionpack (>= 3.1) + axlsx (>= 2.0.1) bcrypt (3.1.11) bindex (0.5.0) builder (3.2.3) + byebug (9.1.0) cancancan (1.17.0) capistrano (3.10.1) airbrussh (>= 1.0.0) @@ -81,7 +89,7 @@ GEM concurrent-ruby (1.0.5) connection_pool (2.2.1) crass (1.0.2) - cups (0.0.7) + cups (0.1.10) database_cleaner (1.6.2) diff-lcs (1.3) erubi (1.7.0) @@ -99,6 +107,7 @@ GEM railties (>= 3.2, < 5.2) globalid (0.4.1) activesupport (>= 4.2.0) + htmlentities (4.3.4) httparty (0.15.6) multi_xml (>= 0.5.2) i18n (0.9.1) @@ -106,12 +115,17 @@ GEM jbuilder (2.7.0) 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) 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) kaminari (1.0.1) activesupport (>= 4.1.0) kaminari-actionview (= 1.0.1) @@ -155,6 +169,10 @@ GEM nokogiri (1.8.1) mini_portile2 (~> 2.3.0) pdf-core (0.7.0) + pdfjs_viewer-rails (0.2.0) + json (> 1.8.4) + rails (> 4.2.0) + sass-rails (~> 5.0) pg (0.21.0) prawn (2.2.2) pdf-core (~> 0.7.0) @@ -196,6 +214,10 @@ GEM rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) 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) @@ -214,6 +236,7 @@ GEM rspec-support (~> 3.7.0) rspec-support (3.7.0) ruby-ole (1.2.12.1) + rubyzip (1.0.0) sass (3.5.3) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -285,7 +308,10 @@ PLATFORMS DEPENDENCIES aescrypt + axlsx (= 2.0.1) + axlsx_rails bcrypt (~> 3.1.7) + byebug cancancan (~> 1.10) capistrano capistrano-bundler @@ -294,7 +320,7 @@ DEPENDENCIES carrierwave (~> 1.0) chartkick coffee-rails (~> 4.2) - cups (~> 0.0.7) + cups database_cleaner factory_girl_rails (~> 4.0) faker @@ -302,6 +328,7 @@ DEPENDENCIES font-awesome-rails (~> 4.7, >= 4.7.0.2) httparty (~> 0.15.5) jbuilder (~> 2.5) + jquery-fileupload-rails jquery-rails jquery-ui-rails kaminari (~> 1.0.1) @@ -311,6 +338,7 @@ DEPENDENCIES momentjs-rails mysql2 (>= 0.3.18, < 0.5) nested_form + pdfjs_viewer-rails pg prawn prawn-table @@ -318,13 +346,14 @@ DEPENDENCIES rack-cors rails (~> 5.1.0) redis (~> 3.0) + roo rspec-rails (~> 3.5) + rubyzip (= 1.0.0) sass-rails (~> 5.0) schema_to_scaffold shoulda-matchers (~> 3.1) sidekiq simple_form - spreadsheet spring spring-watcher-listen (~> 2.0.0) tether-rails @@ -336,7 +365,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 2.4.0p0 + ruby 2.4.1p111 BUNDLED WITH 1.16.1 diff --git a/README.md b/README.md index 5ff1aeda..43a2091e 100755 --- a/README.md +++ b/README.md @@ -8,39 +8,194 @@ Things you may want to cover: ruby 2.4.1p111 * Membership Details +Osaka => + Auth Token => wu8YvlLmah0CL => New => v3 + => rj0MJ0XI5GsKZehE => Old => v2 + => code2lab => Old - Osaka + Merchant account => RxzaYyAGzm7VqAZ4hKnv + Campaign Id => {"campaign_type_id": 5} - Auth Token => rj0MJ0XI5GsKZehE => New +BITP + Auth Token => pZBHXEFbGNj/G => New => V3 + => rj0MJ0XI5GsKZehE => Old => V2 + => code2lab => Old - => code2lab => Old - - Merchant account => RxzaYyAGzm7VqAZ4hKnv - - Campaign Id => {"campaign_type_id": 5} - - - - BITP - - Auth Token => rj0MJ0XI5GsKZehE => New - - => code2lab => Old - - Merchant account => vWSsseoZCzxd6xcNf_uS - - Campaign Id => {"campaign_type_id": 1} + Merchant account => vWSsseoZCzxd6xcNf_uS + Campaign Id => {"campaign_type_id": 1} java -jar ~/Documents/Jade.jar http://192.168.1.88:3002 +java -jar ~/Documents/c2l_jade.jar http://192.168.1.151:3002 + +Person and Extra Time + category_code = SPL... //for menu categories special + 1) must create Person in settings/accounts + 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 + * must start with 'Ext'[a..z]'_'[1..100] + * note : don't add character after '_' + +For Order Item & Order Summary Slim + *** change OrderItemPdf to OrderItemSlimPdf and OrderSummaryPdf to OrderSummarySlimPdf + 1) settings/print_settings + (a) Font is present => {Header font size:11, Item Font Size:9} + (b) Font is blank => {Header font size:12, Item Font Size:10} + 2) settings/lookups => { type:print_settings, name:OrderSlimPdf, value:1 } + * no need to change these files + { app/controllers/oqs/edit_controller.rb + app/controllers/oqs/print_controller.rb + app/models/order_queue_station.rb + app/models/printer/order_queue_printer.rb + app/models/printer/receipt_printer.rb + } + +For ReceiptBillA5Pdf + *** change ReceiptBillPdf to ReceiptBillA5Pdf + 1) settings/print_settings , width:680, height:1450, Header font Size:16, Item font size:14 + 2) settings/lookups => { type:print_settings, name:ReceiptBillA5Pdf, value:1 } + +For ReceiptBillAltName options + 1) settings/lookups => { type:print_settings, name:ReceiptBillAltName, value:1 } + +For OrderSetPdf options + *** change OrderItemPdf to OrderSetItemPdf and OrderSummaryPdf to OrderSummarySetPdf + 1) settings/lookups => { type:print_settings, name:OrderSetPdf, value:1 } + 2) settings/print_settings + (a) Font is present => {Header font size:11, Item Font Size:9} + (b) Font is blank => {Header font size:12, Item Font Size:10} + +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 } + +For checkout time and checkout alert time + 1) checkout time => { type: checkout_time, name: 9:00 AM - 12:00 PM, value: 120 } + 2) checkout alert time => { type: checkout_alert_time, name: 8:00 AM - 12:00 PM, value: 60 } + * you can add multiple record for checkout time and checkout alert time + * type must be 'checkout_time' and 'checkout_alert_time' + * you can change name and value + * name must be time range [12hr => 8:30 AM - 1:45 PM, 24hr => 8:00 - 13:45] + * value must be minutes[60] + +For call waiter pdf + * Backend > Printer > Print Settings > New + i) Name : Calling Waiter + ii) Unique Code: CallWaiterPdf + iii)Template: ... + 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 + i) TableBooking, Order, OrderItem, sale, SaleOrder, SaleItem, SaleTax, SalePayment, SaleAudit, AssignedOrderItem => { current:0, next:0 } + ** 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 DATABASE [database_name] CHARACTER SET utf8 COLLATE utf8_unicode_ci #for database + +For split bill + 1) settings/lookups => { type:split_bill, name:SplitBill, value:1 } + +For Sidekiq + 1) If you want to use 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 +###please open +sudo cat /etc/sudoers +### cope and parse +%superuser ALL=(ALL) NOPASSWD: ALL + +<---- Extra Fields Script -----> +DROP TABLE IF EXISTS `display_images`; +CREATE TABLE `display_images` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `shop_id` int(11) DEFAULT NULL, + `image` blob, + `created_by` varchar(255) DEFAULT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +ALTER TABLE customers +ADD COLUMN image_path VARCHAR(255); + +ALTER TABLE employees +ADD COLUMN image_path VARCHAR(255); + +ALTER TABLE commissioners +ADD COLUMN image_path VARCHAR(255); + +ALTER TABLE sales +ADD COLUMN equal_persons INT(11) after rebate_status; + +ALTER TABLE sale_items +ADD COLUMN remark VARCHAR(255) after status; + +ALTER TABLE shops +ADD COLUMN shop_code VARCHAR(255) after name, +ADD COLUMN client_name VARCHAR(255) after shop_code, +ADD COLUMN client_code VARCHAR(255) after client_name; + +ALTER TABLE print_settings +ADD COLUMN brand_name VARCHAR(255) after api_settings, +ADD COLUMN type VARCHAR(255) after brand_name; + +ALTER TABLE tax_profiles +ADD COLUMN group_type VARCHAR(255) after name; + +<---- Extra Fields Script -----> +For CloseCashierCustomisePdf in lookups + *** change CloseCashierPdf to CloseCashierCustomisePdf + 1) settings/print_settings + 2) settings/lookups => { type:print_settings, name: CloseCashierCustomisePdf, value:1 } + +<---- 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: ... + iv) Font: Zawgyi-One v) Printer: #printer name + +/* Tax Profile Group Types in lookups */ +1) settings/lookups => { type:tax_profiles, name: Cashier, value:cashier } +2) settings/lookups => { type:tax_profiles, name: Quick Service, value: quick_service } +3) settings/lookups => { type:tax_profiles, name: Doemal, value: doemal } +/* Tax Profile Group Types in lookups */ + +Add Kitchen Role of Employee + => 1) settings/lookups => { type:employee_roles, name: Kitchen, value:kitchen } + +Add Base URL for DOEMAL + 1) settings/lookups => { type:order_reservation, name: BaseURL, value:'{doemal url}' } + 2) settings/lookups => { type:order_reservation, name: Token, value:'{doemal token}' } * ToDo list -1. Cloud Sync -2. Action Cable -3. Shop Setup -4. Payment Integation +1. Migration +2. Quick Service +3. Order & Reservation + -* System dependencies +* System Dependencies * Configuration diff --git a/app/assets/images/slider/s1.jpg b/app/assets/images/slider/s1.jpg new file mode 100644 index 00000000..cf5cfb0b Binary files /dev/null and b/app/assets/images/slider/s1.jpg differ diff --git a/app/assets/images/slider/s2.jpg b/app/assets/images/slider/s2.jpg new file mode 100644 index 00000000..2e3e9332 Binary files /dev/null and b/app/assets/images/slider/s2.jpg differ diff --git a/app/assets/images/slider/s3.jpg b/app/assets/images/slider/s3.jpg new file mode 100644 index 00000000..e3b4de10 Binary files /dev/null and b/app/assets/images/slider/s3.jpg differ diff --git a/app/assets/images/slider/s4.jpg b/app/assets/images/slider/s4.jpg new file mode 100644 index 00000000..73decfb9 Binary files /dev/null and b/app/assets/images/slider/s4.jpg differ diff --git a/app/assets/javascripts/CRM.js b/app/assets/javascripts/CRM.js index 03450eb1..b616453c 100755 --- a/app/assets/javascripts/CRM.js +++ b/app/assets/javascripts/CRM.js @@ -23,6 +23,7 @@ //= require bootstrap-notify/bootstrap-notify.js //= require node-waves/waves.js //= require sweetalert/sweetalert.min.js +//= require fileinput.min //= require BSBMaterial/turbolink_admin.js //= require BSBMaterial/demo.js //= require custom.js @@ -34,4 +35,24 @@ $(document).on('turbolinks:load', function() { weekStart: 1, time: false }); -}); \ No newline at end of file + + $("#customer_image_path").fileinput({ + previewFileType: "image", + allowedFileExtensions: ["jpg", "gif", "png"], + browseClass: "btn btn-success", + browseLabel: "Pick Image", + browseIcon: " ", + removeClass: "btn btn-danger", + removeLabel: "Delete", + removeIcon: " ", + showUpload: false, + // uploadClass: "btn btn-info", + // uploadLabel: "Upload", + // uploadIcon: " ", + previewTemplates: { + image: '
' +''+ data[field]["item_name"] +'- ' +' [x'+ data[field]["qty"] +'] ' + +set_instance_items +'
' - +''+ options +'
' + +''+ options +'
' +'' +'Order at - ' @@ -132,16 +197,53 @@ $(document).on('turbolinks:load', function() { type: 'GET', url: '/oqs/' + orderNo, data: { 'status' : order_status }, - success: function(res){ - - for (i = 0; i < res.length; i++) { - var data = JSON.stringify(res[i]); + 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 = []; + 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"])); + $.each(assigned_order_items,function(key,value){ + if(value[parse_data.order_items_id] != undefined){ + assigned_order_item_id = value[parse_data.order_items_id]; + } + }); + } + // console.log(assigned_order_item_id); - var order_item_row = "
";
+ if (modify_order) {
+ image = "
";
+ }else{
+ image = "
";
+ }
+
}
$('#modal_box_img').append(image);
@@ -533,17 +716,23 @@ $(function() {
if(group == "set_menu"){
- code = $(this).data('code');
- value = $(this).data('value');
+ option_arr = get_selected_attributes('selected-option');
+ $(".selected-set:last").attr('data-options',JSON.stringify(option_arr));
+ $(".selected-set:last").children().children('#instance_option').text(option_arr);
+ // instance = $(".selected-instance");
+ // $(instance).each(function(i){
+ // if ($(instance[i]).attr('data-code')==code){
+ // option_arr = get_selected_attributes('selected-option');
+ // $(instance[i]).attr('data-options',JSON.stringify(option_arr));
+ // $(instance[i]).children().children('#instance_option').text(option_arr);
+ // }
+ // });
+ }
- instance = $(".selected-instance");
- $(instance).each(function(i){
- if ($(instance[i]).attr('data-code')==code){
+ if(group == "set_menu_default"){
option_arr = get_selected_attributes('selected-option');
- $(instance[i]).attr('data-options',JSON.stringify(option_arr));
- $(instance[i]).children().children('#instance_option').text(option_arr);
- }
- });
+ $('.set-item').attr('data-options',JSON.stringify(option_arr));
+ $('.set_default_option').text(option_arr);
}
}); //End selecct attribute buttom
@@ -557,7 +746,7 @@ $(function() {
attribute_arr = get_selected_attributes('selected-attribute');
option_arr = get_selected_attributes('selected-option');
-
+ console.log(option_arr)
if (item_row.length>0) {
var instances = jQuery.parseJSON(item_row.attr('data-instances'));
@@ -595,8 +784,11 @@ $(function() {
$('.add_to_order').attr('data-name',$('#title_name').text());
$('.add_to_order').attr('data-attributes',JSON.stringify(attribute_arr));
$('.add_to_order').attr('data-options',JSON.stringify(option_arr));
+ $('.add_to_order').attr('data-opt',JSON.stringify(option_arr));
var item_data = $(this);
- show_item_detail(item_data);
+ item = get_item(item_data,"add_to_order");
+ customer_display_view(item,"add");
+ show_item_detail(item_data,"add_to_order");
calculate_sub_total();
}); //End add order Click
@@ -604,30 +796,42 @@ $(function() {
// click plus icon for add
$(document).on('click', '.add_icon', function(event){
var item_data = $(this);
- show_item_detail(item_data);
+ item = get_item(item_data,"add_icon");
+ customer_display_view(item,"add");
+ show_item_detail(item_data,"add_icon");
calculate_sub_total();
}); //End Add Icon Click
- function show_item_detail(data){
+ function show_item_detail(data,click_type){
qty = parseInt(data.attr('data-qty'));
append = 0;
- price = parseFloat(data.attr('data-price')).toFixed(2);
+ price = data.attr('data-price');
+
instance_name = data.attr('data-instance');
if (instance_name == "undefined"){
instance = '';
}else{
instance = "("+data.attr('data-instance')+")";
}
-
+ d_option = data.attr('data-opt');
+ if (click_type != "add_icon"){
+ option_name = "-"+data.attr('data-options');
+ data_option = data.attr('data-options') ;
+ }else{
+ option_name = ' ';
+ data_option = '[]';
+ }
+console.log(d_option)
var rowCount = $('.summary-items tbody tr').length+1;
var item_row = $('.summary-items tbody tr');
$(item_row).each(function(i){
item_code = $(item_row[i]).attr('data-code');
instance_code = $(item_row[i]).attr('data-instance-code');
-
- if (item_code == data.attr('data-item-code') && instance_code == data.attr('data-instance-code')) {
+ r_option = $(item_row[i]).attr('data-opt');
+ console.log(r_option)
+ if (item_code == data.attr('data-item-code') && instance_code == data.attr('data-instance-code')&&r_option == d_option) {
if (qty > 1) {
qty = parseInt($(item_row[i]).children('#item_qty').text()) + qty;
}else{
@@ -635,9 +839,9 @@ $(function() {
}
$(item_row[i]).children('#item_qty').text(qty);
- parseFloat($(item_row[i]).children('#item_price').text(price*qty)).toFixed(2);
+ parseFloat($(item_row[i]).children('#item_price').text(parseFloat(price*qty).toFixed(2)));
append =1;
- }else{
+ }else{
if (qty > 1) {
qty = qty;
}else{
@@ -651,9 +855,10 @@ $(function() {
+instance+ "' data-code='"+data.attr('data-item-code')+"' data-instance-code='"
+data.attr('data-instance-code')+"' data-attributes='"
+data.attr('data-attributes')+"' data-options ='"
+ +data_option+"' data-opt ='"
+data.attr('data-options')+"' data-row ='"+rowCount+ "'>"
+'<%= f.object.name %>
+ <%= image_tag f.object.image_path.url, :class => "img-thumbnail" %> + <% else %> + <%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %> + <% end %> +| <%= payment.payment_method.to_s.capitalize %> Sale : | + <% if payment.payment_method == 'paypar' %> +Redeem Sale : | + <% else %> +<%= payment.payment_method.to_s.capitalize %> Sale : | + <% end %><% @sale_data.each do |data| %> <% pay_mth = payment.payment_method %> - <%= data[""+pay_mth+""] %> + <%= number_with_precision(data[""+pay_mth+""], precision: precision.to_i ,delimiter: delimiter) rescue number_with_precision(0, precision: precision.to_i ,delimiter: delimiter) %> <% end %> |
| <%= t("views.right_panel.detail.card_sale") %> : | +<%= t("views.right_panel.detail.other_payment") %> : | - <%= total_card["card"].to_f %> + <%= number_with_precision(total_card["card"], precision: precision.to_i ,delimiter: delimiter) rescue number_with_precision(0, precision: precision.to_i ,delimiter: delimiter) %> |
| <%= t("views.right_panel.detail.total") %> <%= t :customer %> : | <%= @total_customer %> |
| <%= t("views.right_panel.detail.dine_in") %> : | @@ -215,11 +296,18 @@
+
+ <% end %>