check JunctionPay

This commit is contained in:
phyusin
2018-06-11 17:20:47 +06:30
parent 425e72afe7
commit e2fdf994d7
4 changed files with 76 additions and 23 deletions

View File

@@ -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,

View File

@@ -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>