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:
@@ -91,6 +91,10 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
|||||||
+'</tr>';
|
+'</tr>';
|
||||||
$(".second_display_items tbody").append(row);
|
$(".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>'
|
+'</td>'
|
||||||
+'</tr>';
|
+'</tr>';
|
||||||
$(".second_display_items tbody").append(row);
|
$(".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]
|
sale_id = params[:sale_id]
|
||||||
order_source = params[:cashier_type]
|
order_source = params[:cashier_type]
|
||||||
tax_type = params[:tax_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 = Sale.find(sale_id)
|
||||||
sale.compute_by_sale_items(sale.total_discount, nil, order_source, tax_type)
|
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})
|
render json: JSON.generate({:status => true})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -4,23 +4,26 @@
|
|||||||
<div class="card-block h-100">
|
<div class="card-block h-100">
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<div id="order-detail-slimscroll" data-height="190">
|
<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">
|
<table class="table table-striped second_display_items" id="order-items-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<th><strong>#</strong></th>
|
||||||
<th class="item-name">Items</th>
|
<th class="item-name second-display-item"><strong>Items</strong></th>
|
||||||
<th class="item-">QTY</th>
|
<th class="item- second-display-item"><strong>QTY</strong></th>
|
||||||
<th class="item-">Price</th>
|
<th class="item- second-display-item"><strong>Price</strong></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody class="second-display-item">
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer second-display-item">
|
||||||
<table class="table" border="0">
|
<table class="table" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="charges-name"><strong>Sub Total:</strong></td>
|
<td class="charges-name"><strong>Sub Total:</strong></td>
|
||||||
@@ -51,3 +54,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
||||||
@@ -104,6 +104,11 @@
|
|||||||
//html font-size for second display till 35px!
|
//html font-size for second display till 35px!
|
||||||
// document.getElementsByTagName( "html" )[0].style[ "font-size" ] = "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 () {
|
$('#s_reload').on('click', function () {
|
||||||
window.location.href = '/origami/second_display';
|
window.location.href = '/origami/second_display';
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user