From 5535a5db81f584d5a371fa7cbef2adf3d33566e8 Mon Sep 17 00:00:00 2001 From: phyusin Date: Thu, 4 Oct 2018 16:47:44 +0630 Subject: [PATCH] UI changed --- app/controllers/origami/dinga_controller.rb | 14 +- app/controllers/origami/paymal_controller.rb | 14 +- .../origami/redeem_payments_controller.rb | 14 +- app/controllers/origami/voucher_controller.rb | 2 +- app/views/origami/voucher/index.html.erb | 139 ++++++++++-------- 5 files changed, 100 insertions(+), 83 deletions(-) diff --git a/app/controllers/origami/dinga_controller.rb b/app/controllers/origami/dinga_controller.rb index 55705fce..01e35004 100644 --- a/app/controllers/origami/dinga_controller.rb +++ b/app/controllers/origami/dinga_controller.rb @@ -7,13 +7,13 @@ class Origami::DingaController < BaseOrigamiController @sale_data = Sale.find_by_sale_id(@sale_id) @receipt_no = @sale_data.receipt_no @shop = Shop.first - # if @shop.is_rounding_adj - # new_total = Sale.get_rounding_adjustment(@sale_data.grand_total) - # else - # new_total = @sale_data.grand_total - # end - # @rounding_adj = new_total-@sale_data.grand_total - @rounding_adj = @sale_data.rounding_adjustment + if @shop.is_rounding_adj + new_total = Sale.get_rounding_adjustment(@sale_data.grand_total) + else + new_total = @sale_data.grand_total + end + @rounding_adj = new_total-@sale_data.grand_total + # @rounding_adj = @sale_data.rounding_adjustment @payparcount = 0 others = 0 diff --git a/app/controllers/origami/paymal_controller.rb b/app/controllers/origami/paymal_controller.rb index 911d5a24..19645e18 100644 --- a/app/controllers/origami/paymal_controller.rb +++ b/app/controllers/origami/paymal_controller.rb @@ -7,13 +7,13 @@ class Origami::PaymalController < BaseOrigamiController sale_data = Sale.find_by_sale_id(@sale_id) @receipt_no = sale_data.receipt_no @shop = Shop.first - # if @shop.is_rounding_adj - # new_total = Sale.get_rounding_adjustment(sale_data.grand_total) - # else - # new_total = sale_data.grand_total - # end - # @rounding_adj = new_total-sale_data.grand_total - @rounding_adj = sale_data.rounding_adjustment + if @shop.is_rounding_adj + new_total = Sale.get_rounding_adjustment(sale_data.grand_total) + else + new_total = sale_data.grand_total + end + @rounding_adj = new_total-sale_data.grand_total + # @rounding_adj = sale_data.rounding_adjustment @payparcount = 0 others = 0 diff --git a/app/controllers/origami/redeem_payments_controller.rb b/app/controllers/origami/redeem_payments_controller.rb index 708f9f8f..c0edf879 100755 --- a/app/controllers/origami/redeem_payments_controller.rb +++ b/app/controllers/origami/redeem_payments_controller.rb @@ -7,13 +7,13 @@ class Origami::RedeemPaymentsController < BaseOrigamiController sale_data = Sale.find_by_sale_id(@sale_id) @shop = Shop.first - # if @shop.is_rounding_adj - # new_total = Sale.get_rounding_adjustment(sale_data.grand_total) - # else - # new_total = sale_data.grand_total - # end - # @rounding_adj = new_total-sale_data.grand_total - @rounding_adj = sale_data.rounding_adjustment + if @shop.is_rounding_adj + new_total = Sale.get_rounding_adjustment(sale_data.grand_total) + else + new_total = sale_data.grand_total + end + @rounding_adj = new_total-sale_data.grand_total + # @rounding_adj = sale_data.rounding_adjustment @payparcount = 0 others = 0 diff --git a/app/controllers/origami/voucher_controller.rb b/app/controllers/origami/voucher_controller.rb index 515bf3a1..e512a48b 100755 --- a/app/controllers/origami/voucher_controller.rb +++ b/app/controllers/origami/voucher_controller.rb @@ -1,7 +1,7 @@ class Origami::VoucherController < BaseOrigamiController def index @sale_id = params[:sale_id] - + @cashier_type = params[:type] # limit voucher_amount sale_data = Sale.find_by_sale_id(@sale_id) total = sale_data.grand_total diff --git a/app/views/origami/voucher/index.html.erb b/app/views/origami/voucher/index.html.erb index c8d99c28..cf7a30d9 100755 --- a/app/views/origami/voucher/index.html.erb +++ b/app/views/origami/voucher/index.html.erb @@ -1,13 +1,21 @@ +
+ + +
-
- -
-
-
-

Voucher / Coupon

-
-
-
+
+
@@ -42,60 +50,60 @@
-
+
-
- -
-
-
-
1
-
2
-
3
-
-
-
4
-
5
-
6
-
-
-
7
-
8
-
9
-
-
-
0
-
.
-
00
-
-
-
Nett
-
Del
-
Clr
-
-
-
-
-
1000
-
3000
-
-
-
5000
-
10000
-
-
-
Pay
-
-
-
- -
- -
- +
+
+
+
+
+
1
+
2
+
3
+
+
+
4
+
5
+
6
+
+
+
7
+
8
+
9
+
+
+
0
+
.
+
00
+
+
+
Nett
+
Del
+
Clr
+
+
+
+
+
1000
+
3000
+
+
+
5000
+
10000
+
+
+
Pay
+
+
+
+
+
+ +
+ +
-