conflict
This commit is contained in:
@@ -34,6 +34,14 @@
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :dine_in_cashier %></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 order_reservation">
|
||||
<div class="info-box bg-blue">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :order_reservation %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Widgets -->
|
||||
<% if !@current_user.nil? && @current_user.role != 'waiter' %>
|
||||
@@ -199,8 +207,11 @@
|
||||
|
||||
$(".qs_view").on('click', function() {
|
||||
document.getElementById('second_view').click();
|
||||
window.location.href = '/origami/quick_service';
|
||||
|
||||
window.location.href = '/origami/quick_service';
|
||||
});
|
||||
|
||||
$(".order_reservation").on('click', function() {
|
||||
window.location.href = '/origami/order_reservation';
|
||||
});
|
||||
|
||||
$("#second_view").on('click', function () {
|
||||
|
||||
@@ -15,41 +15,41 @@
|
||||
<div class="rebate-form">
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="">You can redeem up to </label>
|
||||
<%@redeem_prices = @redeem_prices +@rounding_adj%>
|
||||
<input type="text" name="" id="redeemamt" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%= @redeem_prices %>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||
<label class="">You can pay up to </label>
|
||||
<%@payment_prices = @payment_prices +@rounding_adj%>
|
||||
<input type="text" name="" id="paymentamt" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%= @payment_prices %>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<% if @dingacount > 0 %>
|
||||
<% if @payparcount > 0 %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="">Recent Redeem Amount </label>
|
||||
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%= @dingacount %>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||
<label class="">Recent Payment Amount </label>
|
||||
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%= @payparcount %>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class=""> Rebate Balance </label>
|
||||
<label class="">Available Balance </label>
|
||||
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@membership_rebate_balance%>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="">Redeem Amount</label>
|
||||
<label class="">Payment Balance</label>
|
||||
<div id="used_amount" class="form-control col-lg-7 col-md-7 col-sm-7">0.0</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <% if @dingacount > 0 %>
|
||||
<p class="">Last time rebate amount is <%= @dingacount %></p>
|
||||
<!-- <% if @payparcount > 0 %>
|
||||
<p class="">Last time rebate amount is <%= @payparcount %></p>
|
||||
<% end %>
|
||||
<p class="">You can rebate upto <span style="color:red;" id="food_prices"><%= @redeem_prices %></span></p> -->
|
||||
<p class="">You can rebate upto <span style="color:red;" id="food_prices"><%= @payment_prices %></span></p> -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
@@ -92,7 +92,7 @@
|
||||
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
|
||||
</div>
|
||||
<div class="row bottom m-l-5">
|
||||
<div class="pay purple left" id="dinga">Pay</div>
|
||||
<div class="pay purple left" id="dinga_payment">Pay</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -106,15 +106,43 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- customer light box -->
|
||||
<div class="modal fade" id="is_paymemberModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title" id="is_paymemberModalLabel">Are you Member?</h1>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<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>
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var cashier_type = "<%= @cashier_type %>";
|
||||
$(document).ready(function() {
|
||||
setHeaderBreadCrumb(_REDEEM_PAYMENT_);
|
||||
setHeaderBreadCrumb(_DINGA_);
|
||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||
else {
|
||||
$('#redeemamt').attr("value",parseFloat("<%= @redeem_prices %>") - parseFloat(localStorage.getItem("cash")));
|
||||
}
|
||||
});
|
||||
else {
|
||||
$('#paymentamt').attr("value",parseFloat("<%= @payment_prices %>") - parseFloat(localStorage.getItem("cash")));
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.cashier_number', function(event){
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
@@ -148,7 +176,7 @@
|
||||
$('#used_amount').text(cash.substr(0,cash.length-1));
|
||||
break;
|
||||
case 'nett':
|
||||
var remain_amount = $('#redeemamt').val();
|
||||
var remain_amount = $('#paymentamt').val();
|
||||
$('#used_amount').text(remain_amount);
|
||||
break;
|
||||
|
||||
@@ -159,22 +187,82 @@
|
||||
}
|
||||
});
|
||||
|
||||
$("#dinga").click(function(){
|
||||
$("#dinga_payment").click(function(){
|
||||
valid_amount = $("#valid_amount").val();
|
||||
sale_id = $("#valid_amount").attr('data-value');
|
||||
membership_id = $("#valid_amount").attr('data-member-value');
|
||||
redeem_amount = parseFloat($("#used_amount").text());
|
||||
if(redeem_amount<=0 ){
|
||||
swal ( "Oops" , "Please type valid amount!" , "warning" );
|
||||
}else if(valid_amount< redeem_amount){
|
||||
swal ( "Oops" , "Insufficient Amount!" , "warning" );
|
||||
payment_amount = parseFloat($("#used_amount").text());
|
||||
if((membership_id!=undefined) && (membership_id!="") && (membership_id > 0)){
|
||||
if(payment_amount<=0 ){
|
||||
swal ( "Oops" , "Please type valid amount!" , "warning" );
|
||||
}else if(valid_amount< payment_amount){
|
||||
swal ( "Oops" , "Insufficient Amount!" , "warning" );
|
||||
}else{
|
||||
if(payment_amount <= "<%= @payment_prices %>"){
|
||||
$(this).off("click");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%=origami_payment_dinga_path%>",
|
||||
data: {payment_amount:payment_amount,membership_id:membership_id,sale_id:sale_id,transaction_ref:""},
|
||||
success: function(result){
|
||||
if(result.status == true){
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: result.message,
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment"
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
swal ( "Oops" , "Payment Amount is over!" , "warning" );
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(redeem_amount <= "<%= @redeem_prices %>"){
|
||||
$(this).off("click");
|
||||
$.ajax({
|
||||
$("#is_paymemberModal").modal({show : true, backdrop: false, keyboard : false});
|
||||
}
|
||||
});
|
||||
|
||||
// Read Card Reader
|
||||
$(".btn_member").on('click', function(){
|
||||
var cardNo = "";
|
||||
var customer_id = '';
|
||||
var customer_name = '';
|
||||
var membership_id = '';
|
||||
var membership_type = '';
|
||||
var sale_id = $("#sale_id").text() || 0;
|
||||
var customer_mamber_card_no = 0;
|
||||
|
||||
$("#is_paymemberModal").hide();
|
||||
$("#sxModal").show();
|
||||
setTimeout(function(){
|
||||
getCardNo();
|
||||
$("#sxModal").hide();
|
||||
customer_mamber_card_no = $("#paypar_account_no").val();
|
||||
|
||||
if(sale_id != 0 && customer_mamber_card_no != 0){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/origami/"+sale_id+"/send_account" ,
|
||||
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (data.status == true) {
|
||||
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
||||
$("#valid_amount").val(parseFloat(valid_amount));
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%=origami_payment_dinga_path%>",
|
||||
data: {redeem_amount:redeem_amount,membership_id:membership_id,sale_id:sale_id},
|
||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref},
|
||||
success: function(result){
|
||||
if(result.status == true){
|
||||
swal({
|
||||
@@ -185,17 +273,151 @@
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment"
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
swal ( "Oops" , "Redeem Amount is over!" , "warning" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal({
|
||||
title: 'Oops',
|
||||
text: data.message.toString(),
|
||||
type: 'error',
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/DINGA";
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},100);
|
||||
});
|
||||
|
||||
// Read NFC card no from java
|
||||
function getCardNo(){
|
||||
code2lab.readNFC();
|
||||
}
|
||||
|
||||
// get CardNo from Java
|
||||
function setCardNo(cardNo){
|
||||
if(cardNo.length == 16){
|
||||
$("#paypar_account_no").val(cardNo);
|
||||
}
|
||||
}
|
||||
|
||||
// QR Code Reader
|
||||
$(".btn_qr_code").on('click', function(e){
|
||||
$("#is_memberModal").hide();
|
||||
var code = "";
|
||||
var customer_id = '';
|
||||
var customer_name = '';
|
||||
var membership_id = '';
|
||||
var membership_type = '';
|
||||
setTimeout(function(){
|
||||
code=getQRCode();
|
||||
if(sale_id != 0 && code != ""){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/origami/"+sale_id+"/send_account" ,
|
||||
data: { account_no : code, amount : payment_amount, receipt_no : receipt_no},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (data.status == true) {
|
||||
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
||||
$("#valid_amount").val(parseFloat(valid_amount));
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%=origami_payment_paymal_path%>",
|
||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref},
|
||||
success: function(result){
|
||||
if(result.status == true){
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: result.message,
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal({
|
||||
title: 'Oops',
|
||||
text: data.message.toString(),
|
||||
type: 'error',
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/DINGA";
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},100);
|
||||
});
|
||||
|
||||
// Read qrcode from java
|
||||
function getQRCode(){
|
||||
return code2lab.readQRCode();
|
||||
$("#qr_code").val(code);
|
||||
}
|
||||
|
||||
function update_sale(membership_id, customer_id, customer_name, sale_id) {
|
||||
var customer="";
|
||||
if(customer_name != ""){
|
||||
customer = '(' + customer_name + ')';
|
||||
}
|
||||
|
||||
swal({
|
||||
title: "Confirmation !",
|
||||
text: 'Are You Sure to assign this customer' + customer + '!',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "green",
|
||||
confirmButtonText: "Yes!",
|
||||
cancelButtonClass: 'btn btn-danger',
|
||||
closeOnConfirm: false,
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/origami/"+sale_id+"/"+cashier_type+"/customers/update_sale" ,
|
||||
data: {customer_id:customer_id,sale_id:sale_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
//change customer detail
|
||||
$("#customer_name").html(customer_name);
|
||||
$("#membership_id").html(membership_id);
|
||||
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
|
||||
}else{
|
||||
swal("Alert!", "Record not found!", "error");
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$("#sxModal .btn_cancel").on('click',function(){
|
||||
$("#sxModal").hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -140,9 +140,7 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var webview = <%= @webview %>;
|
||||
if(webview){
|
||||
code2lab.checkMobile(webview); //js func: for mobile login
|
||||
}
|
||||
|
||||
showHideNavbar(webview,"index");
|
||||
|
||||
$(".tables").on('click', function(){
|
||||
|
||||
471
app/views/origami/order_reservation/index.html.erb
Normal file
471
app/views/origami/order_reservation/index.html.erb
Normal file
@@ -0,0 +1,471 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row m-t--10">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4" style="margin:0px 0px 0px -5px !important ">
|
||||
<ul class="nav nav-tabs tab-col-teal" role="tablist">
|
||||
<li class="nav-item active" data-color="#F44336" style="background-color: #F44336;">
|
||||
<a class="nav-link" data-toggle="tab" href="#pending" role="tab"><p class="num">4</p> <%= t :pending %></a>
|
||||
</li>
|
||||
<li class="nav-item" data-color="#673AB7" style="background-color: #673AB7;">
|
||||
<a class="nav-link" data-toggle="tab" href="#processing" role="tab"><p class="num">4</p> <%= t :processing %></a>
|
||||
</li>
|
||||
<li class="nav-item" data-color="#009688" style="background-color: #009688;">
|
||||
<a class="nav-link" data-toggle="tab" href="#delivery" role="tab"><p class="num">4</p> <%= t :delivering %></a>
|
||||
</li>
|
||||
<li class="nav-item" data-color="#03A9F4" style="background-color: #03A9F4;">
|
||||
<a class="nav-link" data-toggle="tab" href="#completed" role="tab"><p class="num">4</p> <%= t :completed %></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content m-t--10">
|
||||
<div class="tab-pane active" id="pending" role="tabpanel">
|
||||
<div class="card-block font-13">
|
||||
<div id="menu-slimscroll" data-height="50">
|
||||
<table class="table table-stripe custom-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
1
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
2
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
3
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
4
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--- Panel 3 - Orders -->
|
||||
<div class="tab-pane dining" id="processing" role="tabpanel">
|
||||
<div class="card-block font-13">
|
||||
<div id="menu-slimscroll" data-height="50">
|
||||
<table class="table table-stripe custom-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
1
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
2
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--- Panel 3 - Orders -->
|
||||
<div class="tab-pane dining" id="delivery" role="tabpanel">
|
||||
<div class="card-block font-13">
|
||||
<div id="menu-slimscroll" data-height="50">
|
||||
<table class="table table-stripe custom-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
1
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
2
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
3
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--- Panel 3 - Orders -->
|
||||
<div class="tab-pane dining" id="completed" role="tabpanel">
|
||||
<div class="card-block font-13">
|
||||
<div id="menu-slimscroll" data-height="50">
|
||||
<table class="table table-stripe custom-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
1
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="5%" class="align-left">
|
||||
3
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
3:30 PM
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
13000
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue">STATUS</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-4 col-sm-4" style="margin:0px -5px !important ">
|
||||
<div class="card">
|
||||
<div class="card-header custom-card-header" style="color:">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td width ="70%" class="header-td align-left"><b class="col-pink font-16">No.11</b>
|
||||
<span class="font-13">(DELIVERY)</span>
|
||||
</td>
|
||||
<td width ="30%" class="header-td font-16 align-right"><b>0065 4321</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-block custom-card-block">
|
||||
<div id="order-detail-slimscroll" data-height="220">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="70%" class="body-td align-left">
|
||||
MENU ITEM 01
|
||||
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
|
||||
</td>
|
||||
<td width ="30%" class="body-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="body-td align-left">
|
||||
MENU ITEM 01
|
||||
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
|
||||
</td>
|
||||
<td width ="30%" class="body-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="body-td align-left">
|
||||
MENU ITEM 01
|
||||
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
|
||||
</td>
|
||||
<td width ="30%" class="body-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="body-td align-left">
|
||||
MENU ITEM 01
|
||||
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
|
||||
</td>
|
||||
<td width ="30%" class="body-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="body-td align-left">
|
||||
MENU ITEM 01
|
||||
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
|
||||
</td>
|
||||
<td width ="30%" class="body-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="body-td align-left">
|
||||
MENU ITEM 01
|
||||
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
|
||||
</td>
|
||||
<td width ="30%" class="body-td align-right">1400.00</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer custom-card-footer">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left">
|
||||
SUB TOTAL
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left">
|
||||
DELIVERY FEES (PICK-UP)
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left">
|
||||
CONVENIENCE CHARGES
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left">
|
||||
GOVERNMENT TAX
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right">1400.00</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer grand-card-footer">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left col-blue">
|
||||
GRAND TOTAL
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right col-blue">1400.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="50%" class="footer-td align-left col-blue">
|
||||
<button type="button" class="btn btn-lg bg-blue waves-effect" data-dismiss="modal"><strong>DECLINE</strong></button>
|
||||
</td>
|
||||
<td width ="50%" class="footer-td align-right col-blue">
|
||||
<button type="button" class="btn btn-lg bg-blue waves-effect" data-dismiss="modal"><strong>ACCEPT</strong></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="'col-lg-4 col-md-4 col-sm-4'" style="margin:0px -5px 0px -2px !important ">
|
||||
<div class="card" style="background-color: #E8EAF6">
|
||||
<div class="card-header custom-card-header" style="background-color: #E8EAF6">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td width ="" class="header-td align-left col-blue">CUSTOMER & DELIVERY INFORMATION
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">NAME</span><br>
|
||||
<b>DAW AYE AYE</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">PHONE</span><br>
|
||||
<b>09 8765 4321 098</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">ADDRESS</span><br>
|
||||
<b>No. (12), 3rd floor, zay kyee Street, kyi myin dine
|
||||
infront of Nya Zay Main Entrance</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">DELEVER TO</span><br>
|
||||
<b>HOME</b>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.nav-tabs > li.active > a,
|
||||
.nav-tabs > li.active > a:hover,
|
||||
.nav-tabs > li.active > a:focus {
|
||||
border-bottom: 2px solid #2196F3 ;
|
||||
bottom: 2px ;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link {
|
||||
padding: 0.5286em .33em;
|
||||
}
|
||||
.nav-tabs li a.active {
|
||||
color: #111 !important;
|
||||
border-bottom: 0px solid #fff !important;
|
||||
}
|
||||
.nav-tabs .nav-link.active {
|
||||
color: #111;
|
||||
border-color: #fff;
|
||||
}
|
||||
.nav-tabs > li > a {
|
||||
margin-right: 0px;
|
||||
color:#fff !important;
|
||||
}
|
||||
|
||||
.nav-tabs > li > a {
|
||||
border-bottom: 2px solid #2196F3;
|
||||
bottom: 2px;
|
||||
}
|
||||
.nav-tabs.tab-col-teal > li > a:before {
|
||||
border-bottom: 0px solid #009688;
|
||||
}
|
||||
.nav-tabs .nav-item{
|
||||
margin-bottom: 2px ;
|
||||
}
|
||||
.num{
|
||||
color:#fff;
|
||||
text-align: center;
|
||||
margin-bottom: -1px !important;
|
||||
}
|
||||
.nav-tabs .nav-link.active > p{
|
||||
color: #111;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
/*Custosm Class*/
|
||||
.table .header-td{
|
||||
border-top:0px solid !important;
|
||||
border-bottom: 0px solid !important;
|
||||
padding:3px 7px !important;
|
||||
border-top:0px solid !important;
|
||||
border-bottom: 0px solid !important;
|
||||
}
|
||||
.custom-card-block .table td:first-child,
|
||||
.custom-card-block .table td:nth-child(2),
|
||||
.custom-card-footer .table td:first-child,
|
||||
.custom-card-footer .table td:nth-child(2){
|
||||
border-top:0px solid !important;
|
||||
}
|
||||
|
||||
.custom-card-footer .footer-td ,
|
||||
.grand-card-footer .footer-td {
|
||||
border-top:0px solid !important;
|
||||
border-bottom:0px solid !important;
|
||||
font-weight: bold;
|
||||
padding:5px 10px;
|
||||
}
|
||||
.custom-card-header{
|
||||
border-bottom: 1px solid #F8BBD0 !important;
|
||||
padding:13px 5px !important;
|
||||
}
|
||||
.custom-card-footer{
|
||||
border-top: 1px solid #F8BBD0 !important;
|
||||
}
|
||||
.custom-card-block,
|
||||
.grand-card-footer,
|
||||
.custom-card-footer{
|
||||
padding :5px !important;
|
||||
}
|
||||
.custom-table{
|
||||
background-color:#F3E5F5;
|
||||
}
|
||||
.custom-table tbody tr td,
|
||||
.custom-table tbody tr th{
|
||||
border-top: 1px solid #FFEBEE;
|
||||
border-bottom: 1px solid #FFEBEE;
|
||||
}
|
||||
</style>
|
||||
@@ -13,6 +13,7 @@
|
||||
<div class="col-lg-5 col-md-5 col-sm-5">
|
||||
<div class="card m-l-10 m-t-10" style="padding:0px 20px;">
|
||||
<div class="rebate-form">
|
||||
<input type="hidden" name="receipt_no" id="receipt_no" value="<%= @receipt_no%>">
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="">You can pay up to </label>
|
||||
@@ -106,6 +107,33 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- customer light box -->
|
||||
<div class="modal fade" id="is_paymemberModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title" id="is_paymemberModalLabel">Are you Member?</h1>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<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>
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var cashier_type = "<%= @cashier_type %>";
|
||||
$(document).ready(function() {
|
||||
@@ -165,17 +193,75 @@
|
||||
sale_id = $("#valid_amount").attr('data-value');
|
||||
membership_id = $("#valid_amount").attr('data-member-value');
|
||||
payment_amount = parseFloat($("#used_amount").text());
|
||||
if(payment_amount<=0 ){
|
||||
swal ( "Oops" , "Please type valid amount!" , "warning" );
|
||||
}else if(valid_amount< payment_amount){
|
||||
swal ( "Oops" , "Insufficient Amount!" , "warning" );
|
||||
if((membership_id!=undefined) && (membership_id!="") && (membership_id > 0)){
|
||||
if(payment_amount<=0 ){
|
||||
swal ( "Oops" , "Please type valid amount!" , "warning" );
|
||||
}else if(valid_amount< payment_amount){
|
||||
swal ( "Oops" , "Insufficient Amount!" , "warning" );
|
||||
}else{
|
||||
if(payment_amount <= "<%= @payment_prices %>"){
|
||||
$(this).off("click");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%=origami_payment_paymal_path%>",
|
||||
data: {payment_amount:payment_amount,membership_id:membership_id,sale_id:sale_id,transaction_ref:""},
|
||||
success: function(result){
|
||||
if(result.status == true){
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: result.message,
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment"
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
swal ( "Oops" , "Payment Amount is over!" , "warning" );
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(payment_amount <= "<%= @payment_prices %>"){
|
||||
$(this).off("click");
|
||||
$.ajax({
|
||||
$("#is_paymemberModal").modal({show : true, backdrop: false, keyboard : false});
|
||||
}
|
||||
});
|
||||
|
||||
// Read Card Reader
|
||||
$(".btn_member").on('click', function(){
|
||||
var cardNo = "";
|
||||
var sale_id = $("#sale_id").text() || 0;
|
||||
var receipt_no = $("#receipt_no").val() || "";
|
||||
var customer_mamber_card_no = 0;
|
||||
var payment_amount = parseFloat($("#used_amount").text());
|
||||
|
||||
$("#is_paymemberModal").hide();
|
||||
$("#sxModal").show();
|
||||
setTimeout(function(){
|
||||
getCardNo();
|
||||
$("#sxModal").hide();
|
||||
customer_mamber_card_no = $("#paypar_account_no").val();
|
||||
|
||||
if(sale_id != 0 && customer_mamber_card_no != 0){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/origami/"+sale_id+"/send_account" ,
|
||||
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (data.status == true) {
|
||||
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
||||
$("#valid_amount").val(parseFloat(valid_amount));
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%=origami_payment_paymal_path%>",
|
||||
data: {payment_amount:payment_amount,membership_id:membership_id,sale_id:sale_id},
|
||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref},
|
||||
success: function(result){
|
||||
if(result.status == true){
|
||||
swal({
|
||||
@@ -186,17 +272,114 @@
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment"
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
swal ( "Oops" , "Payment Amount is over!" , "warning" );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
swal({
|
||||
title: 'Oops',
|
||||
text: data.message.toString(),
|
||||
type: 'error',
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/PAYMAL";
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},100);
|
||||
});
|
||||
|
||||
// Read NFC card no from java
|
||||
function getCardNo(){
|
||||
code2lab.readNFC();
|
||||
}
|
||||
|
||||
// get CardNo from Java
|
||||
function setCardNo(cardNo){
|
||||
if(cardNo.length == 16){
|
||||
$("#paypar_account_no").val(cardNo);
|
||||
}
|
||||
}
|
||||
|
||||
// QR Code Reader
|
||||
$(".btn_qr_code").on('click', function(e){
|
||||
$("#is_paymemberModal").hide();
|
||||
var code = "";
|
||||
var sale_id = $("#sale_id").text() || 0;
|
||||
var receipt_no = $("#receipt_no").val() || "";
|
||||
var payment_amount = parseFloat($("#used_amount").text());
|
||||
setTimeout(function(){
|
||||
code=getQRCode();
|
||||
if(sale_id != 0 && code != ""){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/origami/"+sale_id+"/send_account" ,
|
||||
data: { account_no : code, amount : payment_amount, receipt_no : receipt_no},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (data.status == true) {
|
||||
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
||||
$("#valid_amount").val(parseFloat(valid_amount));
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%=origami_payment_paymal_path%>",
|
||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref},
|
||||
success: function(result){
|
||||
if(result.status == true){
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: result.message,
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal({
|
||||
title: 'Oops',
|
||||
text: data.message.toString(),
|
||||
type: 'error',
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/PAYMAL";
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},100);
|
||||
});
|
||||
|
||||
// Read qrcode from java
|
||||
function getQRCode(){
|
||||
return code2lab.readQRCode();
|
||||
$("#qr_code").val(code);
|
||||
}
|
||||
|
||||
$("#sxModal .btn_cancel").on('click',function(){
|
||||
$("#sxModal").hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
<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">
|
||||
<div class="text-center">
|
||||
<div class="text-center">
|
||||
<iframe id="receipt_pdf" src="" class="pdf-iframe" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1132,16 +1132,40 @@ var customer_name = "<%= @customer.name %>";
|
||||
// QR Code Reader
|
||||
$(".btn_qr_code").on('click', function(e){
|
||||
$("#is_memberModal").hide();
|
||||
var code = "";
|
||||
var code = "";
|
||||
var customer_id = '';
|
||||
var customer_name = '';
|
||||
var membership_id = '';
|
||||
var membership_type = '';
|
||||
setTimeout(function(){
|
||||
code=getQRCode();
|
||||
$("#qr_code").val(code);
|
||||
code=getQRCode();
|
||||
if(sale_id != 0 && code != ""){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/origami/"+sale_id+"/get_customer" ,
|
||||
data: { filter : code ,type :"card"},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (data[0].customer_id == false) {
|
||||
swal("Alert!", data[0].message, "error");
|
||||
}else{
|
||||
customer_id = data[0].customer_id;
|
||||
customer_name = data[0].name;
|
||||
membership_id = data[0].membership_id;
|
||||
membership_type = data[0].membership_type;
|
||||
update_sale(membership_id, customer_id, customer_name,sale_id);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},100);
|
||||
});
|
||||
|
||||
// Read qrcode from java
|
||||
function getQRCode(){
|
||||
return code2lab.readQRCode();
|
||||
$("#qr_code").val(code);
|
||||
}
|
||||
|
||||
function update_sale(membership_id, customer_id, customer_name, sale_id) {
|
||||
|
||||
@@ -10,19 +10,19 @@
|
||||
<div id="custom-slimscroll">
|
||||
<div class="card-columns">
|
||||
<% @sale.each do |sale| %>
|
||||
<div class="card sales bg-red text-white" data-id = "<%= sale.sale_id %>">
|
||||
<div class="card sales bg-red text-white" data-id = "<%= sale.sale_id %>">
|
||||
<div class="card-block">
|
||||
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;">Billed</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% @order.each do |order| %>
|
||||
<div class="card sales blue text-white" data-id = "<%= order.booking_id %>">
|
||||
<div class="card-block">
|
||||
<%= order.booking_id %><span style="font-size:12px;float:right;line-height:inherit;">new</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% @order.each do |order| %>
|
||||
<div class="card sales blue text-white" data-id = "<%= order.booking_id %>">
|
||||
<div class="card-block">
|
||||
<%= order.booking_id %><span style="font-size:12px;float:right;line-height:inherit;">new</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -202,13 +202,13 @@ $(document).ready(function(){
|
||||
// Bill Request
|
||||
$('#request_bills').click(function () {
|
||||
var order_id = $('#save_order_id').val();
|
||||
var ajax_url = "/origami/" + order_id + "/request_bills";
|
||||
var ajax_url = "../../../origami/" +order_id+ "/request_bills";
|
||||
console.log(ajax_url)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
// data: 'order_id='+ order_id,
|
||||
success: function (result) {
|
||||
console.log(result)
|
||||
if (!result.status) {
|
||||
swal("Information!", result.error_message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user