Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
phyusin
2018-03-15 10:31:38 +06:30
6 changed files with 83 additions and 30 deletions

View File

@@ -314,7 +314,7 @@ tr.discount-item-row:hover {
position: relative;
left: 42%;
top: 30%;
background-color: #d9534f;
background-color: #32ad1a;
color: #fff;
text-align: center;
width: 200px;
@@ -396,3 +396,27 @@ i.logout_icon{
color: #fff !important;
background-color: #5DADE2 !important;
}
/* Start Is Member Modal */
#is_memberModal .modal-body {
height: 200px !important;
}
#is_memberModal .btn {
width: 80%;
}
/* End Is Member Modal */
/* Start iframe */
iframe {
border: none;
overflow: hidden !important;
width: 400px;
height: 550px;
}
#pdfModal .btn {
width: 150%;
height: 100%;
}
/* End iframe */

View File

@@ -884,7 +884,7 @@ def self.get_menu_item_query(order_by)
"(CASE WHEN si.qty IS NOT NULL THEN SUM(si.qty) ELSE 0 END) as total_item," +
"(CASE WHEN si.unit_price != mii.price THEN si.unit_price ELSE mii.price END) as unit_price," +
"(CASE WHEN si.qty IS NOT NULL THEN (SUM(si.qty) * si.unit_price) ELSE 0 END) as grand_total," +
"mii.price as unit_price, (CASE WHEN si.product_name IS NOT NULL THEN si.product_name ELSE mii.item_instance_name END) as product_name,
"mii.price as unit_price, (CASE WHEN si.product_name IS NOT NULL THEN si.product_name ELSE CONCAT(menu_items.name,' - ',mii.item_instance_name) END) as product_name,
mc.name as" +
" menu_category_name,mc.id as menu_category_id, si.remark as status_type,
si.price as price ")

View File

@@ -162,6 +162,9 @@
<div id="sxModal">
<div id="sxModal-Content"><h3><%= t :card_tap %></h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
<!-- The modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="modalLabelLarge" aria-hidden="true">
@@ -212,4 +215,8 @@
$("#type").val("card");
}
}
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>

View File

@@ -263,6 +263,9 @@
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
</div>
<script type="text/javascript">
@@ -475,11 +478,11 @@
if(booking_id!= "" && page == "pending"){
window.location.href = '/origami/'+cashier_type+'/pending_order/'+booking_id;
}else{
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/customers/payment/';
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
}
}else{
if(page == "payment"){
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/customers/payment/';
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
}else{
if (type=="Table") {
window.location.href = '/origami/table/'+id
@@ -519,7 +522,11 @@
}
})
});
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>

View File

@@ -391,21 +391,23 @@
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="pdfModalLabel"></h4>
<h4 class="modal-title">
<span id="pdfModalLabel"></span>
<span id="changed_amount" class="p-l-120"></span>
</h4>
</div>
<div class="modal-body">
<input type="hidden" name="sale_receipt_no" id="sale_receipt_no">
<input type="hidden" name="filename" id="filename">
<input type="hidden" name="printer_name" id="printer_name">
<p id="changed_amount"></p>
<div class="text-center">
<iframe id="receipt_pdf" src="" style="width: 400px; height: 600px;"></iframe>
<iframe id="receipt_pdf" src="" class="pdf-iframe" scrolling="no"></iframe>
</div>
</div>
<div class="modal-footer ">
<div class="row p-r-20">
<div class="row m-b-10 m-r-30">
<% if ENV["SERVER_MODE"] != 'cloud' %>
<div class="col-md-5">
<div class="col-md-5 m-r-20">
<button type="button" class="btn btn-link bg-red waves-effect print_receipt">Print</button>
</div>
<% end %>
@@ -424,27 +426,29 @@
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="is_memberModalLabel">Are you Member?</h3>
<h1 class="modal-title" id="is_memberModalLabel">Are you Member?</h1>
</div>
<div class="modal-body">
<div class="row text-center">
<input type="hidden" name="paypar_account_no" id="paypar_account_no" />
<input type="hidden" name="qr_code" id="qr_code" />
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<input type="hidden" name="paypar_account_no" id="paypar_account_no" />
<input type="hidden" name="qr_code" id="qr_code" />
<div class="row text-center m-t-20">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_member">Card Member</button>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_qr_code">QR Code</button>
</div>
</div>
<div class="row clearfix"></div>
<div class="row text-center m-t-20">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-green waves-effect btn_customer_yes">Yes</button>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect" data-dismiss="modal">No</button>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_member">Member</button>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_qr_code">QR</button>
</div>
</div>
</div>
<div class="modal-footer"></div>
@@ -453,7 +457,12 @@
</div>
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div id="sxModal-Content">
<h3>Card Tap</h3>
</div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
<script type="text/javascript">
@@ -462,7 +471,7 @@ var customer_id = "<%= @customer.id %>";
var customer_name = "<%= @customer.name %>";
$(document).ready(function(){
//start customer modal popup
if((customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
if((cashier_type=='quick_service') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
if((customer_id == 'CUS-000000000001') && (customer_name == 'WALK-IN')){
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
}
@@ -480,7 +489,9 @@ var customer_name = "<%= @customer.name %>";
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
console.log("ssssssssssss")
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment")
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment");
console.log(member_id);
console.log(member_discount);
if (member_id && member_discount) {
if(parseInt(jQuery.inArray("Credit", payment_type)) == -1){
$("#credit_payment").hide();
@@ -600,7 +611,7 @@ var customer_name = "<%= @customer.name %>";
$("#printer_name").val(result.printer_name);
$("#receipt_pdf").attr("src", result.filename);
$("#pdfModal").modal({show : true, backdrop : false, keyboard : false});
$("#pdfModalLabel").text("Payment Successful!");
$("#pdfModalLabel").text("Sale Completed");
$("#changed_amount").text("");
if($('#balance').text() < 0){
<% if precision.to_i > 0 %>
@@ -1099,4 +1110,8 @@ var customer_name = "<%= @customer.name %>";
});
});
}
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>

View File

@@ -6,13 +6,13 @@ class CreatePrintSettings < ActiveRecord::Migration[5.1]
t.string :template
t.string :font, :default => ""
t.string :printer_name, :null => false
t.string :api_settings,
t.string :api_settings
t.string :brand_name
t.string :type
t.decimal :page_width, :null => false, :default => 210
t.decimal :page_height, :null => false, :default => 1450
t.integer :print_copies, :null => false, :default => 1
t.string :precision
t.string :precision
t.boolean :delimiter
t.integer :heading_space