Per review, rename amount to adjustment_amount

It was confusing as I was re assigning a variable given as a parameter
This commit is contained in:
Gaetan Craig-Riou
2023-06-30 11:44:13 +10:00
parent 41271192e1
commit 3d9542fec2

View File

@@ -51,10 +51,10 @@ class VoucherAdjustmentsService
tax_adjustment.save
# Update the adjustment amount
amount = voucher_rate * (order.pre_discount_total - order.additional_tax_total)
adjustment_amount = voucher_rate * (order.pre_discount_total - order.additional_tax_total)
adjustment.update_columns(
amount: amount,
amount: adjustment_amount,
updated_at: Time.zone.now
)
end