Merge branch 'foodcourt' of gitlab.com:code2lab/SXRestaurant into foodcourt
This commit is contained in:
@@ -17,7 +17,7 @@ module LoginVerification
|
|||||||
end
|
end
|
||||||
|
|
||||||
def current_login_employee
|
def current_login_employee
|
||||||
@employee ||= current_user
|
@emp ||= current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_user
|
def current_user
|
||||||
|
|||||||
@@ -1514,7 +1514,7 @@ $(document).ready(function(){
|
|||||||
window.location.href = '/foodcourt';
|
window.location.href = '/foodcourt';
|
||||||
}else{
|
}else{
|
||||||
window.location.href = '/foodcourt/'+cashier_type;
|
window.location.href = '/foodcourt/'+cashier_type;
|
||||||
if(cashier_type=="quick_service"){
|
if(cashier_type=="quick_service" || cashier_type == 'food_court'){
|
||||||
customer_display_view(null,"reload");
|
customer_display_view(null,"reload");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,7 +379,11 @@
|
|||||||
No Tax
|
No Tax
|
||||||
<% end %></strong><br>
|
<% end %></strong><br>
|
||||||
<%if !@webview && @changable_tax %>
|
<%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 %>
|
<% end %>
|
||||||
</td>
|
</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>
|
<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>
|
||||||
@@ -1382,7 +1386,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_emp_access_code(access_code,type) {
|
function check_emp_access_code(access_code,type) {
|
||||||
var url = "/origami/check_emp_access_code/" + access_code ;
|
var url = "/origami/check_emp_access_code/" + access_code ;
|
||||||
@@ -1405,6 +1409,9 @@
|
|||||||
// overall_void();
|
// overall_void();
|
||||||
}else if(type == "waste_and_spoilage"){
|
}else if(type == "waste_and_spoilage"){
|
||||||
|
|
||||||
|
}else if(type == "change_tax"){
|
||||||
|
$('#AccessCodeModal').modal('hide');
|
||||||
|
$('#change_taxModal').modal('show');
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
swal("Opps",result.message,"warning")
|
swal("Opps",result.message,"warning")
|
||||||
|
|||||||
@@ -105,8 +105,12 @@
|
|||||||
No Tax
|
No Tax
|
||||||
<% end %></strong><br>
|
<% end %></strong><br>
|
||||||
<%if @sale_payment.nil? && @changable_tax %>
|
<%if @sale_payment.nil? && @changable_tax %>
|
||||||
|
<% 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>
|
<button class="btn btn-link waves-effect bg-info change_tax">Change Tax</button>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</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>
|
<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>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1472,6 +1476,9 @@ $(document).ready(function(){
|
|||||||
$('#AccessCodeModal').modal('hide');
|
$('#AccessCodeModal').modal('hide');
|
||||||
$('#focModal').modal('show');
|
$('#focModal').modal('show');
|
||||||
// overall_foc();
|
// overall_foc();
|
||||||
|
}else if(type == "change_tax"){
|
||||||
|
$('#AccessCodeModal').modal('hide');
|
||||||
|
$('#change_taxModal').modal('show');
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
swal("Oops",result.message,"warning");
|
swal("Oops",result.message,"warning");
|
||||||
|
|||||||
Reference in New Issue
Block a user