fix for dining charges taxable price and ui modified

This commit is contained in:
Yan
2017-11-21 12:10:53 +06:30
parent 55606cb959
commit 861e554d63
6 changed files with 17 additions and 15 deletions

View File

@@ -182,7 +182,7 @@ class Sale < ApplicationRecord
sale_item.product_alt_name = "-"
sale_item.qty = block_count
sale_item.unit_price = chargeObj.unit_price
sale_item.taxable_price = diningprice
sale_item.taxable_price = chargeObj.unit_price
sale_item.is_taxable = chargeObj.taxable
sale_item.sale_id = self.id
sale_item.price = diningprice

View File

@@ -17,21 +17,23 @@
<label>Foreigner</label>
<select class="form-control col-md-12 selectpicker show-tick" name="survey[foreigner][][]" style="height: " >
<% Lookup.where("lookup_type = ?", "country" ).each do |ct| %>
<option value="<%= ct.value %>">
<%= ct.name %></option>
<%end %>
<option value="<%= ct.value %>">
<%= ct.name %>
</option>
<%end %>
</select>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="form-group">
<label>Number</label>
<input type="number" name="survey[foreigner][][]" class="form-control">
</div>
</div>
</div>
<%= f.input :total_customer %>
<input type="hidden" name="table_id" value="<%=@dining_facility.id%>">
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %>
<%= f.input :created_by, :as => :hidden, :input_html => { :value => current_login_employee.name } %>

View File

@@ -15,9 +15,9 @@
<i class="material-icons">access_time</i>
</span>
<% if !@dining_charge.minimum_free_time.nil?%>
<input type="text" name="dining_charge[minimum_free_time]" value="<%= @dining_charge.minimum_free_time.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Free Time...">
<input type="text" name="dining_charge[minimum_free_time]" value="<%= @dining_charge.minimum_free_time.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Free Time(hh:mm)...">
<% else %>
<input type="text" name="dining_charge[minimum_free_time]" class="timepicker form-control col-md-8" placeholder="Free Time...">
<input type="text" name="dining_charge[minimum_free_time]" class="timepicker form-control col-md-8" placeholder="Free Time(hh:mm)...">
<% end %>
</div>
<!--<%= f.input :charge_block, :input_html => { :id => 'charge_block'} %>-->
@@ -28,9 +28,9 @@
<i class="material-icons">access_time</i>
</span>
<% if !@dining_charge.charge_block.nil?%>
<input type="text" name="dining_charge[charge_block]" value="<%= @dining_charge.charge_block.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Time for Charges...">
<input type="text" name="dining_charge[charge_block]" value="<%= @dining_charge.charge_block.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Time for Charges(hh:mm)...">
<% else %>
<input type="text" name="dining_charge[charge_block]" class="timepicker form-control col-md-8" placeholder="Time for Charges...">
<input type="text" name="dining_charge[charge_block]" class="timepicker form-control col-md-8" placeholder="Time for Charges(hh:mm)...">
<% end %>
</div>
</div>

View File

@@ -54,9 +54,9 @@
<i class="material-icons">access_time</i>
</span>
<% if !@promotion.promo_start_hour.nil?%>
<input type="text" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
<input type="text" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time(hh:mm)...">
<% else %>
<input type="text" name="promotion[promo_start_hour]" class="timepicker form-control col-md-8" placeholder="Start Time...">
<input type="text" name="promotion[promo_start_hour]" class="timepicker form-control col-md-8" placeholder="Start Time(hh:mm)...">
<% end %>
</div>
</div>
@@ -67,9 +67,9 @@
<i class="material-icons">access_time</i>
</span>
<% if !@promotion.promo_end_hour.nil?%>
<input type="text" name="promotion[promo_end_hour]" value="<%= @promotion.promo_end_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="End Time...">
<input type="text" name="promotion[promo_end_hour]" value="<%= @promotion.promo_end_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="End Time(hh:mm)...">
<% else %>
<input type="text" name="promotion[promo_end_hour]" class="timepicker form-control col-md-8" placeholder="End Time...">
<input type="text" name="promotion[promo_end_hour]" class="timepicker form-control col-md-8" placeholder="End Time(hh:mm)...">
<% end %>
</div>
<!-- <% if !@promotion.promo_end_hour.nil?%>

View File

@@ -8,7 +8,7 @@ class CreateCashierTerminals < ActiveRecord::Migration[5.1]
t.string :printer_name
t.json :header
t.json :footer
t.string :font
t.string :font, :default => ""
t.string :font_size, :null => false, :default => 10
t.boolean :show_tax, :null => false, :default => true
t.boolean :show_cashier, :null => false, :default => true