Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-07-21 12:04:17 +06:30
6 changed files with 25 additions and 8 deletions

View File

@@ -1243,7 +1243,7 @@ end
def self.get_shift_sales_by_receipt_no_detail(shift_sale_range, shift, from, to, payment_type, customer_filter)
## => left join -> show all sales although no orders
puts customer_filter
query = Sale.includes([:survey, :sale_payments])
.select("sales.*, SUM(sale_payments.payment_amount) AS payments_for_credits_amount")
.select("dining_facilities.type AS table_type, dining_facilities.name AS table_name")

View File

@@ -5,6 +5,8 @@ class TaxProfile < ApplicationRecord
# validations
validates_presence_of :name, :rate, :group_type
scope :filter_by_group_type, -> (group_type) { where group_type: group_type }
def self.calculate_tax(group_type)
divided_value =0.0
exclusive =0.0