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

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