mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user