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

(-)a/acqui/acqui-home.pl (-11 / +18 lines)
Lines 36-41 use C4::Members; Link Here
36
use Koha::Acquisition::Currencies;
36
use Koha::Acquisition::Currencies;
37
use Koha::Patrons;
37
use Koha::Patrons;
38
use Koha::Suggestions;
38
use Koha::Suggestions;
39
use Koha::DateUtils qw( dt_from_string );
39
40
40
my $query = CGI->new;
41
my $query = CGI->new;
41
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
42
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
Lines 117-134 foreach my $budget ( @{$budget_arr} ) { Link Here
117
    push @budget_loop, $budget;
118
    push @budget_loop, $budget;
118
}
119
}
119
120
121
my $filters;
122
$filters->{from_placed_on} = my $from_placed_on = dt_from_string;
123
$filters->{to_placed_on}   = my $to_placed_on   = dt_from_string;
124
$filters->{from_placed_on}->set_time_zone('floating')->subtract( years => 1 );
125
120
$template->param(
126
$template->param(
121
    type          => 'intranet',
127
    type              => 'intranet',
122
    loop_budget   => \@budget_loop,
128
    loop_budget       => \@budget_loop,
123
    total         => $total,
129
    total             => $total,
124
    totspent      => $totspent,
130
    totspent          => $totspent,
125
    totordered    => $totordered,
131
    totordered        => $totordered,
126
    totcomtd      => $totcomtd,
132
    totcomtd          => $totcomtd,
127
    totavail      => $totavail,
133
    totavail          => $totavail,
128
    total_active  => $total_active,
134
    total_active      => $total_active,
129
    totspent_active     => $totspent_active,
135
    totspent_active   => $totspent_active,
130
    totordered_active   => $totordered_active,
136
    totordered_active => $totordered_active,
131
    totavail_active     => $totavail_active,
137
    totavail_active   => $totavail_active,
138
    filters           => $filters,
132
);
139
);
133
140
134
my $cur = Koha::Acquisition::Currencies->get_active;
141
my $cur = Koha::Acquisition::Currencies->get_active;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc (-1 / +19 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% PROCESS 'html_helpers.inc' %]
3
[% PROCESS 'html_helpers.inc' %]
4
[% IF context == "main" %]
5
    <div class="row">
6
    <div class="col-sm-6">
7
[% END %]
4
<ol>
8
<ol>
5
    <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% filters.title | html %]" /></li>
9
    <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% filters.title | html %]" /></li>
6
    <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% filters.author | html %]" /></li>
10
    <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% filters.author | html %]" /></li>
Lines 26-31 Link Here
26
            [% PROCESS options_for_libraries libraries => Branches.all(selected => '') %]
30
            [% PROCESS options_for_libraries libraries => Branches.all(selected => '') %]
27
        </select>
31
        </select>
28
    </li>
32
    </li>
33
[% IF context == "main" %]
34
        </ol>
35
    </div>
36
    <div class="col-sm-6">
37
        <ol>
38
[% END %]
29
    <li><label for="booksellerinvoicenumber ">Vendor invoice number: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% filters.booksellerinvoicenumber | html %]" /></li>
39
    <li><label for="booksellerinvoicenumber ">Vendor invoice number: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% filters.booksellerinvoicenumber | html %]" /></li>
30
    <li>
40
    <li>
31
        <label for="basketgroupname">Basket group:</label>
41
        <label for="basketgroupname">Basket group:</label>
Lines 35-41 Link Here
35
    <li>
45
    <li>
36
      <label for="ordernumber">Order line:</label>
46
      <label for="ordernumber">Order line:</label>
37
      <input type="text" name="ordernumber" id="ordernumber" value="[% filters.ordernumber | html %]" />
47
      <input type="text" name="ordernumber" id="ordernumber" value="[% filters.ordernumber | html %]" />
38
        <label class="yesno" for="search_children_too">
48
    </li>
49
    <li class="radio">
50
        <label for="search_children_too">
39
            [% IF filters.search_children_too %]
51
            [% IF filters.search_children_too %]
40
                <input type="checkbox" name="search_children_too" id="search_children_too" value="1" checked="checked" />
52
                <input type="checkbox" name="search_children_too" id="search_children_too" value="1" checked="checked" />
41
            [% ELSE %]
53
            [% ELSE %]
Lines 84-89 Link Here
84
              <option value="cancelled">Cancelled</option>
96
              <option value="cancelled">Cancelled</option>
85
            [% END %]
97
            [% END %]
86
        </select>
98
        </select>
99
    </li>
100
    <li class="radio">
87
        <label class="yesno" for="is_standing">
101
        <label class="yesno" for="is_standing">
88
            [% IF filters.is_standing %]
102
            [% IF filters.is_standing %]
89
                <input type="checkbox" name="is_standing" id="is_standing" value="1" checked="checked" />
103
                <input type="checkbox" name="is_standing" id="is_standing" value="1" checked="checked" />
Lines 122-124 Link Here
122
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
136
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
123
    </li>
137
    </li>
124
</ol>
138
</ol>
139
[% IF context == "main" %]
140
    </div>
141
    </div>
142
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc (+18 lines)
Lines 523-525 Link Here
523
        </div> <!-- /.panel-body -->
523
        </div> <!-- /.panel-body -->
524
    </div> <!-- /.panel-collapse -->
524
    </div> <!-- /.panel-collapse -->
525
[% END %]
525
[% END %]
526
527
[% BLOCK acquisitions_filter_form %]
528
    <form action="/cgi-bin/koha/acqui/histsearch.pl" method="get">
529
        [% IF ( context == "sidebar" ) %]
530
            <fieldset class="brief">
531
                <h4>Search orders</h4>
532
        [% ELSE %]
533
            <fieldset class="rows">
534
                <legend>Search orders</legend>
535
        [% END %]
536
            [% INCLUDE 'filter-orders.inc' context == context %]
537
            <input type="hidden" name="do_search" value="1" />
538
        </fieldset>
539
        <fieldset class="action">
540
            <input type="submit" class="btn btn-primary" value="Search" />
541
        </fieldset>
542
    </form>
543
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-1 / +4 lines)
Lines 49-55 Link Here
49
    <div class="col">
49
    <div class="col">
50
<div id="acqui_acqui_home_order">
50
<div id="acqui_acqui_home_order">
51
    <fieldset>
51
    <fieldset>
52
        <legend>Manage orders</legend>
52
        <legend>Search vendors</legend>
53
        <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="get">
53
        <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="get">
54
            <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
54
            <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
55
            <input type="submit" class="btn btn-primary" value="Search" />
55
            <input type="submit" class="btn btn-primary" value="Search" />
Lines 83-88 Link Here
83
83
84
</div>
84
</div>
85
85
86
[% PROCESS acquisitions_filter_form context => "main" %]
87
86
[% IF ( loop_budget ) %]
88
[% IF ( loop_budget ) %]
87
89
88
<div class="page-section">
90
<div class="page-section">
Lines 218-223 Link Here
218
</div> <!-- /.row -->
220
</div> <!-- /.row -->
219
221
220
[% MACRO jsinclude BLOCK %]
222
[% MACRO jsinclude BLOCK %]
223
    [% INCLUDE 'calendar.inc' %]
221
    [% INCLUDE 'datatables.inc' %]
224
    [% INCLUDE 'datatables.inc' %]
222
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
225
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
223
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
226
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-21 / +2 lines)
Lines 59-65 Link Here
59
                [% END %]
59
                [% END %]
60
60
61
                [% UNLESS ( order_loop ) %]
61
                [% UNLESS ( order_loop ) %]
62
                    [% PROCESS filter_form context => "main" %]
62
                    [% PROCESS acquisitions_filter_form context => "main" %]
63
                [% END %]
63
                [% END %]
64
64
65
65
Lines 149-155 Link Here
149
<div class="col-md-2 order-sm-2 order-md-1">
149
<div class="col-md-2 order-sm-2 order-md-1">
150
    <aside>
150
    <aside>
151
        [% IF ( order_loop ) %]
151
        [% IF ( order_loop ) %]
152
            [% PROCESS filter_form context => "sidebar" %]
152
            [% PROCESS acquisitions_filter_form context => "sidebar" %]
153
        [% END %]
153
        [% END %]
154
        [% INCLUDE 'acquisitions-menu.inc' %]
154
        [% INCLUDE 'acquisitions-menu.inc' %]
155
    </aside>
155
    </aside>
Lines 201-222 Link Here
201
    </script>
201
    </script>
202
[% END %]
202
[% END %]
203
203
204
[% BLOCK filter_form %]
205
    <form action="/cgi-bin/koha/acqui/histsearch.pl" method="get">
206
        [% IF ( context == "sidebar" ) %]
207
            <fieldset class="brief">
208
                <h4>Search orders</h4>
209
        [% ELSE %]
210
            <fieldset class="rows">
211
                <legend>Search orders</legend>
212
        [% END %]
213
            [% INCLUDE 'filter-orders.inc' search_form=1 %]
214
            <input type="hidden" name="do_search" value="1" />
215
        </fieldset>
216
        <fieldset class="action">
217
            <input type="submit" class="btn btn-primary" value="Search" />
218
        </fieldset>
219
    </form>
220
[% END %]
221
222
[% INCLUDE 'intranet-bottom.inc' %]
204
[% INCLUDE 'intranet-bottom.inc' %]
223
- 

Return to bug 34805