update db index

This commit is contained in:
Aung Myo
2018-07-04 18:08:15 +06:30
parent bdd20f727e
commit 4f9a4e2984
7 changed files with 49 additions and 47 deletions

View File

@@ -412,7 +412,7 @@ class Sale < ApplicationRecord
# Tax Re-Calculte
def compute_tax(sale, total_taxable, total_discount = 0, order_source = nil, tax_type=nil)
shop = Shop.first();
shop = Shop.first
#if tax is not apply create new record
SaleTax.where("sale_id='#{sale.sale_id}'").find_each do |existing_tax|
@@ -495,7 +495,7 @@ class Sale < ApplicationRecord
# Tax Calculate
def apply_tax(total_taxable, order_source = nil)
shop = Shop.first();
shop = Shop.first
#if tax is not apply create new record
SaleTax.where("sale_id='#{self.sale_id}'").find_each do |existing_tax|