diff --git a/app/controllers/foodcourt/qrpay_controller.rb b/app/controllers/foodcourt/qrpay_controller.rb index b3b87a25..a39f8481 100644 --- a/app/controllers/foodcourt/qrpay_controller.rb +++ b/app/controllers/foodcourt/qrpay_controller.rb @@ -57,19 +57,6 @@ class Foodcourt::QrpayController < BaseFoodcourtController amount = SalePayment.get_kbz_pay_amount(sale_id, current_user) @kbz_pay_amount += amount.to_f - #for changable on/off - @changable_tax = true - lookup_changable_tax = Lookup.collection_of('changable_tax') - if !lookup_changable_tax.empty? - lookup_changable_tax.each do |changable_tax| - if changable_tax[0].downcase == "change" - if changable_tax[1] == '0' - @changable_tax = false - end - end - end - end - # @shop = shop_detail #show shop info @customer_lists = Customer.where(name: ["WALK-IN", "TAKEAWAY"]) @@ -82,24 +69,6 @@ class Foodcourt::QrpayController < BaseFoodcourtController @individual_total.push({'total_customer' => saleObj.equal_persons.to_i, 'per_person_amount' => per_person_amount.to_f }) end - # rounding adjustment - # if @shop.is_rounding_adj - # a = saleObj.grand_total % 25 # Modulus - # b = saleObj.grand_total / 25 # Division - # #not calculate rounding if modulus is 0 and division is even - # #calculate rounding if modulus is zero or not zero and division are not even - # if (a != 0.0 && b%2 != 0.0) || (a==0.0 && b%2 !=0) - # new_total = Sale.get_rounding_adjustment(saleObj.grand_total) - # @rounding_adj = new_total-saleObj.grand_total - # else - # @rounding_adj = @sale_data.rounding_adjustment - # end - # else - # @rounding_adj = @sale_data.rounding_adjustment - # end - #end rounding adjustment - - # rounding adjustment if current_shop.is_rounding_adj a = saleObj.grand_total % 25 # Modulus b = saleObj.grand_total / 25 # Division diff --git a/app/views/foodcourt/qrpay/init.html.erb b/app/views/foodcourt/qrpay/init.html.erb index db31bfcf..01099222 100644 --- a/app/views/foodcourt/qrpay/init.html.erb +++ b/app/views/foodcourt/qrpay/init.html.erb @@ -1,7 +1,37 @@ + +
- <% if !@print_settings.nil? %> <% if @print_settings.precision.to_i > 0 precision = @print_settings.precision @@ -169,34 +199,18 @@
-
-
-
-
Amount Due: <% if !@sale_payment.nil? %>( Credit )<% end %>
-
- - - - <% if @sale_payment.nil? %> - <%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %> - <% else %> - <%= number_with_precision(@sale_payment[0].payment_amount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i)%> - <% end %> - - -
-
-
-
- " id="server_mode"> - +
+

Waiting for Customer Payment

+

Please ask customer to scan the QR code

+
+
+
+
+
+
+ " id="server_mode"> +
@@ -246,1063 +260,31 @@ - +