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

(-)a/C4/Acquisition.pm (+2 lines)
Lines 2197-2202 sub GetHistory { Link Here
2197
            aqbasket.basketname,
2197
            aqbasket.basketname,
2198
            aqbasket.basketgroupid,
2198
            aqbasket.basketgroupid,
2199
            aqbasketgroups.name as groupname,
2199
            aqbasketgroups.name as groupname,
2200
            aqbasketgroups.closeddate as groupcloseddate,
2201
            IF(aqbasketgroups.freedeliveryplace != '', aqbasketgroups.freedeliveryplace, aqbasketgroups.deliveryplace) as groupdeliveryplace,
2200
            aqbooksellers.name,
2202
            aqbooksellers.name,
2201
            aqbasket.creationdate,
2203
            aqbasket.creationdate,
2202
            aqorders.datereceived,
2204
            aqorders.datereceived,
(-)a/acqui/histsearch.pl (+21 lines)
Lines 59-64 use C4::Dates; Link Here
59
use C4::Debug;
59
use C4::Debug;
60
use C4::Branch;
60
use C4::Branch;
61
use C4::Koha;
61
use C4::Koha;
62
use Koha::AdditionalField;
62
63
63
my $input = new CGI;
64
my $input = new CGI;
64
my $title                   = $input->param( 'title');
65
my $title                   = $input->param( 'title');
Lines 118-123 if ($do_search) { Link Here
118
        budget => $budget,
119
        budget => $budget,
119
        orderstatus => $orderstatus,
120
        orderstatus => $orderstatus,
120
    );
121
    );
122
    my $additional_fields = Koha::AdditionalField->all({
123
        tablename => 'aqorders',
124
    });
125
    foreach my $af (@$additional_fields) {
126
        if (!$af->{authorised_value_category} && $af->{marcfield}) {
127
            # Try to retrieve authorised values category from MARC framework
128
            my ($field, $subfield) = split /\$/, $af->{marcfield};
129
            my $category = C4::Koha::GetAuthValCodeFromField($field, $subfield);
130
            if ($category) {
131
                $af->{authorised_value_category} = $category;
132
            }
133
        }
134
    }
135
    my $af_values = Koha::AdditionalField->fetch_all_values({
136
        tablename => 'aqorders',
137
    });
138
    $template->param(
139
        'additional_fields' => $additional_fields,
140
        'additional_fields_values' => $af_values,
141
    );
121
}
142
}
122
143
123
my $from_date = $from_placed_on ? $from_placed_on->output('syspref') : undef;
144
my $from_date = $from_placed_on ? $from_placed_on->output('syspref') : undef;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-3 / +21 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE AuthorisedValues %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
Lines 134-139 Link Here
134
                <th>Pending order</th>
135
                <th>Pending order</th>
135
				<th>Unit cost</th>
136
				<th>Unit cost</th>
136
                <th>Fund</th>
137
                <th>Fund</th>
138
                [% FOREACH field IN additional_fields %]
139
                  <th>[% field.name %]</th>
140
                [% END %]
137
			</tr>
141
			</tr>
138
            </thead>
142
            </thead>
139
            <tbody>
143
            <tbody>
Lines 156-163 Link Here
156
                    <td>
160
                    <td>
157
                        [% IF ( order.basketgroupid ) %]
161
                        [% IF ( order.basketgroupid ) %]
158
                            [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
162
                            [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
159
                        [% ELSE %]
163
                            [% IF order.groupcloseddate %]
160
                            &nbsp;
164
                              <br />Closed on [% order.groupcloseddate |$KohaDates %].
165
                            [% END %]
166
                            [% IF order.groupdeliveryplace %]
167
                              <br />Delivery place: [% order.groupdeliveryplace %]
168
                            [% END %]
161
                        [% END %]
169
                        [% END %]
162
                    </td>
170
                    </td>
163
                    <td>[% IF ( order.invoicenumber ) %]
171
                    <td>[% IF ( order.invoicenumber ) %]
Lines 181-186 Link Here
181
                    <td>[% order.quantity %]</td>
189
                    <td>[% order.quantity %]</td>
182
                    <td>[% order.ecost %]</td>
190
                    <td>[% order.ecost %]</td>
183
                    <td>[% order.budget_name %]</td>
191
                    <td>[% order.budget_name %]</td>
192
                    [% FOREACH field IN additional_fields %]
193
                      [% value = '' %]
194
                      [% IF additional_fields_values.exists(order.ordernumber) %]
195
                        [% values = additional_fields_values.item(order.ordernumber) %]
196
                        [% value = values.item(field.name) %]
197
                        [% IF field.authorised_value_category %]
198
                          [% value = AuthorisedValues.GetByCode(field.authorised_value_category, value) %]
199
                        [% END %]
200
                      [% END %]
201
                      <td>[% value %]</td>
202
                    [% END %]
184
                </tr>
203
                </tr>
185
            [% END %]
204
            [% END %]
186
            </tbody>
205
            </tbody>
187
- 

Return to bug 11870