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

(-)a/C4/Acquisition.pm (-4 / +9 lines)
Lines 2179-2184 sub GetHistory { Link Here
2179
    my $get_canceled_order = $params{get_canceled_order} || 0;
2179
    my $get_canceled_order = $params{get_canceled_order} || 0;
2180
    my $ordernumber = $params{ordernumber};
2180
    my $ordernumber = $params{ordernumber};
2181
    my $search_children_too = $params{search_children_too} || 0;
2181
    my $search_children_too = $params{search_children_too} || 0;
2182
    my $created_by = $params{created_by} || [];
2182
2183
2183
    my @order_loop;
2184
    my @order_loop;
2184
    my $total_qty         = 0;
2185
    my $total_qty         = 0;
Lines 2195-2200 sub GetHistory { Link Here
2195
            aqorders.basketno,
2196
            aqorders.basketno,
2196
            aqbasket.basketname,
2197
            aqbasket.basketname,
2197
            aqbasket.basketgroupid,
2198
            aqbasket.basketgroupid,
2199
            aqbasket.authorisedby,
2200
            concat( borrowers.firstname,' ',borrowers.surname) AS authorisedbyname,
2198
            aqbasketgroups.name as groupname,
2201
            aqbasketgroups.name as groupname,
2199
            aqbooksellers.name,
2202
            aqbooksellers.name,
2200
            aqbasket.creationdate,
2203
            aqbasket.creationdate,
Lines 2223-2234 sub GetHistory { Link Here
2223
        LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid
2226
        LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid
2224
        LEFT JOIN deletedbiblio ON deletedbiblio.biblionumber=aqorders.biblionumber
2227
        LEFT JOIN deletedbiblio ON deletedbiblio.biblionumber=aqorders.biblionumber
2225
        LEFT JOIN deletedbiblioitems ON deletedbiblioitems.biblionumber=aqorders.biblionumber
2228
        LEFT JOIN deletedbiblioitems ON deletedbiblioitems.biblionumber=aqorders.biblionumber
2229
        LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
2226
        ";
2230
        ";
2227
2231
2228
    if ( C4::Context->preference("IndependentBranches") ) {
2229
        $query .= " LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber";
2230
    }
2231
2232
    $query .= " WHERE 1 ";
2232
    $query .= " WHERE 1 ";
2233
2233
2234
    unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) {
2234
    unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) {
Lines 2316-2321 sub GetHistory { Link Here
2316
        $query .= ") ";
2316
        $query .= ") ";
2317
    }
2317
    }
2318
2318
2319
    if ( @$created_by ) {
2320
        $query .= ' AND aqbasket.authorisedby IN ( ' . join( ',', ('?') x @$created_by ) . ')';
2321
        push @query_params, @$created_by;
2322
    }
2323
2319
2324
2320
    if ( C4::Context->preference("IndependentBranches") ) {
2325
    if ( C4::Context->preference("IndependentBranches") ) {
2321
        unless ( C4::Context->IsSuperLibrarian() ) {
2326
        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