This commit is contained in:
Nweni
2017-06-12 17:30:49 +06:30
parent 10418c1204
commit d1ae734f50
7 changed files with 107 additions and 104 deletions

View File

@@ -28,7 +28,7 @@ $(document).ready(function(){
$("#order-Tax").text('');
$("#order-grand-total").text('');
var zone_name=$(this).find(".orders-table").text();
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();
@@ -38,11 +38,11 @@ $(document).ready(function(){
//for customer button
$("#customer").removeAttr('disabled');
var customer_id=$(this).find(".customer-id").text();
show_customer_details(customer_id);
var cashier="";
var receipt_date="";
@@ -60,7 +60,7 @@ $(document).ready(function(){
type: "POST",
url: "/origami/" + unique_id,
data: { 'booking_id' : unique_id },
success:function(result){
success:function(result){
for (i = 0; i < result.length; i++) {
var data = JSON.stringify(result[i]);
var parse_data = JSON.parse(data);
@@ -77,7 +77,7 @@ $(document).ready(function(){
//Receipt Charges
sub_total += (parse_data.qty*parse_data.price);
discount_amount = parse_data.discount_amount == null? '0.0' : parse_data.discount_amount;
tax_amount = parse_data.tax_amount;
grand_total_amount = parse_data.grand_total_amount;
@@ -187,12 +187,12 @@ $(document).ready(function(){
return false;
});
function show_customer_details(customer_id){
function show_customer_details(customer_id){
$('.customer_detail').removeClass('hide');
$('.customer_detail').removeClass('hide');
//Start Ajax
$.ajax({
type: "GET",
$.ajax({
type: "GET",
url: "origami/"+customer_id+"/get_customer/",
data: {},
dataType: "json",
@@ -213,7 +213,7 @@ $(document).ready(function(){
});
}
});
//End Ajax
//End Ajax
}
/* For Receipt - Calculate discount or tax */