check first bill or not
This commit is contained in:
@@ -447,6 +447,19 @@ $(document).ready(function(){
|
||||
// window.location.href = '/origami/order/' + order_id;
|
||||
// })
|
||||
|
||||
/* start check first bill or not*/
|
||||
var receipt_no = "";
|
||||
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
|
||||
receipt_no = ($("#receipt_no").html()).trim();
|
||||
}
|
||||
// console.log(checkReceiptNoInFirstBillData(receipt_no));
|
||||
if(checkReceiptNoInFirstBillData(receipt_no)){
|
||||
$("#pay").show();
|
||||
}else{
|
||||
$("#pay").hide();
|
||||
}
|
||||
/* end check first bill or not*/
|
||||
|
||||
$('.invoicedetails').on('click',function(){
|
||||
var dining_id = "<%= @room.id %>";
|
||||
var sale_id = this.id;
|
||||
@@ -569,6 +582,10 @@ $("#first_bill").on('click', function(){
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
success:function(result){
|
||||
receipt_no = ($("#receipt_no").html()).trim();
|
||||
if((receipt_no!=undefined) && (receipt_no!=""))
|
||||
createReceiptNoInFirstBillData(receipt_no);
|
||||
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user