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 518-520 Link Here
518
        </div> <!-- /.panel-body -->
518
        </div> <!-- /.panel-body -->
519
    </div> <!-- /.panel-collapse -->
519
    </div> <!-- /.panel-collapse -->
520
[% END %]
520
[% END %]
521
522
[% BLOCK acquisitions_filter_form %]
523
    <form action="/cgi-bin/koha/acqui/histsearch.pl" method="get">
524
        [% IF ( context == "sidebar" ) %]
525
            <fieldset class="brief">
526
                <h4>Search orders</h4>
527
        [% ELSE %]
528
            <fieldset class="rows">
529
                <legend>Search orders</legend>
530
        [% END %]
531
            [% INCLUDE 'filter-orders.inc' context == context %]
532
            <input type="hidden" name="do_search" value="1" />
533
        </fieldset>
534
        <fieldset class="action">
535
            <input type="submit" class="btn btn-primary" value="Search" />
536
        </fieldset>
537
    </form>
538
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-1 / +4 lines)
Lines 53-59 Link Here
53
    [% END %]
53
    [% END %]
54
<div id="acqui_acqui_home_order">
54
<div id="acqui_acqui_home_order">
55
    <fieldset>
55
    <fieldset>
56
        <legend>Manage orders</legend>
56
        <legend>Search vendors</legend>
57
        <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="get">
57
        <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="get">
58
            <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
58
            <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
59
            <input type="submit" class="btn btn-primary" value="Search" />
59
            <input type="submit" class="btn btn-primary" value="Search" />
Lines 87-92 Link Here
87
87
88
</div>
88
</div>
89
89
90
[% PROCESS acquisitions_filter_form context => "main" %]
91
90
[% IF ( loop_budget ) %]
92
[% IF ( loop_budget ) %]
91
93
92
<div class="page-section">
94
<div class="page-section">
Lines 222-227 Link Here
222
</div> <!-- /.row -->
224
</div> <!-- /.row -->
223
225
224
[% MACRO jsinclude BLOCK %]
226
[% MACRO jsinclude BLOCK %]
227
    [% INCLUDE 'calendar.inc' %]
225
    [% INCLUDE 'datatables.inc' %]
228
    [% INCLUDE 'datatables.inc' %]
226
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
229
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
227
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
230
    [% 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-sm-2 col-sm-pull-10">
149
<div class="col-sm-2 col-sm-pull-10">
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' %]
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