update seed generator and remove hard-coded customer id
This commit is contained in:
@@ -69,11 +69,11 @@ $(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);
|
||||
var show_date = "";
|
||||
var show_date = "";
|
||||
|
||||
// Receipt Header
|
||||
receipt_no = result[i].receipt_no;
|
||||
@@ -81,14 +81,14 @@ $(document).ready(function(){
|
||||
if(result[i].receipt_date != null){
|
||||
receipt_date = new Date(result[i].receipt_date);
|
||||
show_date = receipt_date.getDate() + "-" + receipt_date.getMonth() + "-" + receipt_date.getFullYear() + ' ' + receipt_date.getHours()+ ':' + receipt_date.getMinutes()
|
||||
}
|
||||
}
|
||||
|
||||
//Receipt Charges
|
||||
sub_total += parseFloat(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;
|
||||
grand_total_amount = parse_data.grand_total_amount;
|
||||
|
||||
// Ordered Items
|
||||
var order_items_rows = "<tr>" +
|
||||
@@ -135,7 +135,7 @@ $(document).ready(function(){
|
||||
// Discount for Payment
|
||||
$('#discount').click(function() {
|
||||
var order_id=$(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
|
||||
|
||||
if(order_id!=""){
|
||||
window.location.href = '/origami/' + order_id + '/discount'
|
||||
}
|
||||
@@ -164,7 +164,7 @@ $(document).ready(function(){
|
||||
}
|
||||
|
||||
// For Percentage Discount
|
||||
if(discount_type == 1){
|
||||
if(discount_type == 1){
|
||||
discount_amount=(sub_total*discount_value)/100;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ $(document).ready(function(){
|
||||
|
||||
$('#customer').click(function() {
|
||||
var sale = $(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
if (sale.substring(0, 3)=="SAL") {
|
||||
if (sale.includes("SAL")) {
|
||||
var sale_id = sale
|
||||
}else{
|
||||
var sale_id = $(".selected-item").find(".order-cid").text();
|
||||
@@ -205,7 +205,7 @@ $(document).ready(function(){
|
||||
|
||||
$('#re-print').click(function() {
|
||||
var sale_id = $(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
|
||||
|
||||
window.location.href = '/origami/'+ sale_id + "/reprint"
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user