View | Details | Raw Unified | Return to bug 11870
Collapse All | Expand All

(-)a/C4/Acquisition.pm (+2 lines)
Lines 2352-2357 sub GetHistory { Link Here
2352
            aqbasket.authorisedby,
2352
            aqbasket.authorisedby,
2353
            concat( borrowers.firstname,' ',borrowers.surname) AS authorisedbyname,
2353
            concat( borrowers.firstname,' ',borrowers.surname) AS authorisedbyname,
2354
            aqbasketgroups.name as groupname,
2354
            aqbasketgroups.name as groupname,
2355
            aqbasketgroups.closeddate as groupcloseddate,
2356
            IF(aqbasketgroups.freedeliveryplace != '', aqbasketgroups.freedeliveryplace, aqbasketgroups.deliveryplace) as groupdeliveryplace,
2355
            aqbooksellers.name,
2357
            aqbooksellers.name,
2356
            aqbasket.creationdate,
2358
            aqbasket.creationdate,
2357
            aqorders.datereceived,
2359
            aqorders.datereceived,
(-)a/acqui/histsearch.pl (+14 lines)
Lines 128-133 if ($do_search) { Link Here
128
        created_by => \@created_by,
128
        created_by => \@created_by,
129
        additional_fields => \@additional_field_filters,
129
        additional_fields => \@additional_field_filters,
130
    );
130
    );
131
132
    foreach my $order (@$order_loop) {
133
        my %additional_field_values;
134
        my $o = Koha::Acquisition::Orders->find($order->{ordernumber});
135
        foreach my $afv ($o->additional_field_values) {
136
            $additional_field_values{$afv->field->id} = $afv->value;
137
        }
138
        $order->{additional_field_values} = \%additional_field_values;
139
    }
140
141
    my @aqorders_additional_fields = Koha::AdditionalFields->search({ tablename => 'aqorders' });
142
    $template->param(
143
        aqorders_additional_fields => \@aqorders_additional_fields,
144
    );
131
}
145
}
132
146
133
my $budgetperiods = C4::Budgets::GetBudgetPeriods;
147
my $budgetperiods = C4::Budgets::GetBudgetPeriods;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-3 / +18 lines)
Lines 1-6 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE ColumnsSettings %]
3
[% USE ColumnsSettings %]
4
[% USE AuthorisedValues %]
4
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
7
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
Lines 144-149 Link Here
144
                <th>Pending order</th>
145
                <th>Pending order</th>
145
				<th>Unit cost</th>
146
				<th>Unit cost</th>
146
                <th>Fund</th>
147
                <th>Fund</th>
148
                [% FOREACH field IN aqorders_additional_fields %]
149
                  <th>[% field.name %]</th>
150
                [% END %]
147
			</tr>
151
			</tr>
148
            </thead>
152
            </thead>
149
            <tbody>
153
            <tbody>
Lines 167-174 Link Here
167
                    <td>
171
                    <td>
168
                        [% IF ( order.basketgroupid ) %]
172
                        [% IF ( order.basketgroupid ) %]
169
                            [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
173
                            [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
170
                        [% ELSE %]
174
                            [% IF order.groupcloseddate %]
171
                            &nbsp;
175
                              <br />Closed on [% order.groupcloseddate |$KohaDates %].
176
                            [% END %]
177
                            [% IF order.groupdeliveryplace %]
178
                              <br />Delivery place: [% order.groupdeliveryplace %]
179
                            [% END %]
172
                        [% END %]
180
                        [% END %]
173
                    </td>
181
                    </td>
174
                    <td>[% IF ( order.invoicenumber ) %]
182
                    <td>[% IF ( order.invoicenumber ) %]
Lines 194-199 Link Here
194
                    <td>[% order.quantity %]</td>
202
                    <td>[% order.quantity %]</td>
195
                    <td>[% order.ecost %]</td>
203
                    <td>[% order.ecost %]</td>
196
                    <td>[% order.budget_name %]</td>
204
                    <td>[% order.budget_name %]</td>
205
                    [% FOREACH field IN aqorders_additional_fields %]
206
                        [% value = order.additional_field_values.item(field.id) %]
207
                        [% authorised_value_category = field.effective_authorised_value_category %]
208
                        [% IF authorised_value_category %]
209
                            [% value = AuthorisedValues.GetByCode(authorised_value_category, value) %]
210
                        [% END %]
211
                        <td>[% value %]</td>
212
                    [% END %]
197
                </tr>
213
                </tr>
198
            [% END %]
214
            [% END %]
199
            </tbody>
215
            </tbody>
200
- 

Return to bug 11870