check JunctionPay
This commit is contained in:
@@ -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>';
|
||||
|
||||
@@ -359,7 +359,12 @@ function show_order_detail(url,sr_no){
|
||||
$('#address').text(address);
|
||||
|
||||
$(".order_payment_type").show();
|
||||
$("#payment_type").text(data.payment_type);
|
||||
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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -244,7 +245,10 @@ $('#junction_pay').on('click',function(){
|
||||
if(memberno != ''){ is_rebate = true; }
|
||||
};
|
||||
|
||||
|
||||
resError = function(err_message){
|
||||
$("#loading_wrapper").hide();
|
||||
swal ( "Oops" , err_message , "error" );
|
||||
};
|
||||
// $("#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>
|
||||
@@ -402,7 +437,7 @@
|
||||
<span class="font-13">REF.</span><br>
|
||||
<b id="trans_ref"></b>
|
||||
</td>
|
||||
<td class="body-td align-left order_payment_type">
|
||||
<td class="body-td align-right order_payment_type">
|
||||
<span class="font-13">PAYMENT</span><br>
|
||||
<b id="payment_type"></b>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user