change some func: for order rervation

This commit is contained in:
phyusin
2018-08-21 10:37:51 +06:30
parent 49ace265dc
commit d49bc3be2e
6 changed files with 6 additions and 6 deletions

View File

@@ -105,7 +105,7 @@
discount_amount = @order_reservation.discount_amount
delivery_fee = @order_reservation.delivery_fee ? @order_reservation.delivery_fee : 0.0
convenience_charge = @order_reservation.convenience_charge
if !JSON.parse(@order_reservation.taxes).empty?
if !JSON.parse(@order_reservation.taxes).nil? && !JSON.parse(@order_reservation.taxes).empty?
JSON.parse(@order_reservation.taxes).each do |tax_data|
if tax_data[0] == "delivery_tax"
delivery_tax = tax_data[1]