Room Charges(Account ID change,add dropdown list,tac not calculate)

This commit is contained in:
Phyo
2017-09-11 13:55:38 +06:30
parent 69c52bf28b
commit fa7fcdd559
2 changed files with 3 additions and 3 deletions

View File

@@ -177,7 +177,7 @@ class Sale < ApplicationRecord
sale_item = SaleItem.new
sale_item.product_code = chargeObj.item_code
sale_item.product_name = dining_name.to_s + " ( " + dining_time.to_s + " )"
# sale_item.account_id = item.account_id
sale_item.account_id = 0
sale_item.product_alt_name = "-"
sale_item.qty = 1
sale_item.unit_price = chargeObj.unit_price
@@ -186,7 +186,7 @@ class Sale < ApplicationRecord
sale_item.sale_id = self.id
sale_item.price = diningprice
sale_item.save
self.compute
self.compute_by_sale_items(self.id, self.sale_items, self.total_discount)
end
def update_item (item)

View File

@@ -8,7 +8,7 @@
<%= f.input :charge_type, :collection => [:hr, :day] %>
<%= f.input :minimum_free_time %>
<%= f.input :charge_block, :input_html => { :id => 'charge_block'} %>
<%= f.input :time_rounding %>
<%= f.input :time_rounding, :collection => [:down, :up] %>
<%= f.input :time_rounding_block, :input_html => { :id => 'time_rounding_block'} %>
<%= f.input :time_rounding_block_price, :input_html => { :id => 'time_rounding_block_price'} %>
</div>