diff --git a/app/models/sale.rb b/app/models/sale.rb index 06552010..0e767ea0 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -281,8 +281,8 @@ class Sale < ApplicationRecord # sale_tax.tax_payable_amount = total_taxable * tax.rate # substract , to give after discount - total_taxable = total_taxable - total_discount - sale_tax.tax_payable_amount = total_taxable * tax.rate / 100 + total_tax = total_taxable - total_discount + sale_tax.tax_payable_amount = total_tax * tax.rate / 100 #new taxable amount is standard rule for step by step # total_taxable = total_taxable + sale_tax.tax_payable_amount diff --git a/config/puma.rb b/config/puma.rb index c7f311f8..c8e0145e 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -44,4 +44,5 @@ environment ENV.fetch("RAILS_ENV") { "development" } # end # Allow puma to be restarted by `rails restart` command. + plugin :tmp_restart diff --git a/config/puma.rb.save b/config/puma.rb.save deleted file mode 100644 index 5f82e805..00000000 --- a/config/puma.rb.save +++ /dev/null @@ -1,9 +0,0 @@ -lapplication_path = '/home/superuser/Application/production/sxrestaurant' -directory application_path -environment 'production' -daemonize true -pidfile "#{application_path}/tmp/pids/puma.pid" -state_path "#{application_path}/tmp/pids/puma.state" -stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" -bind 'tcp://0.0.0.0:9292' -workers 2