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

(-)a/C4/Acquisition.pm (-4 / +9 lines)
Lines 2252-2257 sub GetHistory { Link Here
2252
    my $get_canceled_order = $params{get_canceled_order} || 0;
2252
    my $get_canceled_order = $params{get_canceled_order} || 0;
2253
    my $ordernumber = $params{ordernumber};
2253
    my $ordernumber = $params{ordernumber};
2254
    my $search_children_too = $params{search_children_too} || 0;
2254
    my $search_children_too = $params{search_children_too} || 0;
2255
    my $created_by = $params{created_by} || [];
2255
2256
2256
    my @order_loop;
2257
    my @order_loop;
2257
    my $total_qty         = 0;
2258
    my $total_qty         = 0;
Lines 2268-2273 sub GetHistory { Link Here
2268
            aqorders.basketno,
2269
            aqorders.basketno,
2269
            aqbasket.basketname,
2270
            aqbasket.basketname,
2270
            aqbasket.basketgroupid,
2271
            aqbasket.basketgroupid,
2272
            aqbasket.authorisedby,
2273
            concat( borrowers.firstname,' ',borrowers.surname) AS authorisedbyname,
2271
            aqbasketgroups.name as groupname,
2274
            aqbasketgroups.name as groupname,
2272
            aqbooksellers.name,
2275
            aqbooksellers.name,
2273
            aqbasket.creationdate,
2276
            aqbasket.creationdate,
Lines 2296-2307 sub GetHistory { Link Here
2296
        LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid
2299
        LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid
2297
        LEFT JOIN deletedbiblio ON deletedbiblio.biblionumber=aqorders.biblionumber
2300
        LEFT JOIN deletedbiblio ON deletedbiblio.biblionumber=aqorders.biblionumber
2298
        LEFT JOIN deletedbiblioitems ON deletedbiblioitems.biblionumber=aqorders.biblionumber
2301
        LEFT JOIN deletedbiblioitems ON deletedbiblioitems.biblionumber=aqorders.biblionumber
2302
        LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
2299
        ";
2303
        ";
2300
2304
2301
    if ( C4::Context->preference("IndependentBranches") ) {
2302
        $query .= " LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber";
2303
    }
2304
2305
    $query .= " WHERE 1 ";
2305
    $query .= " WHERE 1 ";
2306
2306
2307
    unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) {
2307
    unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) {
Lines 2389-2394 sub GetHistory { Link Here
2389
        $query .= ") ";
2389
        $query .= ") ";
2390
    }
2390
    }
2391
2391
2392
    if ( @$created_by ) {
2393
        $query .= ' AND aqbasket.authorisedby IN ( ' . join( ',', ('?') x @$created_by ) . ')';
2394
        push @query_params, @$created_by;
2395
    }
2396
2392
2397
2393
    if ( C4::Context->preference("IndependentBranches") ) {
2398
    if ( C4::Context->preference("IndependentBranches") ) {
2394
        unless ( C4::Context->IsSuperLibrarian() ) {
2399
        unless ( C4::Context->IsSuperLibrarian() ) {
(-)a/acqui/histsearch.pl (+2 lines)
Lines 76-81 my $budget = $input->param( 'budget' ); Link Here
76
my $orderstatus             = $input->param( 'orderstatus' );
76
my $orderstatus             = $input->param( 'orderstatus' );
77
my $ordernumber             = $input->param( 'ordernumber' );
77
my $ordernumber             = $input->param( 'ordernumber' );
78
my $search_children_too     = $input->param( 'search_children_too' );
78
my $search_children_too     = $input->param( 'search_children_too' );
79
my @created_by              = $input->param('created_by');
79
80
80
if ( not $input->param('from') ) {
81
if ( not $input->param('from') ) {
81
    # FIXME Dirty but we can't sent a Date::Calc to C4::Dates ?
82
    # FIXME Dirty but we can't sent a Date::Calc to C4::Dates ?
Lines 121-126 if ($do_search) { Link Here
121
        orderstatus => $orderstatus,
122
        orderstatus => $orderstatus,
122
        ordernumber => $ordernumber,
123
        ordernumber => $ordernumber,
123
        search_children_too => $search_children_too,
124
        search_children_too => $search_children_too,
125
        created_by => \@created_by,
124
    );
126
    );
125
}
127
}
126
128
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-2 / +20 lines)
Lines 5-10 Link Here
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'calendar.inc' %]
6
[% INCLUDE 'calendar.inc' %]
7
[% INCLUDE 'datatables.inc' %]
7
[% INCLUDE 'datatables.inc' %]
8
9
<script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.pl"></script>
8
<script type="text/javascript">
10
<script type="text/javascript">
9
//<![CDATA[
11
//<![CDATA[
10
 $(document).ready(function() {
12
 $(document).ready(function() {
Lines 15-21 Link Here
15
        ],
17
        ],
16
        "sPaginationType": "four_button"
18
        "sPaginationType": "four_button"
17
    } ) );
19
    } ) );
18
 });
20
21
22
    patron_autocomplete({
23
        patron_container: $("#basket_creators"),
24
        input_autocomplete: $("#find_patron"),
25
        patron_input_name: 'created_by',
26
        field_to_retrieve: 'borrowernumber'
27
    });
28
});
29
19
 //]]>
30
 //]]>
20
</script>
31
</script>
21
</head>
32
</head>
Lines 43-48 Link Here
43
                [% END %]
54
                [% END %]
44
		<li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
55
		<li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
45
		<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
56
		<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
57
        <li><label for="basket_creators">Basket created by: </label>
58
            <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
59
            <div>
60
                <div id="basket_creators" style="float:left;"></div>
61
            </div>
62
        </li>
46
        <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
63
        <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
47
        <li>
64
        <li>
48
            <label for="basketgroupname">Basket group:</label>
65
            <label for="basketgroupname">Basket group:</label>
Lines 135-140 Link Here
135
                <th>Order line (parent)</th>
152
                <th>Order line (parent)</th>
136
                <th>Status</th>
153
                <th>Status</th>
137
				<th>Basket</th>
154
				<th>Basket</th>
155
                <th>Basket creator</th>
138
				<th>Basket group</th>
156
				<th>Basket group</th>
139
                <th>Invoice number</th>
157
                <th>Invoice number</th>
140
                <th class="anti-the">Summary</th>
158
                <th class="anti-the">Summary</th>
Lines 164-169 Link Here
164
                        [% END %]
182
                        [% END %]
165
                    </td>
183
                    </td>
166
                    <td>[% order.basketname %] (<a href="basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
184
                    <td>[% order.basketname %] (<a href="basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
185
                    <td>[% order.authorisedbyname %]</td>
167
                    <td>
186
                    <td>
168
                        [% IF ( order.basketgroupid ) %]
187
                        [% IF ( order.basketgroupid ) %]
169
                            [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
188
                            [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
170
- 

Return to bug 12944