From 9bd7908cda468977bcf80b2442b0505a7b72f91a Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Sun, 10 Feb 2008 01:41:54 -0600 Subject: [PATCH] INNER JOIN was too much restrictive for migrated libraries. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- admin/aqbudget.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/admin/aqbudget.pl b/admin/aqbudget.pl index cafbc0b193..5ad9e1e501 100755 --- a/admin/aqbudget.pl +++ b/admin/aqbudget.pl @@ -96,9 +96,10 @@ SELECT aqbudgetid, budgetamount, aqbudget.branchcode FROM aqbudget - INNER JOIN aqbookfund ON (aqbudget.bookfundid = aqbookfund.bookfundid AND - aqbudget.branchcode = aqbookfund.branchcode) - WHERE aqbudgetid = ? + INNER JOIN aqbookfund ON (aqbudget.bookfundid = aqbookfund.bookfundid) + WHERE aqbudgetid = ? AND + (aqbookfund.branchcode = aqbudget.branchcode OR + (aqbudget.branchcode IS NULL and aqbookfund.branchcode="")) '; $sth=$dbh->prepare($query); $sth->execute($aqbudgetid); @@ -167,8 +168,8 @@ SELECT branchcode, $template->param( dateformat => C4::Dates->new()->visual(), aqbudgetid => $dataaqbudget->{'aqbudgetid'}, - startdate => format_date($dataaqbudget->{'startdate'}), - enddate => format_date($dataaqbudget->{'enddate'}), + startdate => $dataaqbudget->{'startdate'}, + enddate => $dataaqbudget->{'enddate'}, budgetamount => $dataaqbudget->{'budgetamount'}, branches => \@branches, ); -- 2.39.5