Merge branch 'august_spring' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-09-11 14:05:35 +06:30
2 changed files with 3 additions and 3 deletions

View File

@@ -178,7 +178,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
@@ -187,7 +187,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>