api discount and change tax

This commit is contained in:
Thein Lin Kyaw
2023-10-17 16:52:12 +06:30
parent 81eb30c03a
commit 3441811bb0
27 changed files with 1225 additions and 1067 deletions

View File

@@ -210,17 +210,12 @@
Refresh
</button>
<% if @sale_payment.nil? %>
<% if current_login_employee.role == "cashier" %>
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
<% else %>
<button type="button" class="btn bg-red btn-block" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void </button>
<%end %>
<% end %>
<% if @sale_payment.nil? %>
<hr>
<% if current_login_employee.role == "cashier" %>
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
<a class="btn btn-block bg-blue waves-effect access_modal" data-toggle="modal" data-type="edit">Edit</a>
<% else %>
<button type="button" class="btn bg-red btn-block" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void </button>
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit' <%= (can? :edit, :sale_edit)? ' ': 'disabled=' %> active="true">Edit</button>
<% end %>
<button type="button" id="discount" class="btn btn-block bg-blue waves-effect" <%= (can? :index, :discount)? ' ': 'disabled=' %> active="true">Discount</button>
@@ -460,14 +455,7 @@ $(document).ready(function(){
});
$("#refresh").on('click', function(){
window.location.reload();
})
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){
}
else {
if(localStorage.getItem("cash") != null && localStorage.getItem("cash") != 'null'){
$('#cash').text(localStorage.getItem("cash"));
}
update_balance();