Pull from master
This commit is contained in:
@@ -18,6 +18,7 @@ Osaka =>
|
||||
|
||||
BITP
|
||||
Auth Token => pZBHXEFbGNj/G => New => V3
|
||||
iua0SjUHzRaQw
|
||||
=> rj0MJ0XI5GsKZehE => Old => V2
|
||||
=> code2lab => Old
|
||||
|
||||
|
||||
@@ -28,6 +28,13 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
|
||||
delivery_type = "DIRECT DELIVERY";
|
||||
}
|
||||
|
||||
var payment_type = "";
|
||||
if(value.payment_type=="cash_on_delivery"){
|
||||
payment_type = "COD";
|
||||
}else if(value.payment_type =="dinga"){
|
||||
payment_type = "DINGA";
|
||||
}
|
||||
|
||||
if(key==0){
|
||||
var order_id = value.order_reservation_id;
|
||||
var sr_no = rowCount;
|
||||
@@ -49,11 +56,13 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+created_at
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+time
|
||||
+'<td width ="15%" class="align-center">'+time
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+value.grand_total
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="align-center">'
|
||||
+'<td width ="20%" class="align-center col-blue">'+payment_type
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'
|
||||
+'<span class="font-10 col-blue">'+ delivery_type +'</span>'
|
||||
+'</td>'
|
||||
+' </tr>';
|
||||
|
||||
@@ -7,6 +7,7 @@ $(function() {
|
||||
$('#cancel').hide();
|
||||
$(".tbl_customer").hide();
|
||||
$(".order_close_cashier").hide();
|
||||
$(".order_payment_type").hide();
|
||||
$(function() {
|
||||
$('.first-1').click();
|
||||
});
|
||||
@@ -253,6 +254,8 @@ function refreshDetailData(){
|
||||
$('#grand_total').text("0.00");
|
||||
$(".tbl_customer").hide();
|
||||
$(".order_close_cashier").hide();
|
||||
$(".order_payment_type").hide();
|
||||
$("#payment_type").text("");
|
||||
}
|
||||
|
||||
//show order list
|
||||
@@ -355,6 +358,13 @@ function show_order_detail(url,sr_no){
|
||||
$('#phone').text(data.phone);
|
||||
$('#address').text(address);
|
||||
|
||||
$(".order_payment_type").show();
|
||||
if(data.payment_type == "cash_on_delivery"){
|
||||
$("#payment_type").text("COD");
|
||||
}else if(data.payment_type == "dinga"){
|
||||
$("#payment_type").text("DINGA");
|
||||
}
|
||||
|
||||
$('#ref_no').text(data.transaction_ref);
|
||||
$('#callback_url').text(data.callback_url);
|
||||
$('#order_id').text(data.order_reservation_id);
|
||||
|
||||
@@ -20,6 +20,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
saleitemId = params[:sale_item_id]
|
||||
remark = params[:remark]
|
||||
access_code = params[:access_code]
|
||||
order_source = params[:type]
|
||||
saleitemObj = SaleItem.find(saleitemId)
|
||||
saleitemObj.status = 'void'
|
||||
saleitemObj.remark = remark
|
||||
@@ -58,7 +59,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
remark = "Void Sale Item ID #{saleitemObj.sale_item_id} | Receipt No #{saleObj.receipt_no} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}"
|
||||
sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"SALEITEMVOID" )
|
||||
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount)
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount,order_source)
|
||||
ProductCommission.create_product_commission(@newsaleitem, saleitemObj)
|
||||
end
|
||||
|
||||
@@ -66,6 +67,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
saleitemId = params[:sale_item_id]
|
||||
remark = params[:remark]
|
||||
access_code = params[:access_code]
|
||||
order_source = params[:type]
|
||||
saleitemObj = SaleItem.find(saleitemId)
|
||||
saleitemObj.status = 'foc'
|
||||
saleitemObj.remark = remark
|
||||
@@ -94,7 +96,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
remark = "FOC Sale Item ID #{saleitemObj.sale_item_id} | Receipt No #{saleObj.receipt_no} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}Receipt No #{saleObj.receipt_no}"
|
||||
sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"SALEITEMFOC" )
|
||||
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount,order.source)
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount,order_source)
|
||||
ProductCommission.create_product_commission(@newsaleitem, saleitemObj)
|
||||
end
|
||||
|
||||
@@ -123,6 +125,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
update_qty = params[:update_qty]
|
||||
update_price = params[:update_price]
|
||||
access_code = params[:access_code]
|
||||
order_source = params[:type]
|
||||
saleitemObj = SaleItem.find(saleitemId)
|
||||
sale = Sale.find(saleitemObj.sale_id)
|
||||
|
||||
@@ -159,7 +162,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount,order.source)
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount,order_source)
|
||||
|
||||
ProductCommission.edit_product_commission(saleitemObj)
|
||||
end
|
||||
@@ -168,6 +171,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
def item_void_cancel
|
||||
saleitemId = params[:sale_item_id]
|
||||
access_code = params[:access_code]
|
||||
order_source = params[:type]
|
||||
saleitemObj = SaleItem.find(saleitemId)
|
||||
both = SaleItem.where('product_code=?', saleitemObj.product_code)
|
||||
both.each do |item|
|
||||
@@ -191,7 +195,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
remark = "Cancle Void Sale Item ID #{saleitemObj.sale_item_id} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}|Receipt No #{saleObj.receipt_no}"
|
||||
sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"ITEMCANCELVOID" )
|
||||
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount, order.source)
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount, order_source)
|
||||
ProductCommission.remove_product_commission(saleitemObj)
|
||||
end
|
||||
|
||||
|
||||
@@ -173,7 +173,6 @@ class OrderReservation < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.send_status_to_ordering(url,ref_no,status,waiting_time=nil,min_type=nil,reason=nil)
|
||||
puts "send status to ordering"
|
||||
base_url = 'https://api.doemal.com'
|
||||
token = '3T-tnlYtFJ-5Z1vY6XQqxQ'
|
||||
order_reservation = Lookup.collection_of("order_reservation")
|
||||
@@ -400,7 +399,7 @@ class OrderReservation < ApplicationRecord
|
||||
if filter.blank?
|
||||
keyword = ''
|
||||
else
|
||||
keyword = "status LIKE '%#{filter}%'"
|
||||
keyword = "status LIKE '%#{filter}%' OR payment_type LIKE '%#{filter}%'"
|
||||
end
|
||||
|
||||
if from.present? && to.present?
|
||||
@@ -411,7 +410,7 @@ class OrderReservation < ApplicationRecord
|
||||
else
|
||||
select("order_reservations.*, deliveries.provider, deliveries.delivery_fee")
|
||||
.joins(" JOIN deliveries on deliveries.order_reservation_id = order_reservations.order_reservation_id")
|
||||
.where("status LIKE '%#{filter}%'")
|
||||
.where("status LIKE '%#{filter}%' OR payment_type LIKE '%#{filter}%'")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<% @response["data"].each do |transaction| %>
|
||||
<tr>
|
||||
<td><%= transaction["date"]%></td>
|
||||
<% if transaction["status"] == 'Rebate' || transaction["status"] == 'Discount'%>
|
||||
<% if transaction["status"] == 'Rebate' || transaction["status"] == 'Discount' || transaction["status"] == 'Reversal'%>
|
||||
<td><%= transaction["deposit"] %></td>
|
||||
<% else %>
|
||||
<td>(<%= transaction["withdraw"] %>)</td>
|
||||
@@ -95,7 +95,11 @@
|
||||
<tr style="border-top:2px solid #666;">
|
||||
<th>Balance</th>
|
||||
<th colspan="4">
|
||||
<%= @response["data"].first["balance"] %>
|
||||
<% if @response["data"].first["status"] == 'Reversal'%>
|
||||
<%= @response["data"].first["balance"] + @response["data"][1]["balance"]%>
|
||||
<%else%>
|
||||
<%= @response["data"].first["balance"] %>
|
||||
<%end%>
|
||||
</th>
|
||||
</tr>
|
||||
<%end%>
|
||||
|
||||
@@ -205,7 +205,8 @@ $('#junction_pay').on('click',function(){
|
||||
var com_port = '/dev/' + $("#com_port_name").val();
|
||||
var is_rebate=false;
|
||||
//alert(cashier_id + amount + com_port);
|
||||
code2lab.reqJunctionPay(true, cashier_id, parseFloat(amount), receipt_no, com_port);
|
||||
code2lab.reqJunctionPay(true, cashier_id, parseFloat(amount), receipt_no, com_port);
|
||||
|
||||
resJunctionPayUpdate = function(totalBillAmount , finalBillAmt,giftCardAmount, voucherAmount,voucherNumber,receiptNumber){
|
||||
$("#loading_wrapper").hide();
|
||||
|
||||
@@ -241,10 +242,25 @@ $('#junction_pay').on('click',function(){
|
||||
};
|
||||
|
||||
resJunctionPay = function(memberno,transactionNo,finalBillingAmt){
|
||||
if(memberno != ''){ is_rebate = true; }
|
||||
if(memberno != ''){ is_rebate = true; }
|
||||
};
|
||||
|
||||
|
||||
resError = function(err_message){
|
||||
if(err_message != "ERROR: Verification cancelled"){
|
||||
$("#loading_wrapper").hide();
|
||||
swal({
|
||||
title: "Oops!",
|
||||
text: err_message,
|
||||
type: "error",
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type+"/payment/others_payment";
|
||||
});
|
||||
}
|
||||
};
|
||||
// $("#loading_wrapper").hide();
|
||||
// $.ajax({type: "POST",
|
||||
// url: "/origami/payment/"+payment_type,
|
||||
|
||||
@@ -79,13 +79,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -122,13 +129,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -164,13 +178,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -206,13 +227,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -248,13 +276,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="10%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -353,7 +388,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left col-blue">
|
||||
GRAND TOTAL
|
||||
GRAND TOTAL
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right col-blue" id="grand_total">0.00</td>
|
||||
</tr>
|
||||
@@ -398,10 +433,14 @@
|
||||
<table class="table tbl_customer">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">REF.</span><br>
|
||||
<b id="trans_ref"></b>
|
||||
</td>
|
||||
<td class="body-td align-right order_payment_type">
|
||||
<span class="font-13">PAYMENT</span><br>
|
||||
<b id="payment_type"></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
|
||||
@@ -626,6 +626,10 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// //control borwser back
|
||||
window.location.hash="no-back-button";
|
||||
window.location.hash="Again-No-back-button";//again because google chrome don't insert first hash into history
|
||||
window.onhashchange=function(){window.location.hash="";}
|
||||
var cashier_type = "<%= @cashier_type %>";
|
||||
var customer_id = "<%= @customer.id %>";
|
||||
var customer_name = "<%= @customer.name %>";
|
||||
|
||||
@@ -169,13 +169,16 @@
|
||||
<!-- Column Three -->
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||
<button type="button" id="reprint" class="btn bg-blue btn-block">Reprint</button>
|
||||
|
||||
<% if current_user.role != "waiter" %>
|
||||
<% if @sale.sale_status != 'void' && @sale.sale_status != 'waste' && @sale.sale_status != 'spoile' %>
|
||||
<% if current_user.role == "cashier" %>
|
||||
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
|
||||
<a class="btn btn-block bg-blue waves-effect access_modal" data-toggle="modal" data-type="reprints"> Re.Print</a>
|
||||
|
||||
<% else %>
|
||||
<button type="button" class="btn bg-red btn-block" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void </button>
|
||||
<button type="button" id="reprint" class="btn bg-blue btn-block">Reprint</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
|
||||
@@ -340,9 +343,12 @@ function check_emp_access_code(access_code,type) {
|
||||
// console.log(result);
|
||||
if (result.status == true) {
|
||||
createAccessCode(code);
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
if(type == "void"){
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
$('#voidModal').modal('show');
|
||||
}else if(type=='reprint'){
|
||||
var sale_id = $('#sale_id').val();
|
||||
window.location.href = '/origami/'+ sale_id + "/reprint"
|
||||
}
|
||||
}else{
|
||||
swal("Opps",result.message,"warning")
|
||||
|
||||
@@ -240,7 +240,7 @@ var access_code = localStorage.getItem("access_code");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id + "&update_qty=" + qty + "&update_price=" + price+ "&access_code=" + access_code,
|
||||
data: 'sale_item_id=' + sale_item_id + "&update_qty=" + qty + "&update_price=" + price+ "&access_code=" + access_code + "&type=" + cashier_type,
|
||||
success: function (result) {
|
||||
swal({
|
||||
title: "Information!",
|
||||
@@ -294,7 +294,7 @@ var access_code = localStorage.getItem("access_code");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id + "&remark=" + remark+ "&access_code=" + access_code,
|
||||
data: 'sale_item_id=' + sale_item_id + "&remark=" + remark+ "&access_code=" + access_code + "&type=" + cashier_type,
|
||||
success: function (result) {
|
||||
location.reload();
|
||||
}
|
||||
@@ -307,7 +307,7 @@ var access_code = localStorage.getItem("access_code");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id + '&access_code=' + access_code,
|
||||
data: 'sale_item_id=' + sale_item_id + '&access_code=' + access_code + "&type=" + cashier_type,
|
||||
success: function (result) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
@@ -216,12 +216,14 @@
|
||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||
<% if @sale.sale_status != 'void' && @sale.sale_status != 'waste' && @sale.sale_status != 'spoile' %>
|
||||
<% if current_login_employee.role == "cashier" %>
|
||||
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
|
||||
<a class="btn btn-block bg-danger waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
|
||||
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="reprint"> Re.Print</a>
|
||||
<% else %>
|
||||
<button type="button" id="void" class="btn bg-danger btn-block">VOID</button>
|
||||
<button type="button" id="void" class="btn bg-danger btn-block">VOID</button>
|
||||
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -258,7 +260,7 @@
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#111;">×</button>
|
||||
</div>
|
||||
<div class="modal-body" style="padding: 0px 25px 15px 25px !important">
|
||||
<input type="text" id="access_code" class="access_code form-control col-md-12 ">
|
||||
<input type="password" id="access_code" class="access_code form-control col-md-12 ">
|
||||
<div class="row bottom p-l-15 p-r-15 m-t-10">
|
||||
<div class="col-md-3 access_number border-top border-left" data-value="1" data-type="num">1</div>
|
||||
<div class="col-md-3 access_number border-top border-left" data-value="2" data-type="num">2</div>
|
||||
@@ -406,10 +408,14 @@ $(document).on('click', '.access_modal', function(event){
|
||||
// $('#AccessCodeModal').modal('hide');
|
||||
// $('#focModal').modal('show');
|
||||
waste_and_spoilage("waste")
|
||||
}else if(type == "spoile") {
|
||||
}else if(type == "waste") {
|
||||
// $('#AccessCodeModal').modal('hide');
|
||||
// $('#voidModal').modal('show');
|
||||
waste_and_spoilage("spoile")
|
||||
// $('#focModal').modal('show');
|
||||
waste_and_spoilage("waste")
|
||||
}else if(type == "reprint") {
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
var sale_id = $('#sale_id').val();
|
||||
window.location.href = '/origami/'+ sale_id + "/reprint"
|
||||
}else if(type == "foc"){
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
$('#focModal').modal('show');
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
|
||||
<label><%= t("views.right_panel.detail.enter_keyboards") %></label>
|
||||
<input type="text" id="filter" name="filter" class="form-control" placeholder="Status" style="margin-right: 10px;height: 34px;">
|
||||
<input type="text" id="filter" name="filter" class="form-control" placeholder="Status/Payment Type" style="margin-right: 10px;height: 34px;">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<th><%= t("views.right_panel.detail.requested_time") %></th>
|
||||
<th><%= t("views.right_panel.detail.cooking_time") %></th>
|
||||
<th><%= t("views.right_panel.detail.status") %></th>
|
||||
<th><%= t :payment %> <%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t("views.right_panel.detail.remark") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -58,6 +59,7 @@
|
||||
<td><%= @order_reservation.requested_time.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %></td>
|
||||
<td><%= @order_reservation.expected_waiting_time rescue '-' %></td>
|
||||
<td><%= @order_reservation.status %></td>
|
||||
<td><%= @order_reservation.payment_type %></td>
|
||||
<td><%= @order_reservation.order_remark ? @order_reservation.order_remark : @order_reservation.reservation_remark %></td>
|
||||
</tr>
|
||||
<tr style="border-top:2px solid #000">
|
||||
@@ -67,6 +69,7 @@
|
||||
<th><%= t("views.right_panel.detail.total_price") %></th>
|
||||
<th><%= t("views.right_panel.detail.created_at") %></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<% @order_reservation.order_reservation_items.each do |item| %>
|
||||
<tr>
|
||||
@@ -76,6 +79,7 @@
|
||||
<td><%= number_with_precision(item.price > 0 ? item.qty * item.price : item.qty * item.unit_price, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
<td><%=l item.created_at.utc.getlocal , :format => :short rescue ' ' %></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<%
|
||||
@@ -123,27 +127,27 @@
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td><%= t("views.right_panel.detail.sub_total") %></td>
|
||||
<td colspan="3"><%= number_with_precision(total_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
<td colspan="4"><%= number_with_precision(total_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% if total_discount_amount > 0 %>
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td><%= t("views.right_panel.detail.discount_amount") %></td>
|
||||
<td colspan="3"><%= number_with_precision(total_discount_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
<td colspan="4"><%= number_with_precision(total_discount_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if total_delivery_fee > 0 %>
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td><%= t("views.right_panel.detail.delivery_fee") %></td>
|
||||
<td colspan="3"><%= number_with_precision(total_delivery_fee, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
<td colspan="4"><%= number_with_precision(total_delivery_fee, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if total_convenience_charge > 0 %>
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td><%= t("views.right_panel.detail.convenience_charge") %></td>
|
||||
<td colspan="3"><%= number_with_precision(total_convenience_charge, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
<td colspan="4"><%= number_with_precision(total_convenience_charge, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<!-- <% if total_delivery_tax > 0 %>
|
||||
@@ -171,14 +175,14 @@
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.tax") %></td>
|
||||
<td colspan="3"><%= number_with_precision(total_tax, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
<td colspan="4"><%= number_with_precision(total_tax, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if grand_total > 0 %>
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td colspan="2" style="text-align:center"></td>
|
||||
<td><%= t("views.right_panel.detail.grand_total") %> </td>
|
||||
<td colspan="3"><%= number_with_precision(grand_total, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
<td colspan="4"><%= number_with_precision(grand_total, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace :clear do
|
||||
ProductCommission.delete_all
|
||||
DiningFacility.update_all(status:'available')
|
||||
CashierTerminal.update_all(is_currently_login: 0)
|
||||
SeedGenerator.where("id > 1").update(:current => 0, :next => 0)
|
||||
SeedGenerator.where("id > 1").update(:current => 0, :next => 1)
|
||||
# Receipt.delete_all
|
||||
# ReceiptDetail.delete_all
|
||||
OrderReservation.delete_all
|
||||
|
||||
Reference in New Issue
Block a user