Fixes
- Add shop name in second display - Slim scroll when order items are more than card's height - Add change tax audit
This commit is contained in:
@@ -90,7 +90,11 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
||||
+'</td>'
|
||||
+'</tr>';
|
||||
$(".second_display_items tbody").append(row);
|
||||
|
||||
|
||||
//slim scroll
|
||||
var scrollContainer = $('#order-detail-slimscroll');
|
||||
scrollContainer.slimScroll({ scrollTo: scrollContainer[0].scrollHeight });
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,8 +127,10 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
||||
+'</td>'
|
||||
+'</tr>';
|
||||
$(".second_display_items tbody").append(row);
|
||||
rowCount = rowCount + 1;
|
||||
|
||||
var scrollContainer = $('#order-detail-slimscroll');
|
||||
scrollContainer.slimScroll({ scrollTo: scrollContainer[0].scrollHeight });
|
||||
rowCount = rowCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -645,9 +645,10 @@ class Foodcourt::PaymentsController < BaseFoodcourtController
|
||||
sale_id = params[:sale_id]
|
||||
order_source = params[:cashier_type]
|
||||
tax_type = params[:tax_type]
|
||||
remark = "Change tax to #{tax_type.upcase} for Sale ID #{sale_id} by #{current_login_employee.name}"
|
||||
sale = Sale.find(sale_id)
|
||||
sale.compute_by_sale_items(sale.total_discount, nil, order_source, tax_type)
|
||||
|
||||
SaleAudit.record_audit_change_tax(sale_id, remark, current_login_employee.name)
|
||||
render json: JSON.generate({:status => true})
|
||||
end
|
||||
|
||||
|
||||
@@ -4,23 +4,26 @@
|
||||
<div class="card-block h-100">
|
||||
<div class="card-text">
|
||||
<div id="order-detail-slimscroll" data-height="190">
|
||||
<div class="second-display-shop-title">
|
||||
<%= Shop.current_shop.name rescue "" %>
|
||||
</div>
|
||||
<table class="table table-striped second_display_items" id="order-items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th class="item-name">Items</th>
|
||||
<th class="item-">QTY</th>
|
||||
<th class="item-">Price</th>
|
||||
<th><strong>#</strong></th>
|
||||
<th class="item-name second-display-item"><strong>Items</strong></th>
|
||||
<th class="item- second-display-item"><strong>QTY</strong></th>
|
||||
<th class="item- second-display-item"><strong>Price</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="second-display-item">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="card-footer second-display-item">
|
||||
<table class="table" border="0">
|
||||
<tr>
|
||||
<td class="charges-name"><strong>Sub Total:</strong></td>
|
||||
@@ -51,3 +54,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
.second-display-shop-title{
|
||||
position: sticky;
|
||||
top: 0;
|
||||
color: black;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 1.25rem;
|
||||
padding-bottom: 10px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.second-display-item{
|
||||
font-size: 1.1rem !important;
|
||||
}
|
||||
</style>
|
||||
@@ -103,6 +103,11 @@
|
||||
$(document).ready(function () {
|
||||
//html font-size for second display till 35px!
|
||||
// document.getElementsByTagName( "html" )[0].style[ "font-size" ] = "35px";
|
||||
|
||||
if(!sessionStorage.getItem("visited_second_display")){
|
||||
sessionStorage.setItem("visited_second_display", true);
|
||||
window.location.href = '/origami/second_display';
|
||||
}
|
||||
|
||||
$('#s_reload').on('click', function () {
|
||||
window.location.href = '/origami/second_display';
|
||||
|
||||
Reference in New Issue
Block a user