comment for cable and add print seed
This commit is contained in:
@@ -21,6 +21,10 @@ $(document).ready(function(){
|
||||
var zone_name=$(this).find(".orders-table").text();
|
||||
var receipt_no=$(this).find(".orders-receipt-no").text();
|
||||
var unique_id=$(this).find(".orders-id").text();
|
||||
var order_status=$(this).find(".orders-order-status").text().trim();
|
||||
|
||||
// Enable/Disable Button
|
||||
control_button(order_status);
|
||||
|
||||
var cashier="";
|
||||
var receipt_date="";
|
||||
@@ -85,15 +89,26 @@ $(document).ready(function(){
|
||||
|
||||
// Bill Request
|
||||
$('#request_bills').click(function() {
|
||||
var order_id=$(".selected-item").find(".orders-id").text();
|
||||
window.location.href = '/origami/request_bills/'+ order_id
|
||||
var order_id=$(".selected-item").find(".orders-id").text();
|
||||
if(order_id!=""){
|
||||
window.location.href = '/origami/request_bills/'+ order_id
|
||||
}
|
||||
else {
|
||||
alert("Please select an order!");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Discount for Payment
|
||||
$('#discount').click(function() {
|
||||
var order_id=$(".selected-item").find(".orders-id").text();
|
||||
window.location.href = '/origami/discount/'+ order_id
|
||||
var order_id=$(".selected-item").find(".orders-id").text();
|
||||
if(order_id!=""){
|
||||
window.location.href = '/origami/discount/'+ order_id
|
||||
}
|
||||
else {
|
||||
alert("Please select an order!");
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -122,8 +137,14 @@ $(document).ready(function(){
|
||||
|
||||
// Payment for Bill
|
||||
$('#pay').click(function() {
|
||||
var sale_id=$(".selected-item").find(".orders-id").text();
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment"
|
||||
var sale_id=$(".selected-item").find(".orders-id").text();
|
||||
if(order_id!=""){
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment"
|
||||
}
|
||||
else {
|
||||
alert("Please select an order!");
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -174,6 +195,20 @@ $(document).on('click', '.cashier_number', function(event){
|
||||
}
|
||||
});
|
||||
|
||||
/* Button Control by Status */
|
||||
function control_button(order_status){
|
||||
if(order_status=="billed"){
|
||||
$("#request_bills").prop('disabled', true);
|
||||
$("#discount").prop('disabled', false);
|
||||
$("#pay").prop('disabled', false);
|
||||
}
|
||||
else if(order_status=="new") {
|
||||
$("#request_bills").prop('disabled', false);
|
||||
$("#discount").prop('disabled', true);
|
||||
$("#pay").prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
/* For Receipt - Update Balance */
|
||||
function update_balance(){
|
||||
var discount_type = $('#discount-type').val();
|
||||
|
||||
Reference in New Issue
Block a user