Per review, delete only incomplete payments

Use destroy_all so we don't have to manually delete the payment fees
adjustment
This commit is contained in:
Gaetan Craig-Riou
2023-08-04 17:03:31 +10:00
parent 85adb9f345
commit 6ed35f4cc1

View File

@@ -82,7 +82,6 @@ class VoucherAdjustmentsController < BaseController
# Clear payments and payment fees, to not affect voucher adjustment calculation
def clear_payments
@order.all_adjustments.payment_fee.destroy_all
@order.payments.clear
@order.payments.incomplete.destroy_all
end
end