origami numpad ui fix and promotion fix

This commit is contained in:
Yan
2017-11-07 14:48:33 +06:30
parent 7b2f928df0
commit 758b36000e
3 changed files with 39 additions and 15 deletions

View File

@@ -158,7 +158,7 @@ select.form-control {
} }
.long{ .long{
width:43%; width:49%;
} }
.sold { .sold {
@@ -240,7 +240,7 @@ select.form-control {
/* End Colors */ /* End Colors */
.left{ .left{
margin-left:20px; margin-left:1px;
} }
.bottom{ .bottom{
@@ -326,3 +326,15 @@ tr.discount-item-row:hover {
-moz-opacity: 1; /* mozilla */ -moz-opacity: 1; /* mozilla */
} }
/* For Payment Page */
.payment-long {
width:43%;
}
.payment-left {
margin-left: 20px;
}
/* End Payment Page */

View File

@@ -218,7 +218,7 @@ class Promotion < ApplicationRecord
else else
foc_qty = find_second_item_qty(sale_id, promo_product.item_code) foc_qty = find_second_item_qty(sale_id, promo_product.item_code)
# give total qty is 1 # give total qty is 1
foc_qty = (foc_qty - foc_qty) + 1 #foc_qty = (foc_qty - foc_qty) + 1
item = OrderItem.find_by_item_instance_code(promo_product.item_code) item = OrderItem.find_by_item_instance_code(promo_product.item_code)
# total = item.price * foc_qty # total = item.price * foc_qty

View File

@@ -248,15 +248,15 @@
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom"> <div class="row bottom">
<div class="cashier_number border-top border-right border-left long left" data-value="1000" data-type="add">1000</div> <div class="cashier_number border-top border-right border-left payment-long payment-left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number border-top border-right border-left long" data-value="3000" data-type="add">3000</div> <div class="cashier_number border-top border-right border-left payment-long" data-value="3000" data-type="add">3000</div>
</div> </div>
<div class="row bottom"> <div class="row bottom">
<div class="cashier_number border-top border-right border-left long left" data-value="5000" data-type="add">5000</div> <div class="cashier_number border-top border-right border-left payment-long payment-left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number border-top border-right border-left long" data-value="10000" data-type="add">10000</div> <div class="cashier_number border-top border-right border-left payment-long" data-value="10000" data-type="add">10000</div>
</div> </div>
<div class="row bottom"> <div class="row bottom">
<div class="pay border-top border-right border-left purple left" id="pay">Pay</div> <div class="pay border-top border-right border-left purple payment-left" id="pay">Pay</div>
</div> </div>
</div> </div>
</div> </div>
@@ -264,7 +264,10 @@
</div> </div>
</div> </div>
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1"> <div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
<button type="button" class="btn bg-default btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami/table/'+<%= @sale_data.bookings[0].dining_facility_id %>;"> <i class="material-icons">reply</i> Back </button> <button type="button" class="btn btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>
Back
</button>
<button type="button" class="btn bg-deep-purple btn-block" id="foc"> FOC </button> <button type="button" class="btn bg-deep-purple btn-block" id="foc"> FOC </button>
<button type="button" class="btn bg-red btn-block" id="void"> Void </button> <button type="button" class="btn bg-red btn-block" id="void"> Void </button>
<!-- Waiter Buttons --> <!-- Waiter Buttons -->
@@ -275,12 +278,21 @@
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){} var dining_id = "<%= @sale_data.bookings[0].dining_facility_id %>";
$("#back").on('click', function() {
localStorage.removeItem('cash');
window.location.href = '/origami/table/'+ dining_id;
});
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){
}
else { else {
$('#cash').text(localStorage.getItem("cash")); $('#cash').text(localStorage.getItem("cash"));
} }
update_balance(); update_balance();
}) });
$(document).on('click', '.cashier_number', function(event){ $(document).on('click', '.cashier_number', function(event){
if(event.handled !== true) { if(event.handled !== true) {