add cashier change tax require manager access code
This commit is contained in:
@@ -379,7 +379,11 @@
|
||||
No Tax
|
||||
<% end %></strong><br>
|
||||
<%if !@webview && @changable_tax %>
|
||||
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||
<% if @current_user.role == 'cashier' %>
|
||||
<button class="btn btn-link waves-effect bg-info access_modal" data-type = 'change_tax' >Change Tax</button>
|
||||
<% else %>
|
||||
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="item-attr"><strong id="order-Tax"><%= number_format(@obj_sale.total_tax, precision: precision.to_i ) rescue number_format(0, precision: precision.to_i )%></strong></td>
|
||||
@@ -1406,6 +1410,9 @@
|
||||
// overall_void();
|
||||
}else if(type == "waste_and_spoilage"){
|
||||
|
||||
}else if(type == 'change_tax'){
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
$('#change_taxModal').modal('show');
|
||||
}
|
||||
}else{
|
||||
swal("Opps",result.message,"warning")
|
||||
|
||||
@@ -105,7 +105,11 @@
|
||||
No Tax
|
||||
<% end %></strong><br>
|
||||
<%if @sale_payment.nil? && @changable_tax %>
|
||||
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||
<% if @current_user.role == 'cashier' %>
|
||||
<button class="btn btn-link waves-effect bg-info access_modal" data-type = 'change_tax' >Change Tax</button>
|
||||
<% else %>
|
||||
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="item-attr"><strong><span id="total_tax"><%= number_format(@sale_data.total_tax, precision: precision.to_i ) rescue number_format(0, precision: precision.to_i )%></span></strong></td>
|
||||
@@ -1472,6 +1476,9 @@ $(document).ready(function(){
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
$('#focModal').modal('show');
|
||||
// overall_foc();
|
||||
}else if(type == 'change_tax'){
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
$('#change_taxModal').modal('show');
|
||||
}
|
||||
}else{
|
||||
swal("Oops",result.message,"warning");
|
||||
|
||||
Reference in New Issue
Block a user