From 852b0f1dcd54eb9bd3584455068a72e752b1d76c Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Fri, 10 Jul 2026 12:09:36 +0200 Subject: [PATCH] Bug 42225: (QA follow-up) Use configured unitprice field in outer SELECT The outer SELECT hardcoded unitprice_tax_included while the inner subquery selects the field returned by FieldsForCalculatingFundValues. With CalculateFundValuesIncludingTax disabled the derived table only exposes unitprice_tax_excluded, so spent.pl dies with: Unknown column 'unitprice_tax_included' in 'field list' To test: 1. Set CalculateFundValuesIncludingTax to 'Exclude' 2. View spent.pl for a fund with received orders 3. Observe error 500 4. Apply patch, restart_all 5. Reload, page renders correctly 6. Set CalculateFundValuesIncludingTax back to 'Include' 7. Reload, page still renders correctly Signed-off-by: Paul Derscheid Signed-off-by: Pedro Amorim --- acqui/spent.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/spent.pl b/acqui/spent.pl index a070471679..1ae204581a 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -68,7 +68,7 @@ SELECT invoiceid, invoicenumber, quantityreceived, - unitprice_tax_included, + $unitprice_field, datereceived, aqbooksellers.name as vendorname FROM