Bugzilla – Attachment 75356 Details for
Bug 11870
Add additional order fields and basket group fields to order search result list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11870: Add more informations to histsearch.pl results
Bug-11870-Add-more-informations-to-histsearchpl-re.patch (text/plain), 4.64 KB, created by
Julian Maurice
on 2018-05-16 09:04:10 UTC
(
hide
)
Description:
Bug 11870: Add more informations to histsearch.pl results
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-05-16 09:04:10 UTC
Size:
4.64 KB
patch
obsolete
>From 123ed2f874bf398a8b985c58adbc5507ea125224 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 25 Feb 2014 14:13:58 +0100 >Subject: [PATCH] Bug 11870: Add more informations to histsearch.pl results > >- Basket group closed date and delivery place (in basketgroup column) >- Additional order fields (one column for each additional field) > >Depends on bugs 11844 and 11708 >--- > C4/Acquisition.pm | 2 ++ > acqui/histsearch.pl | 14 ++++++++++++++ > .../prog/en/modules/acqui/histsearch.tt | 20 ++++++++++++++++++-- > 3 files changed, 34 insertions(+), 2 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index e0a49f942b..92f3079cdd 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2352,6 +2352,8 @@ sub GetHistory { > aqbasket.authorisedby, > concat( borrowers.firstname,' ',borrowers.surname) AS authorisedbyname, > aqbasketgroups.name as groupname, >+ aqbasketgroups.closeddate as groupcloseddate, >+ IF(aqbasketgroups.freedeliveryplace != '', aqbasketgroups.freedeliveryplace, aqbasketgroups.deliveryplace) as groupdeliveryplace, > aqbooksellers.name, > aqbasket.creationdate, > aqorders.datereceived, >diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl >index 9273fb0388..b876201065 100755 >--- a/acqui/histsearch.pl >+++ b/acqui/histsearch.pl >@@ -128,6 +128,20 @@ if ($do_search) { > created_by => \@created_by, > additional_fields => \@additional_field_filters, > ); >+ >+ foreach my $order (@$order_loop) { >+ my %additional_field_values; >+ my $o = Koha::Acquisition::Orders->find($order->{ordernumber}); >+ foreach my $afv ($o->additional_field_values) { >+ $additional_field_values{$afv->field->id} = $afv->value; >+ } >+ $order->{additional_field_values} = \%additional_field_values; >+ } >+ >+ my @aqorders_additional_fields = Koha::AdditionalFields->search({ tablename => 'aqorders' }); >+ $template->param( >+ aqorders_additional_fields => \@aqorders_additional_fields, >+ ); > } > > my $budgetperiods = C4::Budgets::GetBudgetPeriods; >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 6c59b44335..90865e7dcf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -1,6 +1,7 @@ > [% USE Asset %] > [% USE KohaDates %] > [% USE ColumnsSettings %] >+[% USE AuthorisedValues %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › [% IF ( order_loop ) %]Orders search › Search results[% ELSE %]Order search[% END %]</title> >@@ -144,6 +145,9 @@ > <th>Pending order</th> > <th>Unit cost</th> > <th>Fund</th> >+ [% FOREACH field IN aqorders_additional_fields %] >+ <th>[% field.name %]</th> >+ [% END %] > </tr> > </thead> > <tbody> >@@ -167,8 +171,12 @@ > <td> > [% IF ( order.basketgroupid ) %] > [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>) >- [% ELSE %] >- >+ [% IF order.groupcloseddate %] >+ <br />Closed on [% order.groupcloseddate |$KohaDates %]. >+ [% END %] >+ [% IF order.groupdeliveryplace %] >+ <br />Delivery place: [% order.groupdeliveryplace %] >+ [% END %] > [% END %] > </td> > <td>[% IF ( order.invoicenumber ) %] >@@ -194,6 +202,14 @@ > <td>[% order.quantity %]</td> > <td>[% order.ecost %]</td> > <td>[% order.budget_name %]</td> >+ [% FOREACH field IN aqorders_additional_fields %] >+ [% value = order.additional_field_values.item(field.id) %] >+ [% authorised_value_category = field.effective_authorised_value_category %] >+ [% IF authorised_value_category %] >+ [% value = AuthorisedValues.GetByCode(authorised_value_category, value) %] >+ [% END %] >+ <td>[% value %]</td> >+ [% END %] > </tr> > [% END %] > </tbody> >-- >2.14.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11870
:
25717
|
75355
| 75356