This commit is contained in:
yarzar_code
2020-01-12 20:07:28 +06:30
parent 314cc507a3
commit dff2c69627
89 changed files with 492 additions and 469 deletions

View File

@@ -31,7 +31,7 @@ class SaleTax < ApplicationRecord
def self.get_tax(from,to)
query = SaleTax.select("sale_taxes.tax_name,SUM(sale_taxes.tax_payable_amount) as tax_amount")
.joins("join sales on sales.sale_id = sale_taxes.sale_id")
.where("sales.shop_code=? and sale_status = ? AND sales.receipt_date between ? and ? AND total_amount != 0 AND inclusive = 0",Shop.current_shop.shop_code, 'completed', from, to)
.where("sale_status = ? AND sales.receipt_date between ? and ? AND total_amount != 0 AND inclusive = 0", 'completed', from, to)
.group("sale_taxes.tax_name")
end