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

(-)a/C4/Acquisition.pm (-4 / +9 lines)
Lines 2312-2317 sub GetHistory { Link Here
2312
    my $get_canceled_order = $params{get_canceled_order} || 0;
2312
    my $get_canceled_order = $params{get_canceled_order} || 0;
2313
    my $ordernumber = $params{ordernumber};
2313
    my $ordernumber = $params{ordernumber};
2314
    my $search_children_too = $params{search_children_too} || 0;
2314
    my $search_children_too = $params{search_children_too} || 0;
2315
    my $created_by = $params{created_by} || [];
2315
2316
2316
    my @order_loop;
2317
    my @order_loop;
2317
    my $total_qty         = 0;
2318
    my $total_qty         = 0;
Lines 2328-2333 sub GetHistory { Link Here
2328
            aqorders.basketno,
2329
            aqorders.basketno,
2329
            aqbasket.basketname,
2330
            aqbasket.basketname,
2330
            aqbasket.basketgroupid,
2331
            aqbasket.basketgroupid,
2332
            aqbasket.authorisedby,
2333
            concat( borrowers.firstname,' ',borrowers.surname) AS authorisedbyname,
2331
            aqbasketgroups.name as groupname,
2334
            aqbasketgroups.name as groupname,
2332
            aqbooksellers.name,
2335
            aqbooksellers.name,
2333
            aqbasket.creationdate,
2336
            aqbasket.creationdate,
Lines 2356-2367 sub GetHistory { Link Here
2356
        LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid
2359
        LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid
2357
        LEFT JOIN deletedbiblio ON deletedbiblio.biblionumber=aqorders.biblionumber
2360
        LEFT JOIN deletedbiblio ON deletedbiblio.biblionumber=aqorders.biblionumber
2358
        LEFT JOIN deletedbiblioitems ON deletedbiblioitems.biblionumber=aqorders.biblionumber
2361
        LEFT JOIN deletedbiblioitems ON deletedbiblioitems.biblionumber=aqorders.biblionumber
2362
        LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
2359
        ";
2363
        ";
2360
2364
2361
    if ( C4::Context->preference("IndependentBranches") ) {
2362
        $query .= " LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber";
2363
    }
2364
2365
    $query .= " WHERE 1 ";
2365
    $query .= " WHERE 1 ";
2366
2366
2367
    unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) {
2367
    unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) {
Lines 2449-2454 sub GetHistory { Link Here
2449
        $query .= ") ";
2449
        $query .= ") ";
2450
    }
2450
    }
2451
2451
2452
    if ( @$created_by ) {
2453
        $query .= ' AND aqbasket.authorisedby IN ( ' . join( ',', ('?') x @$created_by ) . ')';
2454
        push @query_params, @$created_by;
2455
    }
2456
2452
2457
2453
    if ( C4::Context->preference("IndependentBranches") ) {
2458
    if ( C4::Context->preference("IndependentBranches") ) {
2454
        unless ( C4::Context->IsSuperLibrarian() ) {
2459
        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