check changable tax on/off settings and customer tax profiles calculation
This commit is contained in:
@@ -370,7 +370,7 @@
|
||||
<% else %>
|
||||
No Tax
|
||||
<% end %></strong><br>
|
||||
<%if !@webview %>
|
||||
<%if !@webview && @changable_tax %>
|
||||
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||
<% end %>
|
||||
</td>
|
||||
@@ -1103,10 +1103,11 @@
|
||||
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");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'dining_id=' + dining_id + "&sale_id=" + sale_id,
|
||||
data: 'dining_id=' + dining_id + "&sale_id=" + sale_id + "&tax_type=" + tax_type,
|
||||
success: function (result) {
|
||||
swal({
|
||||
title: "Information!",
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<% else %>
|
||||
No Tax
|
||||
<% end %></strong><br>
|
||||
<%if @sale_payment.nil? %>
|
||||
<%if @sale_payment.nil? && @changable_tax %>
|
||||
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
<% else %>
|
||||
No Tax
|
||||
<% end %></strong><br>
|
||||
<%if !@webview %>
|
||||
<%if !@webview && @changable_tax %>
|
||||
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||
<% end %>
|
||||
</td>
|
||||
@@ -1167,10 +1167,11 @@ $('#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");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'dining_id='+ dining_id + "&sale_id=" + sale_id,
|
||||
data: 'dining_id='+ dining_id + "&sale_id=" + sale_id + "&tax_type=" + tax_type,
|
||||
success:function(result){
|
||||
swal({
|
||||
title: "Information!",
|
||||
|
||||
Reference in New Issue
Block a user