From b5717c13f955d01311fd9ab95b789cb96d22228a 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 +++++ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 9678ffc..934c6a5 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1781,6 +1781,8 @@ sub GetHistory { aqorders.ordernumber, aqorders.booksellerinvoicenumber as invoicenumber, aqbooksellers.id as id, + aqorders.branch, + aqorders.budget_id, aqorders.biblionumber FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno @@ -1863,6 +1865,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 b6875be..76141b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -66,6 +66,8 @@ Order number Summary Vendor + Fund + Branch Placed on Received on Quantity ordered @@ -93,6 +95,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 %] [% suggestions_loo.datereceived | $KohaDates %] [% suggestions_loo.quantity %] -- 1.7.10.4