update wrong commercial tax and service tax and role features

This commit is contained in:
Aung Myo
2017-07-25 10:49:36 +06:30
parent b9129381c8
commit a135e22024
2 changed files with 4 additions and 4 deletions

View File

@@ -617,7 +617,7 @@ def self.get_shift_sales_by_receipt_no(shift_sale_range,shift,from,to,payment_ty
end
def self.get_separate_tax(shift_sale_range,shift,from,to,payment_type)
def self.get_separate_tax(shift_sale_range=nil,shift,from,to,payment_type)
if payment_type.blank?
payment_type = ''
@@ -633,14 +633,14 @@ def self.get_separate_tax(shift_sale_range,shift,from,to,payment_type)
query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name")
.joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id")
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id")
.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed'", shift.to_a)
.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", shift.to_a)
.group("sale_taxes.tax_name")
.order("sale_taxes.sale_tax_id asc")
else
query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name")
.joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id")
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id")
.where("sales.receipt_date between ? and ? #{payment_type} and sale_status= 'completed' and sales.shift_sale_id in (?)",from,to,shift_sale_range.to_a)
.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", shift_sale_range.to_a)
.group("sale_taxes.tax_name")
.order("sale_taxes.sale_tax_id asc")
end

View File

@@ -49,7 +49,7 @@
<div class="col-md-4 col-lg-4" >
<div class="card" style="max-height:550px; overflow:auto;padding: 15px">
<h4 class="card-title">Role Features</h4>
<!-- <p><strong>Note:</strong> The <strong>data-parent</strong> attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown.</p> -->
<div class="panel-group" id="accordion">
<div class="panel panel-default">