From a5c409516d9ac96506a49282c254000e74aced5c Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 22 Aug 2012 16:09:20 +0200 Subject: [PATCH] Bug 8667: Add budget and branch columns in histsearch.pl results --- C4/Acquisition.pm | 5 +++++ .../prog/en/modules/acqui/histsearch.tt | 4 ++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 17330e5..3201419 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1942,6 +1942,8 @@ sub GetHistory { aqorders.ordernumber, aqinvoices.invoicenumber, aqbooksellers.id as id, + aqorders.branch, + aqorders.budget_id, aqorders.biblionumber FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno @@ -2030,6 +2032,9 @@ sub GetHistory { $total_qty += $line->{'quantity'}; $total_qtyreceived += $line->{'quantityreceived'}; $total_price += $line->{'quantity'} * $line->{'ecost'}; + my $budget = C4::Budgets::GetBudget($line->{budget_id}); + $line->{budget_name} = $budget->{budget_name} if $budget; + $line->{branchname} = C4::Branch::GetBranchName($line->{branch}); } return \@order_loop, $total_qty, $total_price, $total_qtyreceived; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt index 5659c1d..6d0f7f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -70,6 +70,8 @@ Order number Summary Vendor + Fund + Branch Placed on Received on Quantity ordered @@ -97,6 +99,8 @@ [% suggestions_loo.title |html %]
[% suggestions_loo.author %]
[% suggestions_loo.isbn %] [% suggestions_loo.name %] + [% suggestions_loo.budget_name %] + [% suggestions_loo.branchname %] [% suggestions_loo.creationdate | $KohaDates %] [% IF suggestions_loo.datereceived %] -- 1.7.2.5