Merge branch 'foodcourt' of gitlab.com:code2lab/SXRestaurant into foodcourt
This commit is contained in:
93
Gemfile.lock
93
Gemfile.lock
@@ -1,8 +1,8 @@
|
|||||||
GIT
|
GIT
|
||||||
remote: https://github.com/capistrano/rbenv.git
|
remote: https://github.com/capistrano/rbenv.git
|
||||||
revision: b8807f3bbb3f424ac42cc8838a38822e028d0aa3
|
revision: 5e5d655e9b4820adebefb58f760e8d889ed49449
|
||||||
specs:
|
specs:
|
||||||
capistrano-rbenv (2.1.4)
|
capistrano-rbenv (2.1.6)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
sshkit (~> 1.3)
|
sshkit (~> 1.3)
|
||||||
|
|
||||||
@@ -62,10 +62,10 @@ GEM
|
|||||||
axlsx (>= 2.0.1)
|
axlsx (>= 2.0.1)
|
||||||
bcrypt (3.1.13)
|
bcrypt (3.1.13)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
builder (3.2.3)
|
builder (3.2.4)
|
||||||
byebug (11.0.1)
|
byebug (11.1.1)
|
||||||
cancancan (1.17.0)
|
cancancan (1.17.0)
|
||||||
capistrano (3.11.2)
|
capistrano (3.12.0)
|
||||||
airbrussh (>= 1.0.0)
|
airbrussh (>= 1.0.0)
|
||||||
i18n
|
i18n
|
||||||
rake (>= 10.0.0)
|
rake (>= 10.0.0)
|
||||||
@@ -83,7 +83,7 @@ GEM
|
|||||||
activemodel (>= 4.0.0)
|
activemodel (>= 4.0.0)
|
||||||
activesupport (>= 4.0.0)
|
activesupport (>= 4.0.0)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
chartkick (3.2.2)
|
chartkick (3.3.1)
|
||||||
chronic (0.10.2)
|
chronic (0.10.2)
|
||||||
chunky_png (1.3.11)
|
chunky_png (1.3.11)
|
||||||
coffee-rails (4.2.2)
|
coffee-rails (4.2.2)
|
||||||
@@ -93,11 +93,11 @@ GEM
|
|||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.1.5)
|
concurrent-ruby (1.1.6)
|
||||||
connection_pool (2.2.2)
|
connection_pool (2.2.2)
|
||||||
crass (1.0.5)
|
crass (1.0.6)
|
||||||
cups (0.0.7)
|
cups (0.0.7)
|
||||||
database_cleaner (1.7.0)
|
database_cleaner (1.8.3)
|
||||||
diff-lcs (1.3)
|
diff-lcs (1.3)
|
||||||
erubi (1.9.0)
|
erubi (1.9.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
@@ -106,9 +106,9 @@ GEM
|
|||||||
factory_girl_rails (4.9.0)
|
factory_girl_rails (4.9.0)
|
||||||
factory_girl (~> 4.9.0)
|
factory_girl (~> 4.9.0)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
faker (2.6.0)
|
faker (2.10.2)
|
||||||
i18n (>= 1.6, < 1.8)
|
i18n (>= 1.6, < 2)
|
||||||
ffi (1.11.1)
|
ffi (1.12.2)
|
||||||
filterrific (5.2.1)
|
filterrific (5.2.1)
|
||||||
font-awesome-rails (4.7.0.5)
|
font-awesome-rails (4.7.0.5)
|
||||||
railties (>= 3.2, < 6.1)
|
railties (>= 3.2, < 6.1)
|
||||||
@@ -117,10 +117,10 @@ GEM
|
|||||||
htmlentities (4.3.4)
|
htmlentities (4.3.4)
|
||||||
httparty (0.15.7)
|
httparty (0.15.7)
|
||||||
multi_xml (>= 0.5.2)
|
multi_xml (>= 0.5.2)
|
||||||
i18n (1.7.0)
|
i18n (1.8.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jbuilder (2.9.1)
|
jbuilder (2.10.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 5.0.0)
|
||||||
jquery-fileupload-rails (0.4.7)
|
jquery-fileupload-rails (0.4.7)
|
||||||
actionpack (>= 3.1)
|
actionpack (>= 3.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
@@ -131,7 +131,7 @@ GEM
|
|||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
jquery-ui-rails (6.0.1)
|
jquery-ui-rails (6.0.1)
|
||||||
railties (>= 3.2.16)
|
railties (>= 3.2.16)
|
||||||
json (2.2.0)
|
json (2.3.0)
|
||||||
kaminari (1.0.1)
|
kaminari (1.0.1)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.0.1)
|
kaminari-actionview (= 1.0.1)
|
||||||
@@ -147,7 +147,7 @@ GEM
|
|||||||
listen (3.0.8)
|
listen (3.0.8)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
loofah (2.3.1)
|
loofah (2.4.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
@@ -155,42 +155,43 @@ GEM
|
|||||||
material_icons (2.2.1)
|
material_icons (2.2.1)
|
||||||
railties (>= 3.2)
|
railties (>= 3.2)
|
||||||
method_source (0.9.2)
|
method_source (0.9.2)
|
||||||
mime-types (3.3)
|
mime-types (3.3.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2019.1009)
|
mime-types-data (3.2019.1009)
|
||||||
mini_magick (4.9.5)
|
mini_magick (4.10.1)
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.0.2)
|
||||||
mini_portile2 (2.4.0)
|
mini_portile2 (2.4.0)
|
||||||
minitest (5.12.2)
|
minitest (5.14.0)
|
||||||
momentjs-rails (2.20.1)
|
momentjs-rails (2.20.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
mysql2 (0.5.2)
|
mysql2 (0.5.3)
|
||||||
nested_form (0.3.2)
|
nested_form (0.3.2)
|
||||||
net-scp (2.0.0)
|
net-scp (2.0.0)
|
||||||
net-ssh (>= 2.6.5, < 6.0.0)
|
net-ssh (>= 2.6.5, < 6.0.0)
|
||||||
net-ssh (5.2.0)
|
net-ssh (5.2.0)
|
||||||
nio4r (2.5.2)
|
nio4r (2.5.2)
|
||||||
nokogiri (1.10.4)
|
nokogiri (1.10.8)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.4.0)
|
||||||
pdf-core (0.7.0)
|
pdf-core (0.7.0)
|
||||||
pdfjs_viewer-rails (0.3.1)
|
pdfjs_viewer-rails (0.3.1)
|
||||||
json (> 1.8.4)
|
json (> 1.8.4)
|
||||||
rails (> 4.2.0)
|
rails (> 4.2.0)
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
pg (1.1.4)
|
pg (1.2.2)
|
||||||
prawn (2.2.2)
|
prawn (2.2.2)
|
||||||
pdf-core (~> 0.7.0)
|
pdf-core (~> 0.7.0)
|
||||||
ttfunk (~> 1.5)
|
ttfunk (~> 1.5)
|
||||||
prawn-qrcode (0.4.0)
|
prawn-qrcode (0.5.1)
|
||||||
prawn (>= 1)
|
prawn (>= 1)
|
||||||
rqrcode (>= 1.0.0)
|
rqrcode (>= 1.0.0)
|
||||||
prawn-table (0.2.2)
|
prawn-table (0.2.2)
|
||||||
prawn (>= 1.3.0, < 3.0.0)
|
prawn (>= 1.3.0, < 3.0.0)
|
||||||
puma (3.12.1)
|
puma (3.12.2)
|
||||||
rack (2.0.7)
|
rack (2.0.9)
|
||||||
rack-cors (1.0.3)
|
rack-cors (1.1.1)
|
||||||
rack-protection (2.0.7)
|
rack (>= 2.0.0)
|
||||||
|
rack-protection (2.0.8.1)
|
||||||
rack
|
rack
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
@@ -217,27 +218,27 @@ GEM
|
|||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (13.0.0)
|
rake (13.0.1)
|
||||||
rb-fsevent (0.10.3)
|
rb-fsevent (0.10.3)
|
||||||
rb-inotify (0.10.0)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
redis (3.3.5)
|
redis (3.3.5)
|
||||||
request_store (1.4.1)
|
request_store (1.5.0)
|
||||||
rack (>= 1.4)
|
rack (>= 1.4)
|
||||||
roo (1.13.2)
|
roo (1.13.2)
|
||||||
nokogiri
|
nokogiri
|
||||||
rubyzip
|
rubyzip
|
||||||
spreadsheet (> 0.6.4)
|
spreadsheet (> 0.6.4)
|
||||||
rqrcode (1.1.1)
|
rqrcode (1.1.2)
|
||||||
chunky_png (~> 1.0)
|
chunky_png (~> 1.0)
|
||||||
rqrcode_core (~> 0.1.0)
|
rqrcode_core (~> 0.1)
|
||||||
rqrcode_core (0.1.0)
|
rqrcode_core (0.1.1)
|
||||||
rspec-core (3.9.0)
|
rspec-core (3.9.1)
|
||||||
rspec-support (~> 3.9.0)
|
rspec-support (~> 3.9.1)
|
||||||
rspec-expectations (3.9.0)
|
rspec-expectations (3.9.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.9.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-mocks (3.9.0)
|
rspec-mocks (3.9.1)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.9.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-rails (3.9.0)
|
rspec-rails (3.9.0)
|
||||||
@@ -248,7 +249,7 @@ GEM
|
|||||||
rspec-expectations (~> 3.9.0)
|
rspec-expectations (~> 3.9.0)
|
||||||
rspec-mocks (~> 3.9.0)
|
rspec-mocks (~> 3.9.0)
|
||||||
rspec-support (~> 3.9.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-support (3.9.0)
|
rspec-support (3.9.2)
|
||||||
ruby-ole (1.2.12.2)
|
ruby-ole (1.2.12.2)
|
||||||
rubyzip (1.0.0)
|
rubyzip (1.0.0)
|
||||||
sass (3.7.4)
|
sass (3.7.4)
|
||||||
@@ -266,15 +267,15 @@ GEM
|
|||||||
activesupport (>= 3.2.1)
|
activesupport (>= 3.2.1)
|
||||||
shoulda-matchers (3.1.3)
|
shoulda-matchers (3.1.3)
|
||||||
activesupport (>= 4.0.0)
|
activesupport (>= 4.0.0)
|
||||||
sidekiq (5.2.7)
|
sidekiq (5.2.8)
|
||||||
connection_pool (~> 2.2, >= 2.2.2)
|
connection_pool (~> 2.2, >= 2.2.2)
|
||||||
rack (>= 1.5.0)
|
rack (< 2.1.0)
|
||||||
rack-protection (>= 1.5.0)
|
rack-protection (>= 1.5.0)
|
||||||
redis (>= 3.3.5, < 5)
|
redis (>= 3.3.5, < 5)
|
||||||
simple_form (5.0.1)
|
simple_form (5.0.2)
|
||||||
actionpack (>= 5.0)
|
actionpack (>= 5.0)
|
||||||
activemodel (>= 5.0)
|
activemodel (>= 5.0)
|
||||||
spreadsheet (1.2.5)
|
spreadsheet (1.2.6)
|
||||||
ruby-ole (>= 1.0)
|
ruby-ole (>= 1.0)
|
||||||
spring (2.1.0)
|
spring (2.1.0)
|
||||||
spring-watcher-listen (2.0.1)
|
spring-watcher-listen (2.0.1)
|
||||||
@@ -292,16 +293,16 @@ GEM
|
|||||||
net-ssh (>= 2.8.0)
|
net-ssh (>= 2.8.0)
|
||||||
tether-rails (1.4.0)
|
tether-rails (1.4.0)
|
||||||
rails (>= 3.1)
|
rails (>= 3.1)
|
||||||
thor (0.20.3)
|
thor (1.0.1)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
to_xls-rails (1.3.1)
|
to_xls-rails (1.3.1)
|
||||||
spreadsheet (>= 0.8.5)
|
spreadsheet (>= 0.8.5)
|
||||||
ttfunk (1.5.1)
|
ttfunk (1.6.2.1)
|
||||||
turbolinks (5.2.1)
|
turbolinks (5.2.1)
|
||||||
turbolinks-source (~> 5.2)
|
turbolinks-source (~> 5.2)
|
||||||
turbolinks-source (5.2.0)
|
turbolinks-source (5.2.0)
|
||||||
tzinfo (1.2.5)
|
tzinfo (1.2.6)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (4.2.0)
|
uglifier (4.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
@@ -381,7 +382,7 @@ DEPENDENCIES
|
|||||||
whenever
|
whenever
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 2.4.1p111
|
ruby 2.6.5p114
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.0.2
|
2.0.2
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#order-detail-slimscroll').slimScroll({
|
$('#order-detail-slimscroll').slimScroll({
|
||||||
height: $('#order-detail-slimscroll').attr('data-height'),
|
// height: $('#order-detail-slimscroll').attr('data-height'),
|
||||||
// height: height-$('#order-detail-slimscroll').attr('data-height'),
|
height: height-$('#order-detail-slimscroll').attr('data-height'),
|
||||||
size: '5px',
|
size: '5px',
|
||||||
color: 'rgba(0,0,0,0.5)',
|
color: 'rgba(0,0,0,0.5)',
|
||||||
alwaysVisible: false,
|
alwaysVisible: false,
|
||||||
|
|||||||
@@ -109,6 +109,6 @@ class Settings::TaxProfilesController < ApplicationController
|
|||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def settings_tax_profile_params
|
def settings_tax_profile_params
|
||||||
params.require(:tax_profile).permit(:name, :group_type, :rate, :inclusive, :order_by, :created_by)
|
params.require(:tax_profile).permit(:name, :group_type, :rate, :inclusive, :order_by, :created_by,:tax_type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -486,15 +486,18 @@ class Sale < ApplicationRecord
|
|||||||
# substract , to give after discount
|
# substract , to give after discount
|
||||||
total_tax = total_taxable - total_discount
|
total_tax = total_taxable - total_discount
|
||||||
#include or execulive
|
#include or execulive
|
||||||
if tax.inclusive
|
if tax.tax_type.to_s =="Net"
|
||||||
tax_incl_exec = "inclusive"
|
sale_tax.tax_payable_amount = tax.rate
|
||||||
rate = tax.rate
|
|
||||||
divided_value = (100 + rate)/rate
|
|
||||||
sale_tax.tax_payable_amount = total_tax / divided_value
|
|
||||||
else
|
else
|
||||||
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
if tax.inclusive
|
||||||
|
tax_incl_exec = "inclusive"
|
||||||
|
rate = tax.rate
|
||||||
|
divided_value = (100 + rate)/rate
|
||||||
|
sale_tax.tax_payable_amount = total_tax / divided_value
|
||||||
|
else
|
||||||
|
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
sale_tax.inclusive = tax.inclusive
|
sale_tax.inclusive = tax.inclusive
|
||||||
sale_tax.save
|
sale_tax.save
|
||||||
|
|
||||||
@@ -609,16 +612,19 @@ class Sale < ApplicationRecord
|
|||||||
|
|
||||||
# substract , to give after discount
|
# substract , to give after discount
|
||||||
total_tax = total_taxable - self.total_discount
|
total_tax = total_taxable - self.total_discount
|
||||||
#include or execulive
|
if tax.tax_type.to_s =="Net"
|
||||||
if tax.inclusive
|
sale_tax.tax_payable_amount = tax.rate
|
||||||
tax_incl_exec = "inclusive"
|
|
||||||
rate = tax.rate
|
|
||||||
divided_value = (100 + rate)/rate
|
|
||||||
sale_tax.tax_payable_amount = total_tax / divided_value
|
|
||||||
else
|
else
|
||||||
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
#include or execulive
|
||||||
|
if tax.inclusive
|
||||||
|
tax_incl_exec = "inclusive"
|
||||||
|
rate = tax.rate
|
||||||
|
divided_value = (100 + rate)/rate
|
||||||
|
sale_tax.tax_payable_amount = total_tax / divided_value
|
||||||
|
else
|
||||||
|
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
sale_tax.inclusive = tax.inclusive
|
sale_tax.inclusive = tax.inclusive
|
||||||
sale_tax.save
|
sale_tax.save
|
||||||
|
|
||||||
@@ -2048,7 +2054,6 @@ def self.get_sale_data_for_other_payment_credit(sale_id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def unique_tax_profiles(order_source, customer_id)
|
def unique_tax_profiles(order_source, customer_id)
|
||||||
puts "unique_tax_profiles unique_tax_profiles"
|
|
||||||
tax_data = TaxProfile.where(group_type: order_source)
|
tax_data = TaxProfile.where(group_type: order_source)
|
||||||
|
|
||||||
customer_tax_profiles = Customer.select(:tax_profiles).where(customer_id: customer_id).first
|
customer_tax_profiles = Customer.select(:tax_profiles).where(customer_id: customer_id).first
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class TaxProfile < ApplicationRecord
|
|||||||
def self.calculate_tax(group_type)
|
def self.calculate_tax(group_type)
|
||||||
divided_value =0.0
|
divided_value =0.0
|
||||||
exclusive =0.0
|
exclusive =0.0
|
||||||
tax_profiles = TaxProfile.where(group_type: group_type)
|
tax_profiles = TaxProfile.where(group_type: group_type,tax_type: 'Percentage')
|
||||||
if !tax_profiles.empty?
|
if !tax_profiles.empty?
|
||||||
tax_profiles.each do |tax|
|
tax_profiles.each do |tax|
|
||||||
#include or execulive
|
#include or execulive
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class OrderItemCustomisePdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order_item.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order_item.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_item.dining.nil?
|
if !order_item.dining.nil?
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class OrderItemPdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order_item.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order_item.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_item.dining.nil?
|
if !order_item.dining.nil?
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class OrderItemSlimCustomisePdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order_item_slim.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order_item_slim.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_item_slim.dining.nil?
|
if !order_item_slim.dining.nil?
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class OrderItemSlimPdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order_item_slim.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order_item_slim.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_item.dining.nil?
|
if !order_item.dining.nil?
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class OrderItemStarPdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order_item.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order_item.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_item.dining.nil?
|
if !order_item.dining.nil?
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class OrderSetItemCustomisePdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_set_item.dining.nil?
|
if !order_set_item.dining.nil?
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class OrderSetItemPdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_set_item.dining.nil?
|
if !order_set_item.dining.nil?
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class OrderSummaryCustomisePdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order_item.dining.nil?
|
if !order_item.dining.nil?
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class OrderSummarySetCustomisePdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class OrderSummarySetPdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class OrderSummarySlimCustomisePdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class OrderSummarySlimPdf < Prawn::Document
|
|||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 1
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
text "#{order[0].contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
|
|
||||||
header(shop_details)
|
header(shop_details)
|
||||||
if sale_data.orders[0].source =='app'
|
if sale_data.orders[0].source =='app'
|
||||||
move_down 3
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 2
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !sale_data.bookings[0].dining_facility.nil?
|
if !sale_data.bookings[0].dining_facility.nil?
|
||||||
@@ -345,9 +345,14 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
sale_data.sale_taxes.each do |st|
|
sale_data.sale_taxes.each do |st|
|
||||||
move_down line_move
|
move_down line_move
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
|
if st.tax_rate.to_i == st.tax_payable_amount.to_i
|
||||||
bounding_box([0,y_position], :width =>self.description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "#{ st.tax_name } (#{incl_tax} #{ st.tax_rate.to_i }%)", :size => self.item_font_size,:align => :left
|
text "#{ st.tax_name }", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
|
else
|
||||||
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
|
text "#{ st.tax_name } (#{incl_tax} #{ st.tax_rate.to_i }%)", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
end
|
end
|
||||||
bounding_box([self.description_width,y_position], :width =>self.label_width) do
|
bounding_box([self.description_width,y_position], :width =>self.label_width) do
|
||||||
text "#{number_format(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
text "#{number_format(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ class ReceiptBillOrderPdf < Prawn::Document
|
|||||||
|
|
||||||
header(shop_details)
|
header(shop_details)
|
||||||
if sale_data.orders[0].source =='app'
|
if sale_data.orders[0].source =='app'
|
||||||
move_down 3
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 2
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !sale_data.bookings[0].dining_facility.nil?
|
if !sale_data.bookings[0].dining_facility.nil?
|
||||||
|
|||||||
@@ -47,12 +47,11 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
|
|
||||||
header(shop_details)
|
header(shop_details)
|
||||||
if sale_data.orders[0].source =='app'
|
if sale_data.orders[0].source =='app'
|
||||||
move_down 3
|
move_down 2
|
||||||
y_position = cursor
|
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 2
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !sale_data.bookings[0].dining_facility.nil?
|
if !sale_data.bookings[0].dining_facility.nil?
|
||||||
@@ -405,9 +404,14 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
sale_data.sale_taxes.each do |st|
|
sale_data.sale_taxes.each do |st|
|
||||||
move_down line_move
|
move_down line_move
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
|
if st.tax_rate.to_i == st.tax_payable_amount.to_i
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "#{ st.tax_name } (#{incl_tax} #{ st.tax_rate.to_i }%)", :size => self.item_font_size,:align => :left
|
text "#{ st.tax_name }", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
|
else
|
||||||
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
|
text "#{ st.tax_name } (#{incl_tax} #{ st.tax_rate.to_i }%)", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
end
|
end
|
||||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
text "#{number_format(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
text "#{number_format(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ class ReceiptBillStarPdf < Prawn::Document
|
|||||||
|
|
||||||
header(shop_details)
|
header(shop_details)
|
||||||
if sale_data.orders[0].source =='app'
|
if sale_data.orders[0].source =='app'
|
||||||
move_down 3
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 2
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
if !sale_data.bookings[0].dining_facility.nil?
|
if !sale_data.bookings[0].dining_facility.nil?
|
||||||
@@ -341,9 +341,14 @@ class ReceiptBillStarPdf < Prawn::Document
|
|||||||
sale_data.sale_taxes.each do |st|
|
sale_data.sale_taxes.each do |st|
|
||||||
move_down line_move
|
move_down line_move
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
|
if st.tax_rate.to_i == st.tax_payable_amount.to_i
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "#{ st.tax_name } (#{incl_tax} #{ st.tax_rate.to_i }%)", :size => self.item_font_size,:align => :left
|
text "#{ st.tax_name }", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
|
else
|
||||||
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
|
text "#{ st.tax_name } (#{incl_tax} #{ st.tax_rate.to_i }%)", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
end
|
end
|
||||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
text "#{number_format(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
text "#{number_format(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
if @result
|
if @result
|
||||||
json.status true
|
json.status true
|
||||||
json.sent_pin true
|
json.sent_pin true
|
||||||
|
json.customer_id @cus.id
|
||||||
elsif @cus
|
elsif @cus
|
||||||
json.status true
|
json.status true
|
||||||
json.sent_pin false
|
json.sent_pin false
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<div class="card-text" id="order-detail-slimscroll" data-height="480">
|
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||||
<table class="table table-striped summary-items" id="order-items-table" >
|
<table class="table table-striped summary-items" id="order-items-table" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -41,21 +41,21 @@ if (menu.menu_categories)
|
|||||||
attr_format = []
|
attr_format = []
|
||||||
# Format for attributes json
|
# Format for attributes json
|
||||||
if item.item_attributes.count > 0
|
if item.item_attributes.count > 0
|
||||||
item_attributes = @item_attributes.select{ |x| item.item_attributes.include?(x.id.to_s) }
|
item_attributes = item.item_attributes.map(&:to_s)
|
||||||
attr_format = item_attributes.group_by {|att| att.attribute_type }.map { |type, values| {type: type, values: values.map(&:name)} }
|
attr_format = @item_attributes.select { |x| item_attributes.include?(x.id.to_s) }.group_by {|att| att.attribute_type.strip }.map { |type, values| {type: type, values: values.map { |x| x.name.strip } } }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Format for option json
|
# Format for option json
|
||||||
opt_format = []
|
opt_format = []
|
||||||
# Format for attributes json
|
# Format for attributes json
|
||||||
if item.item_options.count > 0
|
if item.item_options.count > 0
|
||||||
item_options = @item_options.select{ |x| item.item_options.include?(x.id.to_s) }
|
item_options = item.item_options.map(&:to_s)
|
||||||
opt_format = item_options.group_by {|opt| opt.option_type }.map { |type, values| {type: type, values: values.map(&:name)} }
|
opt_format = @item_options.select { |x| item_options.include?(x.id.to_s) }.group_by {|opt| opt.option_type.strip }.map { |type, values| {type: type, values: values.map { |x| x.name.strip } } }
|
||||||
end
|
end
|
||||||
|
|
||||||
#Menu Item Information
|
#Menu Item Information
|
||||||
json.id item.id
|
json.id item.id
|
||||||
json.code item.item_code
|
json.code item.item_code
|
||||||
json.name item.name
|
json.name item.name
|
||||||
json.alt_name item.alt_name
|
json.alt_name item.alt_name
|
||||||
json.image item.image_path.url
|
json.image item.image_path.url
|
||||||
@@ -69,15 +69,14 @@ if (menu.menu_categories)
|
|||||||
json.unit item.unit
|
json.unit item.unit
|
||||||
|
|
||||||
# Item Sets of Menu Item
|
# Item Sets of Menu Item
|
||||||
json.item_sets item.item_sets.map { |its|
|
json.item_sets item.item_sets do |its|
|
||||||
{ id: its.id,
|
json.id its.id
|
||||||
name: its.name,
|
json.name its.name
|
||||||
alt_name: its.alt_name,
|
json.alt_name its.alt_name
|
||||||
min_selectable_qty: its.min_selectable_qty,
|
json.min_selectable_qty its.min_selectable_qty
|
||||||
max_selectable_qty: its.max_selectable_qty,
|
json.max_selectable_qty its.max_selectable_qty
|
||||||
instances: its.menu_item_instances.map { |i| {id: i.id} }
|
json.instances its.menu_item_instances.map { |i| {id: i.id} }
|
||||||
}
|
end
|
||||||
}
|
|
||||||
|
|
||||||
json.attributes attr_format
|
json.attributes attr_format
|
||||||
json.options opt_format
|
json.options opt_format
|
||||||
@@ -85,7 +84,8 @@ if (menu.menu_categories)
|
|||||||
json.instances item.menu_item_instances do |is|
|
json.instances item.menu_item_instances do |is|
|
||||||
if is.is_available
|
if is.is_available
|
||||||
# Convert id to name for attributes
|
# Convert id to name for attributes
|
||||||
instance_attr = @item_attributes.select{ |x| item.item_attributes.include?(x.id) }.pluck(:name)
|
item_attributes = is.item_attributes.map(&:to_s)
|
||||||
|
instance_attr = @item_attributes.select{ |x| item_attributes.include?(x.id.to_s) }.pluck(:name)
|
||||||
|
|
||||||
json.id is.id
|
json.id is.id
|
||||||
json.code is.item_instance_code
|
json.code is.item_instance_code
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-text" id="order-detail-slimscroll" data-height="230">
|
<div class="card-text" id="order-detail-slimscroll" data-height="335">
|
||||||
<table class="table table-striped summary-items">
|
<table class="table table-striped summary-items">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<div class="card-text" id="order-detail-slimscroll" data-height="420">
|
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||||
<table class="table table-striped summary-items" id="order-items-table" >
|
<table class="table table-striped summary-items" id="order-items-table" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<br>
|
<br>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<div class="card-text" id="order-detail-slimscroll" data-height="420">
|
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||||
<table class="table table-striped summary-items" id="order-items-table" >
|
<table class="table table-striped summary-items" id="order-items-table" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<div class="card-text" id="order-detail-slimscroll" data-height="420">
|
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||||
<table class="table table-striped summary-items" id="order-items-table" >
|
<table class="table table-striped summary-items" id="order-items-table" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -276,7 +276,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 270 : 415%>">
|
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 300 : 160%>">
|
||||||
<div class="card-text" >
|
<div class="card-text" >
|
||||||
<table class="table table-striped" id="order-items-table">
|
<table class="table table-striped" id="order-items-table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="order-detail-slimscroll" data-height="430">
|
<div id="order-detail-slimscroll" data-height="140">
|
||||||
<div class="card-text" style="">
|
<div class="card-text" style="">
|
||||||
<table class="table table-striped" id="order-items-table">
|
<table class="table table-striped" id="order-items-table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
<%= f.input :group_type, :collection => Lookup.collection_of("tax_profiles"),:input_html=>{:class=>"col-md-10"},:required=>true %>
|
<%= f.input :group_type, :collection => Lookup.collection_of("tax_profiles"),:input_html=>{:class=>"col-md-10"},:required=>true %>
|
||||||
<%= f.input :name, :input_html=>{:onchange=>"checkDuplicate(this.value);"} %>
|
<%= f.input :name, :input_html=>{:onchange=>"checkDuplicate(this.value);"} %>
|
||||||
<span id="tax_profile_nameErr" style="color:red;"></span>
|
<span id="tax_profile_nameErr" style="color:red;"></span>
|
||||||
|
<%= f.input :tax_type,input_html: { :class => 'form-control select' },
|
||||||
|
collection: %w{Net Percentage},:label => "Tax Type" %>
|
||||||
<%= f.input :rate %>
|
<%= f.input :rate %>
|
||||||
<%= f.input :inclusive %>
|
<%= f.input :inclusive %>
|
||||||
<%= f.input :order_by %>
|
<%= f.input :order_by %>
|
||||||
@@ -69,4 +71,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
5
db/migrate/20200226124607_add_column_tax_type.rb
Normal file
5
db/migrate/20200226124607_add_column_tax_type.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class AddColumnTaxType < ActiveRecord::Migration[5.1]
|
||||||
|
def change
|
||||||
|
add_column :tax_profiles, :tax_type, :string, default: "Percentage"
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user