mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
11768: fix the amount with voucher
This commit is contained in:
@@ -228,8 +228,7 @@ module Reporting
|
||||
.where(order:)
|
||||
.where(originator_id: enterprise_fee_id(query_result_row))
|
||||
.pick("sum(amount)") || 0
|
||||
total_excl_tax_amount = amount - tax(query_result_row, all: true, included: true)
|
||||
apply_voucher_on_amount(order, total_excl_tax_amount)
|
||||
apply_voucher_on_amount(order, amount) - tax(query_result_row, all: true, included: true)
|
||||
end
|
||||
|
||||
def tax(query_result_row, all: false, included: nil)
|
||||
|
||||
Reference in New Issue
Block a user