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

This commit is contained in:
Aung Myo
2018-09-13 18:09:23 +06:30
9 changed files with 66 additions and 32 deletions

View File

@@ -359,6 +359,7 @@
<tr>
<td class="charges-name"><strong>
<% if !@sale_taxes.empty? %>
<input type="hidden" name="" id="check_tax" value="all">
Tax:
(<% @i = 0
@sale_taxes.each do |ct| %>
@@ -368,6 +369,7 @@
<%end%>
<%end %>)
<% else %>
<input type="hidden" name="" id="check_tax" value="">
No Tax
<% end %></strong><br>
<%if !@webview && @changable_tax %>
@@ -1104,8 +1106,8 @@
var dining_id = "<%= @dining.id %>";
var sale_id = $("#sale_id").val(); //<%= @obj_sale.sale_id rescue "" %>
var ajax_url = "/origami/sale/append_order";
var tax_type = localStorage.getItem("tax_type");
console.log(tax_type)
// var tax_type = localStorage.getItem("tax_type");
var tax_type = $("#check_tax").val();
$.ajax({
type: "POST",
url: ajax_url,

View File

@@ -393,6 +393,7 @@
<tr>
<td class="charges-name"><strong>
<% if !@sale_taxes.empty? %>
<input type="hidden" name="" id="check_tax" value="all">
Tax:
(<% @i = 0
@sale_taxes.each do |ct| %>
@@ -402,6 +403,7 @@
<%end%>
<%end %>)
<% else %>
<input type="hidden" name="" id="check_tax" value="">
No Tax
<% end %></strong><br>
<%if !@webview && @changable_tax %>
@@ -1168,7 +1170,8 @@ $('#add_invoice').on('click',function(){
var dining_id = "<%= @room.id %>"
var sale_id = $("#sale_id").val(); //<%= @obj_sale.sale_id rescue "" %>
var ajax_url = "/origami/sale/append_order";
var tax_type = localStorage.getItem("tax_type");
// var tax_type = localStorage.getItem("tax_type");
var tax_type = $("#check_tax").val();
$.ajax({
type: "POST",
url: ajax_url,

View File

@@ -9,15 +9,25 @@
<div class="form-inputs p-l-15">
<%= f.input :payment_method %>
<%= f.input :is_active %>
<%= f.input :gateway_communication_type %>
<%= f.input :gateway_url %>
<%= f.input :auth_token %>
<%= f.input :merchant_account_id %>
<%= f.input :additional_parameters %>
<!-- <div class="form-group gateway_communication_type bmd-form-group">
<%= f.label :gateway_communication_type, 'Gateway Communication Type'%>
<select class="form-control col-md-12 gateway_type" name="gateway_communication_type" >
<option value="">Select Gateway Type</option>
<option value="Api">Api</option>
<option value="Device">Device</option>
<option value="Default">Default</option>
</select>
</div> -->
<%= f.input :gateway_communication_type,:class=>'gateway_type', collection: [ "Api", "Default", "Device"] %>
<%= f.input :gateway_url ,:class=>'gateway_type', :required => true %>
<%= f.input :auth_token ,:class=>'auth_token', :required => true %>
<%= f.input :merchant_account_id ,:class=>'merchant_id', :required => true%>
<%= f.input :additional_parameters, as: :text %>
</div>
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
<%= f.submit "Submit",:class => 'btn btn-primary submitBtn btn-lg waves-effect' %>
</div>
<% end %>
</div>
@@ -50,4 +60,19 @@
</div>
</div>
<!-- <script type="text/javascript">
$(function() {
$(document).on('click', '#payment_method_setting_gateway_communication_type', function(event){
if ($(this).val() == "Api") {
$('.submitBtn').attr("disabled", true);
}else{
$('.submitBtn').removeAttr("disabled");
}
});
$( "#payment_method_setting_gateway_url" ).keypress(function() {
});
});
</script>
-->