mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Use VoucherAdjustmentsService to retrieve tax part of the voucher
This commit is contained in:
@@ -159,10 +159,8 @@ module Reporting
|
||||
end
|
||||
|
||||
def voucher_tax_adjustment(order)
|
||||
included_tax_voucher_adjustment = order.voucher_adjustments.first&.included_tax || 0
|
||||
excluded_tax_voucher_adjustment = order.all_adjustments.voucher_tax.first&.amount || 0
|
||||
|
||||
included_tax_voucher_adjustment + excluded_tax_voucher_adjustment
|
||||
VoucherAdjustmentsService.new(order).voucher_included_tax +
|
||||
VoucherAdjustmentsService.new(order).voucher_excluded_tax
|
||||
end
|
||||
|
||||
def first_name(query_result_row)
|
||||
|
||||
Reference in New Issue
Block a user