diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb
index 304b9396..1123351f 100755
--- a/app/controllers/origami/payments_controller.rb
+++ b/app/controllers/origami/payments_controller.rb
@@ -20,7 +20,8 @@ class Origami::PaymentsController < BaseOrigamiController
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
-
+puts ENV["SERVER_MODE"]
+puts "DDDDDDDDDDDDDDDDD"
# Print for First Bill to Customer
unique_code = "ReceiptBillPdf"
#shop detail
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb
index a5e43a58..12491edf 100755
--- a/app/views/origami/home/show.html.erb
+++ b/app/views/origami/home/show.html.erb
@@ -396,7 +396,7 @@
-
+
@@ -571,18 +571,18 @@
});
});
// Print for first bill
- // $("#first_bill").on('click', function () {
- // var sale_id = $('#sale_id').val();
- // var ajax_url = "/origami/sale/" + sale_id + "/first_bill";
+ $("#first_bill").on('click', function () {
+ var sale_id = $('#sale_id').val();
+ var ajax_url = "/origami/sale/" + sale_id + "/first_bill";
- // $.ajax({
- // type: "GET",
- // url: ajax_url,
- // success: function (result) {
- // location.reload();
- // }
- // });
- // });
+ $.ajax({
+ type: "GET",
+ url: ajax_url,
+ success: function (result) {
+ location.reload();
+ }
+ });
+ });
// $('#pay').on('click', function () {
// var sale_id = $('#sale_id').val();
diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb
index 5e99509f..314c9b68 100755
--- a/app/views/origami/payments/show.html.erb
+++ b/app/views/origami/payments/show.html.erb
@@ -311,8 +311,7 @@
}
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment")
- // console.log(jQuery.inArray("Credit", payment_type))
- // console.log(payment_type)
+
if(parseInt(jQuery.inArray("Credit", payment_type)) == -1){
$("#credit_payment").hide();
} else{