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

(-)a/acqui/newordersuggestion.pl (+9 lines)
Lines 111-116 my $op = $input->param('op'); Link Here
111
my $suggestionid    = $input->param('suggestionid');
111
my $suggestionid    = $input->param('suggestionid');
112
my $duplicateNumber = $input->param('duplicateNumber');
112
my $duplicateNumber = $input->param('duplicateNumber');
113
my $uncertainprice  = $input->param('uncertainprice');
113
my $uncertainprice  = $input->param('uncertainprice');
114
my $link_order      = $input->param('link_order');
114
115
115
$op = 'else' unless $op;
116
$op = 'else' unless $op;
116
117
Lines 128-133 if ( $op eq 'connectDuplicate' ) { Link Here
128
    ConnectSuggestionAndBiblio( $suggestionid, $duplicateNumber );
129
    ConnectSuggestionAndBiblio( $suggestionid, $duplicateNumber );
129
}
130
}
130
131
132
if ( $op eq 'link_order' and $link_order ) {
133
    my $order      = Koha::Acquisition::Orders->find($link_order);
134
    my $suggestion = Koha::Suggestions->find($suggestionid);
135
    $suggestion->update( { biblionumber => $order->biblionumber } ) if $order->biblionumber;
136
    print $input->redirect( "/cgi-bin/koha/acqui/basket.pl?basketno=" . $basketno );
137
}
138
131
my $suggestions = [
139
my $suggestions = [
132
    Koha::Suggestions->search_limited(
140
    Koha::Suggestions->search_limited(
133
        {
141
        {
Lines 147-152 $template->param( Link Here
147
    booksellerid => $booksellerid,
155
    booksellerid => $booksellerid,
148
    name         => $vendor->name,
156
    name         => $vendor->name,
149
    "op_$op"     => 1,
157
    "op_$op"     => 1,
158
    link_order   => $link_order,
150
);
159
);
151
160
152
output_html_with_http_headers $input, $cookie, $template->output;
161
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-975 / +907 lines)
Lines 5-11 Link Here
5
[% PROCESS 'patron-search.inc' %]
5
[% PROCESS 'patron-search.inc' %]
6
[% BLOCK csv_export %]
6
[% BLOCK csv_export %]
7
    <div class="btn-group">
7
    <div class="btn-group">
8
        <a id="exportbutton" class="btn btn-default" href="/cgi-bin/koha/acqui/basket.pl?op=export&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]"><i class="fa fa-download"></i> Export as CSV</a>
8
        <a id="exportbutton" class="btn btn-default" href="[% script_name | url %]?op=export&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]"><i class="fa fa-download"></i> Export as CSV</a>
9
        <button type="button" class="btn btn-default btn-sm dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
9
        <button type="button" class="btn btn-default btn-sm dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
10
            <span class="visually-hidden">Toggle dropdown</span>
10
            <span class="visually-hidden">Toggle dropdown</span>
11
        </button>
11
        </button>
Lines 26-42 Link Here
26
[% USE TablesSettings %]
26
[% USE TablesSettings %]
27
[% SET footerjs = 1 %]
27
[% SET footerjs = 1 %]
28
[% INCLUDE 'doc-head-open.inc' %]
28
[% INCLUDE 'doc-head-open.inc' %]
29
<title
29
<title>[% FILTER collapse %]
30
    >[% FILTER collapse %]
30
    [% tx("Basket {basketname} ({basketnumber}) for {vendor}", { basketname = basketname, basketnumber = basketno, vendor = booksellername }) | html %] &rsaquo;
31
        [% tx("Basket {basketname} ({basketnumber}) for {vendor}", { basketname = basketname, basketnumber = basketno, vendor = booksellername }) | html %]
31
    [% t("Acquisitions") | html %] &rsaquo;
32
        &rsaquo; [% t("Acquisitions") | html %] &rsaquo; [% t("Koha") | html %]
32
    [% t("Koha") | html %]
33
    [% END %]</title
33
[% END %]</title>
34
>
35
[% INCLUDE 'doc-head-close.inc' %]
34
[% INCLUDE 'doc-head-close.inc' %]
36
<style>
35
<style>
37
    .sortmsg {
36
    .sortmsg {font-size: 80%;}
38
        font-size: 80%;
39
    }
40
</style>
37
</style>
41
</head>
38
</head>
42
39
Lines 70-1095 Link Here
70
    [% END #/ WRAPPER breadcrumbs %]
67
    [% END #/ WRAPPER breadcrumbs %]
71
[% END #/ WRAPPER sub-header.inc %]
68
[% END #/ WRAPPER sub-header.inc %]
72
69
73
[% SET asides = ['acquisitions-menu'] %]
70
<div class="main container-fluid">
74
[% IF booksellerid %][% asides.unshift('vendor-menu') %][% END %]
71
    <div class="row">
75
[% WRAPPER 'main-container.inc' asides=asides %]
72
        <div class="col-md-10 order-md-2 order-sm-2">
73
            <main>
74
                [% INCLUDE 'messages.inc' %]
76
75
77
    [% IF (cannot_manage_basket) %]
76
                [% IF (cannot_manage_basket) %]
78
        <div class="alert alert-warning">You are not authorised to manage this basket.</div>
77
                    <div class="alert alert-warning">You are not authorised to manage this basket.</div>
79
    [% ELSE %]
78
                [% ELSE %]
80
81
        [% IF !confirm_close && !edi_confirm %]
82
            [% UNLESS ( selectbasketg ) %]
83
                [% UNLESS ( closedate ) %]
84
                    [% UNLESS ( delete_confirmed ) %]
85
                        <div id="toolbar" class="btn-toolbar sticky fh-fixedHeader">
86
                            [% IF active %]
87
                                <div class="btn-group"
88
                                    ><a href="#addtoBasket" role="button" class="btn btn-default" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div
89
                                >
90
                            [% END %]
91
                            <div class="btn-group"
92
                                ><a href="basketheader.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;op=add_form" class="btn btn-default" id="basketheadbutton"
93
                                    ><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit basket</a
94
                                ></div
95
                            >
96
                            [% IF CAN_user_acquisition_delete_baskets %]
97
                                <div class="btn-group"
98
                                    ><a href="#deleteBasketModal" role="button" class="btn btn-default" data-bs-toggle="modal" id="delbasketbutton"><i class="fa fa-trash-can"></i> Delete basket</a></div
99
                                >
100
                            [% END %]
101
                            [% IF ( unclosable ) %]
102
79
103
                            [% ELSIF ( uncertainprices ) %]
80
                    [% IF !confirm_close && !edi_confirm %]
104
                                <div class="btn-group"
81
                        [% UNLESS ( selectbasketg ) %]
105
                                    ><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&amp;owner=1" class="btn btn-default" id="uncertpricesbutton"
82
                            [% UNLESS ( closedate ) %]
106
                                        ><i class="fa-solid fa-dollar-sign"></i> Uncertain prices</a
83
                                [% UNLESS ( delete_confirmed ) %]
107
                                    ></div
84
                                    <div id="toolbar" class="btn-toolbar sticky fh-fixedHeader">
108
                                >
85
                                        [% IF active %]
109
                                <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
86
                                            <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-default" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div>
110
                                    <a href="" class="btn btn-default disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close basket</a>
87
                                        [% END %]
111
                                </div>
88
                                        <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;op=add_form" class="btn btn-default" id="basketheadbutton"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit basket</a></div>
112
                            [% ELSE %]
89
                                        [% IF CAN_user_acquisition_delete_baskets %]
113
                                <div class="btn-group">
90
                                            <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-default" data-bs-toggle="modal" id="delbasketbutton"><i class="fa fa-trash-can"></i> Delete basket</a></div>
114
                                    <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
91
                                        [% END %]
115
                                        [% INCLUDE 'csrf-token.inc' %]
92
                                        [% IF ( unclosable ) %]
116
                                        <input type="hidden" name="op" value="cud-close" />
93
                                        [% ELSIF ( uncertainprices ) %]
117
                                        <input type="hidden" name="bookseller" value="[% booksellerid | html %]" />
94
                                            <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&amp;owner=1" class="btn btn-default" id="uncertpricesbutton"><i class="fa-solid fa-dollar-sign"></i> Uncertain prices</a></div>
118
                                        <button type="submit" class="btn btn-default" id="close button"><i class="fa fa-times-circle"></i> Close basket</button>
95
                                            <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
119
                                        <input type="hidden" name="basketno" value="[% basketno | html %]" />
96
                                                <a href="" class="btn btn-default disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close basket</a>
120
                                    </form>
97
                                            </div>
121
                                </div>
98
                                        [% ELSE %]
122
                            [% END %]
99
                                            <div class="btn-group">
100
                                                <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
101
                                                     [% INCLUDE 'csrf-token.inc' %]
102
                                                     <input type="hidden" name="op" value="cud-close">
103
                                                     <input type="hidden" name="bookseller" value="[% booksellerid | html %]">
104
                                                     <button type="submit" class="btn btn-default" id="close button"><i class="fa fa-times-circle"></i> Close basket</button>
105
                                                     <input type="hidden" name="basketno" value="[% basketno | html %]">
106
                                                </form>
107
                                            </div>
108
                                        [% END %]
123
109
124
                            [% PROCESS csv_export %]
110
                                        [% PROCESS csv_export %]
125
111
126
                            [% IF Koha.Preference('EDIFACT') && ediaccount %]
112
                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
127
                                [% UNLESS eans.size %]
113
                                            [% UNLESS eans.size %]
128
                                    <div class="btn-group" title="You must define an EAN in Administration -> Library EANs">
114
                                            <div class="btn-group" title="You must define an EAN in Administration -> Library EANs">
129
                                        <button class="btn btn-default btn-xs disabled" disabled="disabled" href="#"><i class="fa fa-download"></i> Create EDIFACT order</button>
115
                                                <button class="btn btn-default btn-xs disabled" disabled="disabled" href="#"><i class="fa fa-download"></i> Create EDIFACT order</button>
130
                                    </div>
116
                                            </div>
131
                                [% ELSE %]
117
                                            [% ELSE %]
132
                                    <div class="btn-group">
118
                                            <div class="btn-group">
133
                                        [% IF eans.size == 1 %]
119
                                                [% IF eans.size == 1 %]
134
                                            <a class="btn btn-default btn-xs submit-form-link" href="#" data-ean="[% eans.0 | html %]" data-basketno="[% basketno | html %]" data-action="basket.pl" data-method="post" data-op="cud-ediorder"
120
                                                    <a class="btn btn-default btn-xs submit-form-link" href="#" data-ean="[% eans.0 | html %]" data-basketno="[% basketno | html %]" data-action="basket.pl" data-method="post" data-op="cud-ediorder"><i class="fa fa-download"></i> Create EDIFACT order</a>
135
                                                ><i class="fa fa-download"></i> Create EDIFACT order</a
121
                                                [% ELSE %]
136
                                            >
122
                                                    <button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</button>
137
                                        [% ELSE %]
123
                                                    <ul class="dropdown-menu">
138
                                            <button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</button>
124
                                                        [% FOREACH eanacct IN eans %]
139
                                            <ul class="dropdown-menu">
125
                                                        <li>
140
                                                [% FOREACH eanacct IN eans %]
126
                                                            <a class="btn btn-default btn-xs submit-form-link" href="#" data-ean="[% eanacct.ean | html %]" data-basketno="[% basketno | html %]" data-action="basket.pl" data-method="post" data-op="cud-ediorder">[% eanacct.branch.branchname | html %] ([% eanacct.ean | html %]) [% IF eanacct     .description %][[% eanacct.description | html %]][% END %]</a>
141
                                                    <li>
127
                                                        </li>
142
                                                        <a
128
                                                        [% END %]
143
                                                            class="btn btn-default btn-xs submit-form-link"
129
                                                    </ul>
144
                                                            href="#"
145
                                                            data-ean="[% eanacct.ean | html %]"
146
                                                            data-basketno="[% basketno | html %]"
147
                                                            data-action="basket.pl"
148
                                                            data-method="post"
149
                                                            data-op="cud-ediorder"
150
                                                            >[% eanacct.branch.branchname | html %] ([% eanacct.ean | html %]) [% IF eanacct     .description %][[% eanacct.description | html %]][% END %]</a
151
                                                        >
152
                                                    </li>
153
                                                [% END %]
130
                                                [% END %]
154
                                            </ul>
131
                                            </div>
132
                                            [% END %]
155
                                        [% END %]
133
                                        [% END %]
156
                                    </div>
157
                                [% END %]
158
                            [% END %]
159
134
160
                            [% IF ( active && books_loop ) %]
135
                                        [% IF ( active && books_loop ) %]
161
                                <div class="btn-group">
136
                                            <div class="btn-group">
162
                                    <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
137
                                                <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
163
                                        [% INCLUDE 'csrf-token.inc' %]
138
                                                    [% INCLUDE 'csrf-token.inc' %]
164
                                        <input type="hidden" name="op" value="cud-email" />
139
                                                    <input type="hidden" name="op" value="cud-email" />
165
                                        <input type="hidden" name="basketno" value="[% basketno | html %]" />
140
                                                    <input type="hidden" name="basketno" value="[% basketno | html %]" />
166
                                        <button type="submit" class="btn btn-default" id="emailvendorbutton"><i class="fa-solid fa-envelope"></i> E-mail order</button>
141
                                                    <button type="submit" class="btn btn-default" id="emailvendorbutton"><i class="fa-solid fa-envelope"></i> E-mail order</button>
167
                                    </form>
142
                                                </form>
143
                                            </div>
144
                                        [% END %]
145
                                    </div> <!-- /#toolbar -->
146
                                [% END # / UNLESS ( delete_confirmed ) %]
147
148
                                <!-- Modal for confirm deletion box-->
149
                                <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
150
                                    <div class="modal-dialog">
151
                                        <div class="modal-content">
152
                                            <div class="modal-header">
153
                                                <h1 class="modal-title">Confirm deletion</h1>
154
                                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
155
                                            </div>
156
                                            [% UNLESS book_foot_loop %]
157
                                                <div class="modal-body">
158
                                                    <p>Are you sure you want to delete this basket?</p>
159
                                                </div>
160
                                                <div class="modal-footer">
161
                                                    <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
162
                                                        [% INCLUDE 'csrf-token.inc' %]
163
                                                        <input type="hidden" name="op" value="cud-delete" />
164
                                                        <input type="hidden" name="basketno" value="[% basketno | html %]" />
165
                                                        <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
166
                                                        <input type="hidden" name="delbiblio" value="0" />
167
                                                        <button type="submit" class="btn btn-danger">Delete basket</button>
168
                                                    </form>
169
                                                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
170
                                                </div>
171
                                            [% ELSE %]
172
                                                <div class="modal-body">
173
                                                    <p>Are you sure you want to delete this basket?</p>
174
                                                    <p>Warning:</p>
175
                                                    <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
176
                                                    <p>If items have been created when ordering or receiving, they will be deleted.</p>
177
                                                    <p>You can choose to delete bibliographic records if possible (bibliographic records that have other items or that are used in a subscription or another order will not be deleted).</p>
178
                                                </div>
179
                                                <div class="modal-footer">
180
                                                    <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
181
                                                        [% INCLUDE 'csrf-token.inc' %]
182
                                                        <input type="hidden" name="op" value="cud-delete" />
183
                                                        <input type="hidden" name="basketno" value="[% basketno | html %]" />
184
                                                        <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
185
                                                        <input type="hidden" name="delbiblio" value="0" />
186
                                                        <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
187
                                                    </form>
188
189
                                                    <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
190
                                                        [% INCLUDE 'csrf-token.inc' %]
191
                                                        <input type="hidden" name="op" value="cud-delete" />
192
                                                        <input type="hidden" name="basketno" value="[% basketno | html %]" />
193
                                                        <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
194
                                                        <input type="hidden" name="delbiblio" value="1" />
195
                                                        <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
196
                                                    </form>
197
                                                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
198
                                                </div> <!-- /.modal-footer -->
199
                                            [% END # /UNLESS book_foot_loop %]
200
                                        </div> <!-- /.modal-content -->
201
                                    </div> <!-- /.modal-dialog -->
202
                                </div> <!-- /.modal#deleteBasketModal -->
203
                                <!-- End of Modal-->
204
                            [% ELSE # UNLESS ( closedate ) %]
205
                                <div id="toolbar" class="btn-toolbar">
206
                                    [% IF grouped %]
207
                                        <div title="Can not reopen baskets that are part of a basket group." class="btn-group">
208
                                            <div class="btn-group"><a href="#" class="btn btn-default disabled" id="reopenbutton"><i class="fa-solid fa-rotate"></i> Reopen basket</a></div>
209
                                        </div>
210
                                    [% ELSE %]
211
                                        <div class="btn-group">
212
                                            <form action="basket.pl" method="post" id="reopenform">
213
                                                [% INCLUDE 'csrf-token.inc' %]
214
                                                <input type="hidden" name="op" value="cud-reopen">
215
                                                <input type="hidden" name="basketno" value="[% basketno | html %]">
216
                                                <button type="submit" class="btn btn-default"><i class="fa-solid fa-rotate"></i> Reopen basket</button>
217
                                            </form>
218
                                        </div>
219
220
                                        [% PROCESS csv_export %]
221
                                    [% END %]
168
                                </div>
222
                                </div>
169
                            [% END %]
223
                            [% END # /UNLESS ( closedate ) %]
170
                        </div>
224
                        [% END # /UNLESS ( selectbasketg ) %]
171
                        <!-- /#toolbar -->
172
                    [% END # / UNLESS ( delete_confirmed ) %]
173
225
174
                    <!-- Modal for confirm deletion box-->
226
                        [% IF ( NO_BOOKSELLER ) %]
175
                    <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
227
                            <h1>Vendor not found</h1>
176
                        <div class="modal-dialog">
228
                        [% ELSE %]
177
                            <div class="modal-content">
229
                            [% IF ( delete_confirmed ) %]
178
                                <div class="modal-header">
230
                                <div class="alert alert-info">
179
                                    <h1 class="modal-title">Confirm deletion</h1>
231
                                    <h3>Basket deleted</h3>
180
                                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
181
                                </div>
232
                                </div>
182
                                [% UNLESS book_foot_loop %]
233
                                [% IF (cannotdelbiblios) %]
183
                                    <div class="modal-body">
234
                                    <div class="alert alert-warning">
184
                                        <p>Are you sure you want to delete this basket?</p>
235
                                        <p><strong>Warning:</strong></p>
185
                                    </div>
236
                                        <p><strong>The following records could not be deleted:</strong></p>
186
                                    <div class="modal-footer">
237
                                        <ul>
187
                                        <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
238
                                            [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
188
                                            [% INCLUDE 'csrf-token.inc' %]
239
                                                <li>
189
                                            <input type="hidden" name="op" value="cud-delete" />
240
                                                    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber | uri %]">[% cannotdelbiblio.title | html %]</a> by [% cannotdelbiblio.author | html %]:
190
                                            <input type="hidden" name="basketno" value="[% basketno | html %]" />
241
                                                    <ul>
191
                                            <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
242
                                                        [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount | html %] item(s) attached.</li>[% END %]
192
                                            <input type="hidden" name="delbiblio" value="0" />
243
                                                        [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions | html %] subscription(s) attached.</li>[% END %]
193
                                            <button type="submit" class="btn btn-danger">Delete basket</button>
244
                                                        [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio | html %] order(s) attached.</li>[% END %]
194
                                        </form>
245
                                                        [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
195
                                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
246
                                                    </ul>
247
                                                </li>
248
                                            [% END %]
249
                                        </ul>
196
                                    </div>
250
                                    </div>
251
                                    <a href="booksellers.pl">Go back to vendor page</a>
197
                                [% ELSE %]
252
                                [% ELSE %]
198
                                    <div class="modal-body">
253
                                    <a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-sm">Show baskets for vendor [% booksellername | html %]</a> <a href="/cgi-bin/koha/acqui/booksellers.pl" class="btn btn-default btn-sm">Show all active baskets</a>
199
                                        <p>Are you sure you want to delete this basket?</p>
254
                                [% END # /IF (cannotdelbiblios) %]
200
                                        <p>Warning:</p>
255
                            [% ELSE # IF ( delete_confirmed ) %]
201
                                        <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
202
                                        <p>If items have been created when ordering or receiving, they will be deleted.</p>
203
                                        <p>You can choose to delete bibliographic records if possible (bibliographic records that have other items or that are used in a subscription or another order will not be deleted).</p>
204
                                    </div>
205
                                    <div class="modal-footer">
206
                                        <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
207
                                            [% INCLUDE 'csrf-token.inc' %]
208
                                            <input type="hidden" name="op" value="cud-delete" />
209
                                            <input type="hidden" name="basketno" value="[% basketno | html %]" />
210
                                            <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
211
                                            <input type="hidden" name="delbiblio" value="0" />
212
                                            <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
213
                                        </form>
214
256
215
                                        <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
257
                                [% FOR m IN messages %]
216
                                            [% INCLUDE 'csrf-token.inc' %]
258
                                    <div class="alert alert-[% m.type | html %]">
217
                                            <input type="hidden" name="op" value="cud-delete" />
259
                                        [% SWITCH m.code %]
218
                                            <input type="hidden" name="basketno" value="[% basketno | html %]" />
260
                                        [% CASE 'no_email' %]
219
                                            <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
261
                                            <span>This vendor has no contact selected for sending orders to or is missing an e-mail address.</span>
220
                                            <input type="hidden" name="delbiblio" value="1" />
262
                                        [% CASE 'no_basketno' %]
221
                                            <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
263
                                            <span>No basket given.</span>
222
                                        </form>
264
                                        [% CASE 'no_letter' %]
223
                                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
265
                                            <span>There is no notice template with code ACQORDER defined.</span>
266
                                        [% CASE 'email_sent' %]
267
                                            <span>Order e-mail was sent to the vendor.</span>
268
                                        [% CASE %]
269
                                            <span>ERROR! - [% m.code | html %]</span>
270
                                        [% END %]
224
                                    </div>
271
                                    </div>
225
                                    <!-- /.modal-footer -->
272
                                [% END # /FOR m %]
226
                                [% END # /UNLESS book_foot_loop %]
227
                            </div>
228
                            <!-- /.modal-content -->
229
                        </div>
230
                        <!-- /.modal-dialog -->
231
                    </div>
232
                    <!-- /.modal#deleteBasketModal -->
233
                    <!-- End of Modal-->
234
                [% ELSE # UNLESS ( closedate ) %]
235
                    <div id="toolbar" class="btn-toolbar">
236
                        [% IF grouped %]
237
                            <div title="Can not reopen baskets that are part of a basket group." class="btn-group">
238
                                <div class="btn-group"
239
                                    ><a href="#" class="btn btn-default disabled" id="reopenbutton"><i class="fa-solid fa-rotate"></i> Reopen basket</a></div
240
                                >
241
                            </div>
242
                        [% ELSE %]
243
                            <div class="btn-group">
244
                                <form action="basket.pl" method="post" id="reopenform">
245
                                    [% INCLUDE 'csrf-token.inc' %]
246
                                    <input type="hidden" name="op" value="cud-reopen" />
247
                                    <input type="hidden" name="basketno" value="[% basketno | html %]" />
248
                                    <button type="submit" class="btn btn-default"><i class="fa-solid fa-rotate"></i> Reopen basket</button>
249
                                </form>
250
                            </div>
251
273
252
                            [% PROCESS csv_export %]
274
                                <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for <a href="supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
253
                        [% END %]
254
                    </div>
255
                [% END # /UNLESS ( closedate ) %]
256
            [% END # /UNLESS ( selectbasketg ) %]
257
275
258
            [% IF ( NO_BOOKSELLER ) %]
276
                                [% IF ( basketno ) %]
259
                <h1>Vendor not found</h1>
277
                                    <div id="acqui_basket_summary" class="row">
260
            [% ELSE %]
278
                                            <div class="col-md-6 col-sm-12">
261
                [% IF ( delete_confirmed ) %]
279
                                                <div class="page-section rows">
262
                    <div class="alert alert-info">
280
                                                    <h2>General information</h2>
263
                        <h3>Basket deleted</h3>
281
                                                    <ol>
264
                    </div>
282
                                                        [% IF ( basketnote ) %]
265
                    [% IF (cannotdelbiblios) %]
283
                                                            <li><span class="label">Internal note:</span> [% basketnote | html %]</li>
266
                        <div class="alert alert-warning">
284
                                                        [% END %]
267
                            <p><strong>Warning:</strong></p>
285
                                                        [% IF ( basketbooksellernote ) %]
268
                            <p><strong>The following records could not be deleted:</strong></p>
286
                                                            <li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>
269
                            <ul>
287
                                                        [% END %]
270
                                [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
288
                                                        [% IF ( basketcontractno ) %]
271
                                    <li>
289
                                                            <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno | uri %]&amp;booksellerid=[% booksellerid | uri %]">[% basketcontractname | html %]</a></li>
272
                                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber | uri %]">[% cannotdelbiblio.title | html %]</a> by [% cannotdelbiblio.author | html %]:
290
                                                        [% END %]
273
                                        <ul>
291
                                                        [% IF deliveryplace %]
274
                                            [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount | html %] item(s) attached.</li>[% END %]
292
                                                            <li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) | html %]</li>
275
                                            [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions | html %] subscription(s) attached.</li>[% END %]
293
                                                        [% END %]
276
                                            [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio | html %] order(s) attached.</li>[% END %]
294
                                                        [% IF billingplace %]
277
                                            [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
295
                                                            <li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) | html %]</li>
278
                                        </ul>
296
                                                        [% END %]
279
                                    </li>
297
                                                        [% IF ( authorisedbyname ) %]
280
                                [% END %]
298
                                                            <li><span class="label">[% tp('basket created by', 'Created by:') | html %]</span>  [% authorisedbyname | html %]</li>
281
                            </ul>
299
                                                        [% END %]
282
                        </div>
283
                        <a href="booksellers.pl">Go back to vendor page</a>
284
                    [% ELSE %]
285
                        <a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-sm">Show baskets for vendor [% booksellername | html %]</a>
286
                        <a href="/cgi-bin/koha/acqui/booksellers.pl" class="btn btn-default btn-sm">Show all active baskets</a>
287
                    [% END # /IF (cannotdelbiblios) %]
288
                [% ELSE # IF ( delete_confirmed ) %]
289
300
290
                    [% FOR m IN messages %]
301
                                                        [% IF ( creationdate ) %]
291
                        <div class="alert alert-[% m.type | html %]">
302
                                                            <li><span class="label">Opened on:</span>  [% creationdate | $KohaDates %]</li>
292
                            [% SWITCH m.code %]
303
                                                        [% END %]
293
                            [% CASE 'no_email' %]
304
                                                        [% IF ( closedate ) %]
294
                                <span>This vendor has no contact selected for sending orders to or is missing an e-mail address.</span>
305
                                                            <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
295
                            [% CASE 'no_basketno' %]
306
                                                        [% END %]
296
                                <span>No basket given.</span>
297
                            [% CASE 'no_letter' %]
298
                                <span>There is no notice template with code ACQORDER defined.</span>
299
                            [% CASE 'email_sent' %]
300
                                <span>Order e-mail was sent to the vendor.</span>
301
                            [% CASE %]
302
                                <span>ERROR! - [% m.code | html %]</span>
303
                            [% END %]
304
                        </div>
305
                    [% END # /FOR m %]
306
307
307
                    <h1>[% UNLESS ( basketno ) %]New[% END %]Basket [% basketname | html %] ([% basketno | html %]) for <a href="supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
308
                                                        [% IF ( ediaccount ) %]
309
                                                            [%- BLOCK edi_status -%]
310
                                                                [%- SWITCH edi_order.status -%]
311
                                                                    [%- CASE 'pending'   -%]<span>Pending</span>
312
                                                                    [%- CASE 'sent'      -%]<span>Sent</span>
313
                                                                    [%- CASE 'processed' -%]<span>Processed</span>
314
                                                                [%- END -%]
315
                                                            [%- END -%]
316
                                                            [% IF ( edi_order ) %]
317
                                                                <li><span class="label">EDI status:</span> [%- PROCESS edi_status edi_order=edi_order -%] ([% edi_order.transfer_date | $KohaDates %])</li>
318
                                                            [% ELSE %]
319
                                                                <li><span class="label">EDI status:</span> Not ordered</li>
320
                                                            [% END %]
321
                                                        [% END %]
322
                                                        [% IF ( estimateddeliverydate ) %]
323
                                                            <li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>
324
                                                        [% END %]
325
                                                        <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
308
326
309
                    [% IF ( basketno ) %]
327
                                                        [% IF basket.create_items %]
310
                        <div id="acqui_basket_summary" class="row">
328
                                                            <li>
311
                            <div class="col-md-6 col-sm-12">
329
                                                                <span class="label">Create items when:</span>
312
                                <div class="page-section rows">
330
                                                                [% SWITCH basket.create_items %]
313
                                    <h2>General information</h2>
331
                                                                    [% CASE 'receiving' %]<span>Receiving items</span>
314
                                    <ol>
332
                                                                    [% CASE 'cataloguing' %]<span>Cataloguing items</span>
315
                                        [% IF ( basketnote ) %]
333
                                                                    [% CASE %]<span>Placing orders</span>
316
                                            <li><span class="label">Internal note:</span> [% basketnote | html %]</li>
334
                                                                [% END %]
317
                                        [% END %]
335
                                                            </li>
318
                                        [% IF ( basketbooksellernote ) %]
336
                                                        [% END %]
319
                                            <li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>
320
                                        [% END %]
321
                                        [% IF ( basketcontractno ) %]
322
                                            <li
323
                                                ><span class="label">Contract name:</span>
324
                                                <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno | uri %]&amp;booksellerid=[% booksellerid | uri %]">[% basketcontractname | html %]</a></li
325
                                            >
326
                                        [% END %]
327
                                        [% IF deliveryplace %]
328
                                            <li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) | html %]</li>
329
                                        [% END %]
330
                                        [% IF billingplace %]
331
                                            <li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) | html %]</li>
332
                                        [% END %]
333
                                        [% IF ( authorisedbyname ) %]
334
                                            <li><span class="label">[% tp('basket created by', 'Created by:') | html %]</span> [% authorisedbyname | html %]</li>
335
                                        [% END %]
336
337
337
                                        [% IF ( creationdate ) %]
338
                                                        [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
338
                                            <li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>
339
                                        [% END %]
340
                                        [% IF ( closedate ) %]
341
                                            <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
342
                                        [% END %]
343
339
344
                                        [% IF ( ediaccount ) %]
340
                                                    </ol>
345
                                            [%- BLOCK edi_status -%]
341
                                                </div> <!-- /.page-section -->
346
                                                [%- SWITCH edi_order.status -%]
342
                                            </div> <!-- /.col-sm-6 -->
347
343
348
                                                [%- CASE 'pending' -%]
344
                                            <div class="col-md-6 col-sm-12">
349
                                                    <span>Pending</span>
345
                                                <div class="page-section rows">
350
                                                [%- CASE 'sent' -%]
346
                                                    <h2>Settings</h2>
351
                                                    <span>Sent</span>
352
                                                [%- CASE 'processed' -%]
353
                                                    <span>Processed</span>
354
                                                [%- END -%]
355
                                            [%- END -%]
356
                                            [% IF ( edi_order ) %]
357
                                                <li><span class="label">EDI status:</span> [%- PROCESS edi_status edi_order=edi_order -%] ([% edi_order.transfer_date | $KohaDates %])</li>
358
                                            [% ELSE %]
359
                                                <li><span class="label">EDI status:</span> Not ordered</li>
360
                                            [% END %]
361
                                        [% END %]
362
                                        [% IF ( estimateddeliverydate ) %]
363
                                            <li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>
364
                                        [% END %]
365
                                        <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
366
347
367
                                        [% IF basket.create_items %]
348
                                                    <ol>
368
                                            <li>
349
                                                        <li id="managedby">
369
                                                <span class="label">Create items when:</span>
350
                                                            <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
370
                                                [% SWITCH basket.create_items %]
351
                                                                [% INCLUDE 'csrf-token.inc' %]
371
                                                [% CASE 'receiving' %]
352
                                                                <span class="label">[% tp('Acquisitions basket managed by user', 'Managed by:') | html %]</span>
372
                                                    <span>Receiving items</span>
353
                                                                <div style="display:inline-block">
373
                                                [% CASE 'cataloguing' %]
354
                                                                    <ul id="users_names" style="padding-left:0">
374
                                                    <span>Cataloguing items</span>
355
                                                                        [% FOREACH user IN users %]
375
                                                [% CASE %]
356
                                                                            <li id="user_[% user.borrowernumber | html %]">
376
                                                    <span>Placing orders</span>
357
                                                                                [% user.firstname | html %] [% user.surname | html %]
377
                                                [% END %]
358
                                                                                <a href="#" data-borrowernumber="[% user.borrowernumber | html %]" class="del_user"><i class="fa fa-trash-can"></i> Delete user</a>
378
                                            </li>
359
                                                                            </li>
379
                                        [% END %]
360
                                                                        [% END %]
361
                                                                        <li>
362
                                                                            <a href="#patron_search_modal" id="add_user" class="btn btn-default" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add user</a>
363
                                                                        </li>
364
                                                                        <li id="add_user_submit" style="display:none;">
365
                                                                            <button type="submit" class="btn btn-default btn-xs">Save changes</button>
366
                                                                        </li>
367
                                                                    </ul>
368
                                                                </div>
369
                                                                <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
370
                                                                <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
371
                                                                <input type="hidden" id="op" name="op" value="cud-mod_users" />
372
                                                            </form>
380
373
381
                                        [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
374
                                                        </li> <!-- /#managedby -->
382
                                    </ol>
375
                                                        <li id="branch">
383
                                </div>
376
                                                            <span class="label">Managing library:</span>
384
                                <!-- /.page-section -->
377
                                                            [% IF basketbranchcode %]
385
                            </div>
378
                                                                [% Branches.GetName( basketbranchcode ) | html %]
386
                            <!-- /.col-sm-6 -->
379
                                                                <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Change library</a>
380
                                                            [% ELSE %]
381
                                                                No library
382
                                                                <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set library</a>
383
                                                            [% END %]
384
                                                        </li> <!-- /#branch -->
385
                                                        [% IF branches_loop.size %]
386
                                                            <li id="managing_library_entry" style="display:none;">
387
                                                                <span class="label">&nbsp;</span>
388
                                                                <div>
389
                                                                    <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
390
                                                                        [% INCLUDE 'csrf-token.inc' %]
391
                                                                        <select id="select_managing_library" name="branch">
392
                                                                            <option value="">(no library)</option>
393
                                                                            [% FOREACH branch IN branches_loop %]
394
                                                                                [% IF ( basketbranchcode == branch.branchcode ) %]
395
                                                                                    <option selected="selected" value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
396
                                                                                [% ELSE %]
397
                                                                                    <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
398
                                                                                [% END %]
399
                                                                            [% END %]
400
                                                                        </select>
401
                                                                        <a id="library_entry_cancel" href="#" class="cancel">Cancel</a>
402
                                                                        <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
403
                                                                        <input type="hidden" id="op" name="op" value="cud-mod_branch" />
404
                                                                    </form>
405
                                                                </div>
406
                                                            </li> <!-- #/managing_library_entry -->
407
                                                        [% END # /IF branches_loop.size %]
387
408
388
                            <div class="col-md-6 col-sm-12">
409
                                                    </ol>
389
                                <div class="page-section rows">
390
                                    <h2>Settings</h2>
391
410
392
                                    <ol>
411
                                                    [% IF ( closedate ) %]
393
                                        <li id="managedby">
412
                                                        <ol>
394
                                            <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
413
                                                            <li>
395
                                                [% INCLUDE 'csrf-token.inc' %]
414
                                                                <span class="label">Basket group:</span>
396
                                                <span class="label">[% tp('Acquisitions basket managed by user', 'Managed by:') | html %]</span>
415
                                                                [% IF basketgroup.id and not basketgroup.name %]
397
                                                <div style="display:inline-block">
416
                                                                    [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
398
                                                    <ul id="users_names" style="padding-left:0">
399
                                                        [% FOREACH user IN users %]
400
                                                            <li id="user_[% user.borrowernumber | html %]">
401
                                                                [% user.firstname | html %] [% user.surname | html %]
402
                                                                <a href="#" data-borrowernumber="[% user.borrowernumber | html %]" class="del_user"><i class="fa fa-trash-can"></i> Delete user</a>
403
                                                            </li>
404
                                                        [% END %]
405
                                                        <li>
406
                                                            <a href="#patron_search_modal" id="add_user" class="btn btn-default" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add user</a>
407
                                                        </li>
408
                                                        <li id="add_user_submit" style="display:none;">
409
                                                            <button type="submit" class="btn btn-default btn-xs">Save changes</button>
410
                                                        </li>
411
                                                    </ul>
412
                                                </div>
413
                                                <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
414
                                                <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
415
                                                <input type="hidden" id="op" name="op" value="cud-mod_users" />
416
                                            </form>
417
                                        </li>
418
                                        <!-- /#managedby -->
419
                                        <li id="branch">
420
                                            <span class="label">Managing library:</span>
421
                                            [% IF basketbranchcode %]
422
                                                [% Branches.GetName( basketbranchcode ) | html %]
423
                                                <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Change library</a>
424
                                            [% ELSE %]
425
                                                No library
426
                                                <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set library</a>
427
                                            [% END %]
428
                                        </li>
429
                                        <!-- /#branch -->
430
                                        [% IF branches_loop.size %]
431
                                            <li id="managing_library_entry" style="display:none;">
432
                                                <span class="label">&nbsp;</span>
433
                                                <div>
434
                                                    <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
435
                                                        [% INCLUDE 'csrf-token.inc' %]
436
                                                        <select id="select_managing_library" name="branch">
437
                                                            <option value="">(no library)</option>
438
                                                            [% FOREACH branch IN branches_loop %]
439
                                                                [% IF ( basketbranchcode == branch.branchcode ) %]
440
                                                                    <option selected="selected" value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
441
                                                                [% ELSE %]
442
                                                                    <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
443
                                                                [% END %]
417
                                                                [% END %]
444
                                                            [% END %]
445
                                                        </select>
446
                                                        <a id="library_entry_cancel" href="#" class="cancel">Cancel</a>
447
                                                        <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
448
                                                        <input type="hidden" id="op" name="op" value="cud-mod_branch" />
449
                                                    </form>
450
                                                </div>
451
                                            </li>
452
                                            <!-- #/managing_library_entry -->
453
                                        [% END # /IF branches_loop.size %]
454
                                    </ol>
455
418
456
                                    [% IF ( closedate ) %]
419
                                                                [% IF basketgroup.closed %]
457
                                        <ol>
420
                                                                    [% IF ( CAN_user_acquisition_group_manage ) %]
458
                                            <li>
421
                                                                        <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]" title="basketgroup">[% basketgroup.name | html %] <span>(closed)</span></a>
459
                                                <span class="label">Basket group:</span>
460
                                                [% IF basketgroup.id and not basketgroup.name %]
461
                                                    [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
462
                                                [% END %]
463
464
                                                [% IF basketgroup.closed %]
465
                                                    [% IF ( CAN_user_acquisition_group_manage ) %]
466
                                                        <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]" title="basketgroup"
467
                                                            >[% basketgroup.name | html %] <span>(closed)</span></a
468
                                                        >
469
                                                    [% ELSE %]
470
                                                        [% basketgroup.name | html %] <span>(closed)</span>
471
                                                    [% END %]
472
                                                [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
473
                                                    [%- IF basketgroup.id -%]
474
                                                        [% basketgroup.name | html %]
475
                                                    [%- ELSE -%]
476
                                                        <span>No group</span>
477
                                                    [%- END -%]
478
                                                [% ELSE %]
479
                                                    [% IF ( CAN_user_acquisition_group_manage ) %]
480
                                                        [% IF ( basketgroup.id ) %]
481
                                                            <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basket.booksellerid | uri %]&amp;basketgroupid=[% basketgroup.id | uri %]">
482
                                                                [% basketgroup.name | html %]
483
                                                            </a>
484
                                                            <a href="#" id="set_basket_group"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Change basket group</a>
485
                                                        [% ELSE %]
486
                                                            No group
487
                                                            <a href="#" id="set_basket_group"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set basket group</a>
488
                                                        [% END %]
489
                                                    [% END %]
490
                                                [% END %]
491
                                            </li>
492
                                            [% IF ( CAN_user_acquisition_group_manage ) %]
493
                                                <li id="basket_grouping" style="display:none;">
494
                                                    <span class="label">&nbsp;</span>
495
                                                    <div style="float:left">
496
                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
497
                                                            [% INCLUDE 'csrf-token.inc' %]
498
                                                            <select id="basketgroupid" name="basketgroupid">
499
                                                                <option value="">No group</option>
500
                                                                [% FOREACH bg IN basketgroups %]
501
                                                                    [% IF ( bg.default ) %]
502
                                                                        <option value="[% bg.id | html %]" selected="selected">[% bg.name | html %]</option>
503
                                                                    [% ELSE %]
422
                                                                    [% ELSE %]
504
                                                                        [% UNLESS bg.closed %]
423
                                                                        [% basketgroup.name | html %] <span>(closed)</span>
505
                                                                            <option value="[% bg.id | html %]">[% bg.name | html %]</option>
424
                                                                    [% END %]
425
                                                                [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
426
                                                                    [%- IF basketgroup.id -%]
427
                                                                        [% basketgroup.name | html %]
428
                                                                    [%- ELSE -%]
429
                                                                        <span>No group</span>
430
                                                                    [%- END -%]
431
                                                                [% ELSE %]
432
                                                                    [% IF ( CAN_user_acquisition_group_manage ) %]
433
                                                                        [% IF ( basketgroup.id ) %]
434
                                                                            <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basket.booksellerid | uri %]&amp;basketgroupid=[% basketgroup.id | uri %]">
435
                                                                                [% basketgroup.name | html %]
436
                                                                            </a>
437
                                                                            <a href="#" id="set_basket_group"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Change basket group</a>
506
                                                                        [% ELSE %]
438
                                                                        [% ELSE %]
507
                                                                            <option value="[% bg.id | html %]" disabled="disabled">[% bg.name | html %] <span>(closed)</span></option>
439
                                                                            No group
440
                                                                            <a href="#" id="set_basket_group"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set basket group</a>
508
                                                                        [% END %]
441
                                                                        [% END %]
509
                                                                    [% END %]
442
                                                                    [% END %]
510
                                                                [% END %]
443
                                                                [% END %]
511
                                                                <option value="new">Add new group</option>
444
                                                            </li>
512
                                                            </select>
445
                                                            [% IF ( CAN_user_acquisition_group_manage ) %]
513
                                                            <a href="#" id="basket_group_cancel" class="cancel">Cancel</a>
446
                                                                <li id="basket_grouping" style="display:none;">
514
                                                            <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
447
                                                                    <span class="label">&nbsp;</span>
515
                                                            <input type="hidden" value="cud-mod_basket" name="op" />
448
                                                                    <div style="float:left">
516
                                                            <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
449
                                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
517
                                                        </form>
450
                                                                            [% INCLUDE 'csrf-token.inc' %]
518
                                                    </div>
451
                                                                            <select id="basketgroupid" name="basketgroupid">
519
                                                </li>
452
                                                                                <option value="">No group</option>
520
                                            [% END # /IF ( CAN_user_acquisition_group_manage ) %]
453
                                                                                [% FOREACH bg IN basketgroups %]
521
                                            [% IF basketgroup.deliveryplace %]
454
                                                                                    [% IF ( bg.default ) %]
522
                                                <li> <span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) | html %] </li>
455
                                                                                        <option value="[% bg.id | html %]" selected="selected">[% bg.name | html %]</option>
523
                                            [% END %]
456
                                                                                    [% ELSE %]
524
                                            [% IF basketgroup.billingplace %]
457
                                                                                        [% UNLESS bg.closed %]
525
                                                <li> <span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) | html %] </li>
458
                                                                                            <option value="[% bg.id | html %]">[% bg.name | html %]</option>
526
                                            [% END %]
459
                                                                                        [% ELSE %]
527
                                        </ol>
460
                                                                                            <option value="[% bg.id | html %]" disabled="disabled">[% bg.name | html %] <span>(closed)</span></option>
528
                                    [% END # /IF closeddate %]
461
                                                                                        [% END %]
529
                                </div>
462
                                                                                    [% END %]
530
                                <!-- /.page-section -->
463
                                                                                [% END %]
531
                            </div>
464
                                                                                <option value="new">Add new group</option>
532
                            <!-- /.rows -->
465
                                                                            </select>
533
                        </div>
466
                                                                            <a href="#" id="basket_group_cancel" class="cancel">Cancel</a>
534
                        <!-- /#acqui_basket_summary.row -->
467
                                                                            <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
535
                    [% END # /IF ( basketno ) %]
468
                                                                            <input type="hidden" value="cud-mod_basket" name="op" />
469
                                                                            <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
470
                                                                        </form>
471
                                                                    </div>
472
                                                                </li>
473
                                                            [% END # /IF ( CAN_user_acquisition_group_manage ) %]
474
                                                            [% IF basketgroup.deliveryplace %]
475
                                                                <li>
476
                                                                    <span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) | html %]
477
                                                                </li>
478
                                                            [% END %]
479
                                                            [% IF basketgroup.billingplace %]
480
                                                                <li>
481
                                                                    <span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) | html %]
482
                                                                </li>
483
                                                            [% END %]
484
                                                        </ol>
485
                                                    [% END # /IF closeddate %]
486
                                                </div> <!-- /.page-section -->
487
                                            </div> <!-- /.rows -->
488
                                    </div> <!-- /#acqui_basket_summary.row -->
489
                                [% END # /IF ( basketno ) %]
536
490
537
                    [% IF ( duplinbatch ) %]
491
                                [% IF ( duplinbatch ) %]
538
                        <div class="alert alert-warning">
492
                                    <div class="alert alert-warning">
539
                            <h4>Duplicate warning</h4>
493
                                        <h4>Duplicate warning</h4>
540
                            <p
494
                                        <p>Some records have not been automatically added because they match an existing record in your catalog:<a href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=[% duplinbatch | uri %]&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]" title="Open in new window" target="_blank" style="margin-left:10px"><i class="fa-solid fa-window-restore"></i> Display them</a></p>
541
                                >Some records have not been automatically added because they match an existing record in your catalog:<a
495
                                    </div>
542
                                    href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=[% duplinbatch | uri %]&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]"
496
                                [% END %]
543
                                    title="Open in new window"
544
                                    target="_blank"
545
                                    style="margin-left:10px"
546
                                    ><i class="fa-solid fa-window-restore"></i> Display them</a
547
                                ></p
548
                            >
549
                        </div>
550
                    [% END %]
551
497
552
                    [% IF ( books_loop ) %]
498
                                [% IF ( books_loop ) %]
553
                        <div id="acqui_basket_content" class="page-section">
499
                                    <div id="acqui_basket_content" class="page-section">
554
                            <h2>Orders</h2>
500
                                        <h2>Orders</h2>
555
                            <table id="orders">
501
                                        <table id="orders">
556
                                <thead>
502
                                            <thead>
557
                                    <tr>
503
                                                <tr>
558
                                        <th>No.</th>
504
                                                    <th>No.</th>
559
                                        <th>[% tp('noun', 'Order') | html %]</th>
505
                                                    <th>[% tp('noun', 'Order') | html %]</th>
560
                                        <th>RRP tax exc.</th>
506
                                                    <th>RRP tax exc.</th>
561
                                        <th>Actual cost tax exc.</th>
507
                                                    <th>Actual cost tax exc.</th>
562
                                        <th>Budgeted cost tax exc.</th>
508
                                                    <th>Budgeted cost tax exc.</th>
563
                                        <th>RRP tax inc.</th>
509
                                                    <th>RRP tax inc.</th>
564
                                        <th>Actual cost tax inc.</th>
510
                                                    <th>Actual cost tax inc.</th>
565
                                        <th>Budgeted cost tax inc.</th>
511
                                                    <th>Budgeted cost tax inc.</th>
566
                                        <th>Replacement price</th>
512
                                                    <th>Replacement price</th>
567
                                        <th>Qty.</th>
513
                                                    <th>Qty.</th>
568
                                        <th>Total tax exc. ([% currency | html %])</th>
514
                                                    <th>Total tax exc. ([% currency | html %])</th>
569
                                        <th>Total tax inc. ([% currency | html %])</th>
515
                                                    <th>Total tax inc. ([% currency | html %])</th>
570
                                        <th>GST %</th>
516
                                                    <th>GST %</th>
571
                                        <th>GST</th>
517
                                                    <th>GST</th>
572
                                        <th>Fund</th>
518
                                                    <th>Fund</th>
573
                                        <th>Estimated delivery date</th>
519
                                                    <th>Estimated delivery date</th>
574
                                        <th>Statistic 1</th>
520
                                                    <th>Statistic 1</th>
575
                                        <th>Statistic 2</th>
521
                                                    <th>Statistic 2</th>
576
                                        <th>Invoice</th>
522
                                                    <th>Invoice</th>
577
                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
523
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
578
                                            <th>Supplier report</th>
524
                                                        <th>Supplier report</th>
579
                                        [% END %]
525
                                                    [% END %]
580
                                        <th class="NoSort noExport">Place hold</th>
526
                                                    <th class="NoSort">Place hold</th>
581
                                        [% IF ( active && !closedate ) %]
527
                                                    [% IF ( active && !closedate ) %]
582
                                            <th class="NoSort noExport">Modify</th>
528
                                                            <th class="NoSort">Modify</th>
583
                                        [% END %]
529
                                                    [% END %]
584
                                        [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
530
                                                    [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
585
                                            <th class="NoSort noExport">Cancel order</th>
531
                                                        <th class="NoSort">Cancel order</th>
586
                                        [% END %]
532
                                                    [% END %]
587
                                    </tr>
533
                                                </tr>
588
                                </thead>
534
                                            </thead>
589
                                <tfoot>
535
                                            <tfoot>
590
                                    [% FOREACH foot_loo IN book_foot_loop %]
536
                                                [% FOREACH foot_loo IN book_foot_loop %]
591
                                        <tr>
537
                                                    <tr>
592
                                            <th></th>
538
                                                        <th></th>
593
                                            <th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th>
539
                                                        <th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th>
594
                                            <th>&nbsp;</th>
540
                                                        <th>&nbsp;</th>
595
                                            <th>&nbsp;</th>
541
                                                        <th>&nbsp;</th>
596
                                            <th>&nbsp;</th>
542
                                                        <th>&nbsp;</th>
597
                                            <th>&nbsp;</th>
543
                                                        <th>&nbsp;</th>
598
                                            <th>&nbsp;</th>
544
                                                        <th>&nbsp;</th>
599
                                            <th>&nbsp;</th>
545
                                                        <th>&nbsp;</th>
600
                                            <th>&nbsp;</th>
546
                                                        <th>&nbsp;</th>
601
                                            <th>[% foot_loo.quantity | html %]</th>
547
                                                        <th>[% foot_loo.quantity | html %]</th>
602
                                            <th>[% foot_loo.total_tax_excluded | $Price %]</th>
548
                                                        <th>[% foot_loo.total_tax_excluded | $Price %]</th>
603
                                            <th>[% foot_loo.total_tax_included | $Price %]</th>
549
                                                        <th>[% foot_loo.total_tax_included | $Price %]</th>
604
                                            <th>&nbsp;</th>
550
                                                        <th>&nbsp;</th>
605
                                            <th>[% foot_loo.tax_value | $Price %]</th>
551
                                                        <th>[% foot_loo.tax_value | $Price %]</th>
606
                                            <th>&nbsp;</th>
552
                                                        <th>&nbsp;</th>
607
                                            <th>&nbsp;</th>
553
                                                        <th>&nbsp;</th>
608
                                            <th>&nbsp;</th>
554
                                                        <th>&nbsp;</th>
609
                                            <th>&nbsp;</th>
555
                                                        <th>&nbsp;</th>
610
                                            <th>&nbsp;</th>
556
                                                        <th>&nbsp;</th>
611
                                            [% IF Koha.Preference('EDIFACT') && ediaccount %]
557
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
612
                                                <th>&nbsp;</th>
558
                                                            <th>&nbsp;</th>
613
                                            [% END %]
559
                                                        [% END %]
614
                                            <th>&nbsp;</th>
560
                                                        <th>&nbsp;</th>
615
                                            [% IF ( active && !closedate ) %]
561
                                                        [% IF ( active && !closedate ) %]
616
                                                <th>&nbsp;</th>
562
                                                            <th>&nbsp;</th>
617
                                            [% END %]
563
                                                        [% END %]
618
                                            [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
564
                                                        [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
619
                                                <th>&nbsp;</th>
565
                                                            <th>&nbsp;</th>
620
                                            [% END %]
566
                                                        [% END %]
621
                                        </tr>
567
                                                    </tr>
622
                                    [% END %]
568
                                                [% END %]
623
                                    <tr>
569
                                                <tr>
624
                                        <th></th>
570
                                                    <th></th>
625
                                        <th>Total ([% currency | html %])</th>
571
                                                    <th>Total ([% currency | html %])</th>
626
                                        <th>&nbsp;</th>
572
                                                    <th>&nbsp;</th>
627
                                        <th>&nbsp;</th>
573
                                                    <th>&nbsp;</th>
628
                                        <th>&nbsp;</th>
574
                                                    <th>&nbsp;</th>
629
                                        <th>&nbsp;</th>
575
                                                    <th>&nbsp;</th>
630
                                        <th>&nbsp;</th>
576
                                                    <th>&nbsp;</th>
631
                                        <th>&nbsp;</th>
577
                                                    <th>&nbsp;</th>
632
                                        <th>&nbsp;</th>
578
                                                    <th>&nbsp;</th>
633
                                        <th>[% total_quantity | html %]</th>
579
                                                    <th>[% total_quantity | html %]</th>
634
                                        <th>[% total_tax_excluded | $Price %]</th>
580
                                                    <th>[% total_tax_excluded | $Price %]</th>
635
                                        <th>[% total_tax_included | $Price %]</th>
581
                                                    <th>[% total_tax_included | $Price %]</th>
636
                                        <th>&nbsp;</th>
582
                                                    <th>&nbsp;</th>
637
                                        <th>[% total_tax_value | $Price %]</th>
583
                                                    <th>[% total_tax_value | $Price %]</th>
638
                                        <th>&nbsp;</th>
584
                                                    <th>&nbsp;</th>
639
                                        <th>&nbsp;</th>
585
                                                    <th>&nbsp;</th>
640
                                        <th>&nbsp;</th>
586
                                                    <th>&nbsp;</th>
641
                                        <th>&nbsp;</th>
587
                                                    <th>&nbsp;</th>
642
                                        <th>&nbsp;</th>
588
                                                    <th>&nbsp;</th>
643
                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
589
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
644
                                            <th>&nbsp;</th>
590
                                                        <th>&nbsp;</th>
645
                                        [% END %]
591
                                                    [% END %]
646
                                        <th>&nbsp;</th>
592
                                                    <th>&nbsp;</th>
647
                                        [% IF ( active && !closedate ) %]
593
                                                    [% IF ( active && !closedate ) %]
648
                                            <th>&nbsp;</th>
594
                                                        <th>&nbsp;</th>
649
                                        [% END %]
595
                                                    [% END %]
650
                                        [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
596
                                                    [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
651
                                            <th>&nbsp;</th>
597
                                                        <th>&nbsp;</th>
652
                                        [% END %]
598
                                                    [% END %]
653
                                    </tr>
599
                                                </tr>
654
                                </tfoot>
600
                                            </tfoot>
655
                                <tbody>
601
                                            <tbody>
656
                                    [% FOREACH books_loo IN books_loop %]
602
                                    [% FOREACH books_loo IN books_loop %]
657
                                        [% IF ( books_loo.order_received ) %]
603
                                        [% IF ( books_loo.order_received ) %]
658
                                            [% SET tr_class = "disabled" %]
604
                                            [% SET tr_class = "disabled" %]
659
                                        [% END %]
605
                                        [% END %]
660
                                        <tr class="[% tr_class | html %]">
606
                                        <tr class="[% tr_class | html %]">
661
                                            <td> [% books_loo.ordernumber | html %] </td>
607
                                                        <td>
662
                                            <td>
608
                                                            [% books_loo.ordernumber | html %]
663
                                                <p>
609
                                                        </td>
664
                                                    [% IF ( books_loo.order_received ) %]<span class="order-received">(received)</span>[% END %]
610
                                                        <td>
665
                                                    [% IF books_loo.title %]
611
                                                            <p>
666
                                                        [% INCLUDE 'biblio-title.inc' biblio=books_loo link = 1 %]
612
                                                                [% IF ( books_loo.order_received ) %] <span class="order-received">(received)</span>[% END %]
667
                                                        [% IF books_loo.author %]by [% books_loo.author | html %][% END %]
613
                                                                [% IF books_loo.title %]
668
                                                    [% ELSIF books_loo.deleted_biblio %]
614
                                                                    [% INCLUDE 'biblio-title.inc' biblio=books_loo link = 1 %] [% IF books_loo.author %] by [% books_loo.author | html %][% END %]
669
                                                        [% INCLUDE 'biblio-title.inc' biblio=books_loo.deleted_biblio %]
615
                                                                [% ELSIF books_loo.deleted_biblio %]
670
                                                        <br />(Deleted bibliographic record)
616
                                                                    [% INCLUDE 'biblio-title.inc' biblio=books_loo.deleted_biblio %]
671
                                                    [% ELSE %]
617
                                                                    <br/>(Deleted bibliographic record)
672
                                                        <em>Deleted bibliographic record, can't find title</em><br />
618
                                                                [% ELSE %]
673
                                                    [%- END %]
619
                                                                    <em>Deleted bibliographic record, can't find title</em><br />
674
                                                    <br />
620
                                                                [%- END %]
675
                                                    [%- IF ( books_loo.isbn ) %]- [% books_loo.isbn | html %][% END -%]
621
                                                                <br />
676
                                                    [%- IF ( books_loo.issn ) %]- [% books_loo.issn | html %][% END -%]
622
                                                                [%- IF ( books_loo.isbn ) %] - [% books_loo.isbn | html %][% END -%]
677
                                                    [%- IF ( books_loo.publishercode ) %], [% books_loo.publishercode | html %][% END -%]
623
                                                                [%- IF ( books_loo.issn ) %] - [% books_loo.issn | html %][% END -%]
678
                                                    [%- IF ( books_loo.publicationyear ) %]
624
                                                                [%- IF ( books_loo.publishercode ) %], [% books_loo.publishercode | html %][% END -%]
679
                                                        , [% books_loo.publicationyear | html -%]
625
                                                                [%- IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear | html -%]
680
                                                    [%- ELSIF ( books_loo.copyrightdate ) %]
626
                                                                [%- ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate | html %][% END -%]
681
                                                        [% books_loo.copyrightdate | html %]
627
                                                                [%- IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END -%]
682
                                                    [% END -%]
628
                                                                [%- IF ( books_loo.suggestionid ) %]
683
                                                    [%- IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END -%]
629
                                                                    <br/>
684
                                                    [%- IF ( books_loo.suggestionid ) %]
630
                                                                    Suggested by: [% books_loo.surnamesuggestedby | html %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby | html %] [% END %]
685
                                                        <br />
631
                                                                    (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid | uri %]&amp;op=show">suggestion #[% books_loo.suggestionid | html %]</a>)
686
                                                        Suggested by: [% books_loo.surnamesuggestedby | html %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby | html %][% END %] (<a
632
                                                                [% END %]
687
                                                            href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid | uri %]&amp;op=show"
633
                                                            </p>
688
                                                            >suggestion #[% books_loo.suggestionid | html %]</a
634
                                                            [% IF ( books_loo.order_internalnote ) %]
689
                                                        >)
635
                                                                <p class="ordernote"><strong>Internal note: </strong><span id="internal-note-[% books_loo.ordernumber | html %]">[% books_loo.order_internalnote | html %]</span> <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal" title="Edit internal note"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit internal note</a></p>
690
                                                    [% END %]
636
                                                            [% ELSE %]
691
                                                </p>
637
                                                                <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal" title="Add internal note"><i class="fa fa-plus"></i> Add internal note</a>
692
                                                [% IF ( books_loo.order_internalnote ) %]
638
                                                            [% END %]
693
                                                    <p class="ordernote"
639
                                                            [% IF ( books_loo.order_vendornote ) %]
694
                                                        ><strong>Internal note: </strong><span id="internal-note-[% books_loo.ordernumber | html %]">[% books_loo.order_internalnote | html %]</span>
640
                                                                <p class="ordernote"><strong>Vendor note: </strong> <span id="vendor-note-[% books_loo.ordernumber | html %]">[% books_loo.order_vendornote | html %]</span> <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor" title="Edit vendor note"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit vendor note</a></p>
695
                                                        <a
641
                                                            [% ELSE %]
696
                                                            class="edit_note noExport"
642
                                                                <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor" title="Add vendor note"><i class="fa fa-plus"></i> Add vendor note</a>
697
                                                            data-ordernumber="[% books_loo.ordernumber | html %]"
643
                                                            [% END %]
698
                                                            data-note_type="internal"
644
                                                            [% IF (books_loo.transferred_from) %]
699
                                                            href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal"
645
                                                                [% basket = books_loo.transferred_from.basket %]
700
                                                            title="Edit internal note"
646
                                                                [% bookseller = books_loo.transferred_from.bookseller %]
701
                                                            ><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit internal note</a
647
                                                                [% timestamp = books_loo.transferred_from.timestamp %]
702
                                                        ></p
648
                                                                <p>
703
                                                    >
649
                                                                    Transferred from basket:
704
                                                [% ELSE %]
650
                                                                    <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
705
                                                    <a
651
                                                                    (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>)
706
                                                        class="edit_note noExport"
652
                                                                    on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
707
                                                        data-ordernumber="[% books_loo.ordernumber | html %]"
653
                                                                    [% timestamp | $KohaDates %]
708
                                                        data-note_type="internal"
654
                                                                    </span>
709
                                                        href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal"
655
                                                                </p>
710
                                                        title="Add internal note"
656
                                                            [% END %]
711
                                                        ><i class="fa fa-plus"></i> Add internal note</a
657
                                                            [% SET claims = books_loo.order_object.claims %]
712
                                                    >
658
                                                            [% IF claims.count %]
713
                                                [% END %]
659
                                                                <p>
714
                                                [% IF ( books_loo.order_vendornote ) %]
660
                                                                    This order has been claimed [% claims.count | html %] times. On [% FOR c IN claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %]
715
                                                    <p class="ordernote"
661
                                                                </p>
716
                                                        ><strong>Vendor note: </strong> <span id="vendor-note-[% books_loo.ordernumber | html %]">[% books_loo.order_vendornote | html %]</span>
662
                                                            [% END %]
717
                                                        <a
663
                                                        </td>
718
                                                            class="edit_note noExport"
664
                                                        [% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %]
719
                                                            data-ordernumber="[% books_loo.ordernumber | html %]"
665
                                                        [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
720
                                                            data-note_type="vendor"
666
                                                        <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">
721
                                                            href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor"
667
                                                            [% books_loo.rrp_tax_excluded | $Price %] [% IF ( books_loo.uncertainprice ) %] <span>(Uncertain)</span> [% END %]
722
                                                            title="Edit vendor note"
668
                                                        </td>
723
                                                            ><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit vendor note</a
669
                                                        <td class="number [% IF books_loo.unitprice_tax_excluded.search(zero_regex) %]error[% END %]">
724
                                                        ></p
670
                                                            [% books_loo.unitprice_tax_excluded | $Price %]
725
                                                    >
671
                                                        </td>
726
                                                [% ELSE %]
672
                                                        <td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">
727
                                                    <a
673
                                                            [% books_loo.ecost_tax_excluded | $Price %]
728
                                                        class="edit_note noExport"
674
                                                        </td>
729
                                                        data-ordernumber="[% books_loo.ordernumber | html %]"
675
                                                        <td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">
730
                                                        data-note_type="vendor"
676
                                                            [% books_loo.rrp_tax_included | $Price %]
731
                                                        href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor"
677
                                                        </td>
732
                                                        title="Add vendor note"
678
                                                        <td class="number [% IF books_loo.unitprice_tax_included.search(zero_regex) %]error[% END %]">
733
                                                        ><i class="fa fa-plus"></i> Add vendor note</a
679
                                                            [% books_loo.unitprice_tax_included | $Price %]
734
                                                    >
680
                                                        </td>
735
                                                [% END %]
681
                                                        <td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">
736
                                                [% IF (books_loo.transferred_from) %]
682
                                                            [% books_loo.ecost_tax_included | $Price %]
737
                                                    [% basket = books_loo.transferred_from.basket %]
683
                                                        </td>
738
                                                    [% bookseller = books_loo.transferred_from.bookseller %]
684
                                                        <td class="number [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">
739
                                                    [% timestamp = books_loo.transferred_from.timestamp %]
685
                                                            [% books_loo.replacementprice | $Price %]
740
                                                    <p>
686
                                                        </td>
741
                                                        Transferred from basket:
687
                                                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">
742
                                                        <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
688
                                                            [% books_loo.quantity | html %]
743
                                                        (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>) on
689
                                                        </td>
744
                                                        <span title="[% timestamp | $KohaDates with_hours = 1 %]"> [% timestamp | $KohaDates %] </span>
690
                                                        <td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">
745
                                                    </p>
691
                                                            [% books_loo.total_tax_excluded | $Price %]
746
                                                [% END %]
692
                                                        </td>
747
                                                [% SET claims = books_loo.order_object.claims %]
693
                                                        <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">
748
                                                [% IF claims.count %]
694
                                                            [% books_loo.total_tax_included | $Price %]
749
                                                    <p> This order has been claimed [% claims.count | html %] times. On [% FOR c IN claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %],[% END %][% END %] </p>
695
                                                        </td>
750
                                                [% END %]
696
                                                        <td class="number">
751
                                            </td>
697
                                                            [% books_loo.tax_rate * 100 | html %]
752
                                            [% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %]
698
                                                        </td>
753
                                            [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
699
                                                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">
754
                                            <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">
700
                                                            [% books_loo.tax_value | $Price %]
755
                                                [% books_loo.rrp_tax_excluded | $Price %] [% IF ( books_loo.uncertainprice ) %]<span>(Uncertain)</span>[% END %]
701
                                                        </td>
756
                                            </td>
702
                                                        <td>
757
                                            <td class="number [% IF books_loo.unitprice_tax_excluded.search(zero_regex) %]error[% END %]"> [% books_loo.unitprice_tax_excluded | $Price %] </td>
703
                                                            [% books_loo.budget_name | html %]
758
                                            <td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]"> [% books_loo.ecost_tax_excluded | $Price %] </td>
704
                                                        </td>
759
                                            <td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.rrp_tax_included | $Price %] </td>
705
                                                        <td data-order="[% books_loo.estimated_delivery_date | html %]" class="actions">
760
                                            <td class="number [% IF books_loo.unitprice_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.unitprice_tax_included | $Price %] </td>
706
                                                            [% books_loo.estimated_delivery_date | $KohaDates %]
761
                                            <td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.ecost_tax_included | $Price %] </td>
707
                                                            [% IF CAN_user_acquisition_order_manage %]
762
                                            <td class="number [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]"> [% books_loo.replacementprice | $Price %] </td>
708
                                                                    <a class="edit_delivery_date" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% books_loo.ordernumber | html %]" title="Edit delivery date" data-ordernumber="[% books_loo.ordernumber | html %]" id="delivery_date_[% books_loo.ordernumber | html %]" data-delivery_date="[% books_loo.estimated_delivery_date | html %]">
763
                                            <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]"> [% books_loo.quantity | html %] </td>
709
                                                                    <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
764
                                            <td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]"> [% books_loo.total_tax_excluded | $Price %] </td>
710
                                                            [% END %]
765
                                            <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.total_tax_included | $Price %] </td>
711
                                                        </td>
766
                                            <td class="number"> [% books_loo.tax_rate * 100 | html %] </td>
712
                                                        <td>[% AuthorisedValues.GetByCode( books_loo.sort1_authcat, books_loo.sort1 ) | html %]</td>
767
                                            <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]"> [% books_loo.tax_value | $Price %] </td>
713
                                                        <td>[% AuthorisedValues.GetByCode( books_loo.sort2_authcat, books_loo.sort2 ) | html %]</td>
768
                                            <td> [% books_loo.budget_name | html %] </td>
714
                                                        <td>
769
                                            <td data-order="[% books_loo.estimated_delivery_date | html %]" class="actions">
715
                                                            [% IF CAN_user_acquisition_edit_invoices %]
770
                                                [% books_loo.estimated_delivery_date | $KohaDates %]
716
                                                                <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% books_loo.invoice_object.invoiceid | url %]" class="invoice">[% books_loo.invoice_object.invoicenumber | html %]</a>
771
                                                [% IF CAN_user_acquisition_order_manage %]
717
                                                            [% ELSE %]
772
                                                    <a
718
                                                                [% books_loo.invoice_object.invoicenumber | html %]
773
                                                        class="edit_delivery_date"
719
                                                            [% END %]
774
                                                        href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% books_loo.ordernumber | html %]"
720
                                                        </td>
775
                                                        title="Edit delivery date"
776
                                                        data-ordernumber="[% books_loo.ordernumber | html %]"
777
                                                        id="delivery_date_[% books_loo.ordernumber | html %]"
778
                                                        data-delivery_date="[% books_loo.estimated_delivery_date | html %]"
779
                                                    >
780
                                                        <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a
781
                                                    >
782
                                                [% END %]
783
                                            </td>
784
                                            <td>[% AuthorisedValues.GetByCode( books_loo.sort1_authcat, books_loo.sort1 ) | html %]</td>
785
                                            <td>[% AuthorisedValues.GetByCode( books_loo.sort2_authcat, books_loo.sort2 ) | html %]</td>
786
                                            <td>
787
                                                [% IF CAN_user_acquisition_edit_invoices %]
788
                                                    <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% books_loo.invoice_object.invoiceid | url %]" class="invoice">[% books_loo.invoice_object.invoicenumber | html %]</a>
789
                                                [% ELSE %]
790
                                                    [% books_loo.invoice_object.invoicenumber | html %]
791
                                                [% END %]
792
                                            </td>
793
721
794
                                            [% IF Koha.Preference('EDIFACT') && ediaccount %]
722
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
795
                                                <td>[% books_loo.suppliers_report | html %]</td>
723
                                                            <td>[% books_loo.suppliers_report | html %]</td>
796
                                            [% END %]
797
                                            <td>
798
                                                [% IF ( books_loo.biblionumber && CAN_user_reserveforothers_place_holds ) %]
799
                                                    <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% books_loo.biblionumber | uri %]"> Place hold </a>
800
                                                [% END %]
801
                                            </td>
802
                                            [% IF ( active && !closedate ) %]
803
                                                <td>
804
                                                    [% UNLESS (books_loo.order_received) %]
805
                                                        <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Modify</a>
806
                                                        <br />
807
                                                        <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
808
                                                    [% END %]
809
                                                </td>
810
                                            [% END %]
811
                                            [% IF ( !closedate || Koha.Preference('CancelOrdersInClosedBaskets') ) %]
812
                                                <td>
813
                                                    [% IF ( books_loo.orderstatus != "complete") %]
814
                                                        [% IF ( books_loo.left_holds_on_order ) %]
815
                                                            <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br />
816
                                                        [% ELSE %]
817
                                                            <a
818
                                                                href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]"
819
                                                                class="button"
820
                                                                >Cancel order</a
821
                                                            ><br />
822
                                                        [% END %]
823
                                                        [% IF ( books_loo.can_del_bib ) %]
824
                                                            <a
825
                                                                href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]"
826
                                                                class="button"
827
                                                                >Cancel order and delete catalog record</a
828
                                                            ><br />
829
                                                        [% ELSE %]
830
                                                            <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br />
831
                                                        [% END %]
724
                                                        [% END %]
832
                                                        [% IF ( books_loo.left_item ) %]
725
                                                        <td>
833
                                                            <strong title="Can't delete catalog record, because of [% books_loo.items | html %] existing hold(s)">[% books_loo.items | html %] item(s) left</strong><br />
726
                                                            [% IF ( books_loo.biblionumber && CAN_user_reserveforothers_place_holds ) %]
834
                                                        [% END %]
727
                                                                <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% books_loo.biblionumber | uri %]">
835
                                                        [% IF ( books_loo.left_biblio ) %]
728
                                                                    Place hold
836
                                                            <strong title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios | html %] order(s) left</strong><br />
729
                                                                </a>
837
                                                        [% END %]
730
                                                            [% END %]
838
                                                        [% IF ( books_loo.left_subscription ) %]
731
                                                        </td>
839
                                                            <strong title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions | html %] subscription(s) left</strong><br />
732
                                                        [% IF ( active && !closedate ) %]
733
                                                            <td>
734
                                                                [% UNLESS (books_loo.order_received) %]
735
                                                                    <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Modify</a>
736
                                                                    <br />
737
                                                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
738
                                                                    <br />
739
                                                                [% END %]
740
                                                                [% UNLESS ( books_loo.suggestionid ) %]
741
                                                                    <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;link_order=[% books_loo.ordernumber | uri %]">Search for suggestion to link</a>
742
                                                                [% END %]
743
                                                            </td>
840
                                                        [% END %]
744
                                                        [% END %]
841
                                                        [% IF ( books_loo.left_holds ) %]
745
                                                        [% IF ( !closedate || Koha.Preference('CancelOrdersInClosedBaskets') ) %]
842
                                                            <strong title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds | html %] hold(s) left</strong>
746
                                                            <td>
747
                                                                [% IF ( books_loo.orderstatus != "complete") %]
748
                                                                    [% IF ( books_loo.left_holds_on_order ) %]
749
                                                                        <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br>
750
                                                                    [% ELSE %]
751
                                                                        <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br>
752
                                                                    [% END %]
753
                                                                    [% IF ( books_loo.can_del_bib ) %]
754
                                                                        <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br>
755
                                                                    [% ELSE %]
756
                                                                        <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
757
                                                                    [% END %]
758
                                                                    [% IF ( books_loo.left_item ) %]
759
                                                                        <strong title="Can't delete catalog record, because of [% books_loo.items | html %] existing hold(s)" >[% books_loo.items | html %] item(s) left</strong><br>
760
                                                                    [% END %]
761
                                                                    [% IF ( books_loo.left_biblio ) %]
762
                                                                        <strong title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios | html %] order(s) left</strong><br>
763
                                                                    [% END %]
764
                                                                    [% IF ( books_loo.left_subscription ) %]
765
                                                                        <strong title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions | html %] subscription(s) left</strong><br>
766
                                                                    [% END %]
767
                                                                    [% IF ( books_loo.left_holds ) %]
768
                                                                        <strong title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds | html %] hold(s) left</strong>
769
                                                                    [% END %]
770
                                                                [% END %]
771
                                                            </td>
843
                                                        [% END %]
772
                                                        [% END %]
844
                                                    [% END %]
773
                                                    </tr>
845
                                                </td>
774
                                                [% END %]
846
                                            [% END %]
775
                                            </tbody>
847
                                        </tr>
776
                                        </table> <!-- /#orders -->
848
                                    [% END %]
777
                                        [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>[% END %]
849
                                </tbody>
778
                                    </div> <!-- /#acqui_basket_content -->
850
                            </table>
779
                                [% END # / IF ( books_loop ) %]
851
                            <!-- /#orders -->
852
                            [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>[% END %]
853
                        </div>
854
                        <!-- /#acqui_basket_content -->
855
                    [% END # / IF ( books_loop ) %]
856
780
857
                    [% IF (cancelledorders_loop) %]
781
                                [% IF (cancelledorders_loop) %]
858
                        <div id="cancelledorders" class="page-section">
782
                                    <div id="cancelledorders" class="page-section">
859
                            <h2>Cancelled orders</h2>
783
                                        <h2>Cancelled orders</h2>
860
                            <table id="cancelledorderst">
784
                                        <table id="cancelledorderst">
861
                                <thead>
785
                                            <thead>
862
                                    <tr>
786
                                                <tr>
863
                                        <th>No.</th>
787
                                                    <th>No.</th>
864
                                        <th>[% tp('noun', 'Order') | html %]</th>
788
                                                    <th>[% tp('noun', 'Order') | html %]</th>
865
                                        <th class="tax_excluded">RRP tax exc.</th>
789
                                                    <th class="tax_excluded">RRP tax exc.</th>
866
                                        <th class="tax_excluded">ecost tax exc.</th>
790
                                                    <th class="tax_excluded">ecost tax exc.</th>
867
                                        <th class="tax_included">RRP tax inc.</th>
791
                                                    <th class="tax_included">RRP tax inc.</th>
868
                                        <th class="tax_included">ecost tax inc.</th>
792
                                                    <th class="tax_included">ecost tax inc.</th>
869
                                        <th class="replacementprice">Replacement price</th>
793
                                                    <th class="replacementprice">Replacement price</th>
870
                                        <th>Qty.</th>
794
                                                    <th>Qty.</th>
871
                                        <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
795
                                                    <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
872
                                        <th class="tax_included">Total tax inc. ([% currency | html %])</th>
796
                                                    <th class="tax_included">Total tax inc. ([% currency | html %])</th>
873
                                        <th>GST %</th>
797
                                                    <th>GST %</th>
874
                                        <th>GST</th>
798
                                                    <th>GST</th>
875
                                        <th>Fund</th>
799
                                                    <th>Fund</th>
876
                                        <th>Delete order</th>
800
                                                    <th>Delete order</th>
877
                                    </tr>
801
                                                </tr>
878
                                </thead>
802
                                            </thead>
879
                                <tbody>
803
                                            <tbody>
880
                                    [% FOREACH order IN cancelledorders_loop %]
804
                                                [% FOREACH order IN cancelledorders_loop %]
881
                                        <tr style="color:grey">
805
                                                    <tr style="color:grey">
882
                                            <td> [% order.ordernumber | html %] </td>
806
                                                        <td>
883
                                            <td>
807
                                                            [% order.ordernumber | html %]
884
                                                <p>
808
                                                        </td>
885
                                                    [% IF ( order.order_received ) %]<span class="order-received">(received)</span>[% END %]
809
                                                        <td>
886
                                                    [% IF (order.title) %]
810
                                                            <p>
887
                                                        [% order.title | html %][% IF order.author %]by [% order.author | html %][% END %]
811
                                                                [% IF ( order.order_received ) %] <span class="order-received">(received)</span>[% END %]
888
                                                    [% ELSIF order.deleted_biblio %]
812
                                                                [% IF (order.title) %]
889
                                                        [% INCLUDE 'biblio-title.inc' biblio=order.deleted_biblio %]
813
                                                                    [% order.title | html %][% IF order.author %] by [% order.author | html %][% END %]
890
                                                        <br />(Deleted bibliographic record)
814
                                                                [% ELSIF order.deleted_biblio %]
891
                                                    [% ELSE %]
815
                                                                    [% INCLUDE 'biblio-title.inc' biblio=order.deleted_biblio %]
892
                                                        <em>Deleted bibliographic record, can't find title</em>
816
                                                                    <br/>(Deleted bibliographic record)
893
                                                    [% END %]
817
                                                                [% ELSE %]
894
                                                    <br />
818
                                                                    <em>Deleted bibliographic record, can't find title</em>
895
                                                    [% IF ( order.order_internalnote ) %][% order.order_internalnote | html %][% END %]
819
                                                                [% END %]
896
                                                    [% IF ( order.isbn ) %]- [% order.isbn | html %][% END %]
820
                                                                <br />
897
                                                    [% IF ( order.issn ) %]- [% order.issn | html %][% END %]
821
                                                                [% IF ( order.order_internalnote ) %] [% order.order_internalnote | html %][% END %]
898
                                                    [% IF ( order.publishercode ) %], [% order.publishercode | html %][% END %]
822
                                                                [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
899
                                                    [% IF ( order.publicationyear ) %]
823
                                                                [% IF ( order.issn ) %] - [% order.issn | html %][% END %]
900
                                                        , [% order.publicationyear | html %]
824
                                                                [% IF ( order.publishercode ) %], [% order.publishercode | html %][% END %]
901
                                                    [% ELSIF ( order.copyrightdate ) %]
825
                                                                [% IF ( order.publicationyear ) %]
902
                                                        [% order.copyrightdate | html %]
826
                                                                    , [% order.publicationyear | html %]
903
                                                    [% END %]
827
                                                                [% ELSIF ( order.copyrightdate ) %]
904
                                                    [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END %]
828
                                                                    [% order.copyrightdate | html %]
905
                                                    [% IF ( order.cancellationreason ) %]
829
                                                                [% END %]
906
                                                        <br />
830
                                                                [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END %]
907
                                                        Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) | html %]
831
                                                                [% IF ( order.cancellationreason ) %]
832
                                                                    <br />
833
                                                                    Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) | html %]
834
                                                                [% END %]
835
                                                            </p>
836
                                                            [% IF order.transferred_to %]
837
                                                                [% basket = order.transferred_to.basket %]
838
                                                                [% bookseller = order.transferred_to.bookseller %]
839
                                                                [% timestamp = order.transferred_to.timestamp %]
840
                                                                <p>Transferred to basket:
841
                                                                    <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
842
                                                                    (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>)
843
                                                                    on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
844
                                                                        [% timestamp | $KohaDates %]
845
                                                                    </span>
846
                                                                </p>
847
                                                            [% END %]
848
                                                        </td>
849
                                                        <td class="number">
850
                                                            [% order.rrp_tax_excluded | $Price %]
851
                                                            [% IF ( order.uncertain ) %]
852
                                                                <span>(Uncertain)</span>
853
                                                            [% END %]
854
                                                        </td>
855
                                                        <td class="number">[% order.ecost_tax_excluded | $Price %]</td>
856
                                                        <td class="number">[% order.rrp_tax_included | $Price %]</td>
857
                                                        <td class="number">[% order.ecost_tax_included | $Price %]</td>
858
                                                        <td class="number">[% order.replacementprice | $Price %]</td>
859
                                                        <td class="number">[% order.quantity | html %]</td>
860
                                                        <td class="number">[% order.total_tax_excluded | $Price %]</td>
861
                                                        <td class="number">[% order.total_tax_included | $Price %]</td>
862
                                                        <td class="number">[% order.tax_rate * 100 | html %]</td>
863
                                                        <td class="number">[% order.tax_value | $Price %]</td>
864
                                                        <td>[% order.budget_name | html %]</td>
865
                                                        <td>
866
                                                            [% UNLESS closedate %]<a class="delete_order" href="#" data-ordernumber="[% order.ordernumber | html %]" data-biblionumber="[% order.biblionumber | html %]">Delete</a>[% END %]
867
                                                        </td>
868
                                                    </tr>
869
                                                [% END # /FOREACH order %]
870
                                            </tbody>
871
                                        </table> <!-- /#cancelledorderst -->
872
                                        <form id="delete_order_form" method="post">
873
                                            [% INCLUDE 'csrf-token.inc' %]
874
                                            <input type="hidden" name="op" value="cud-delete-order"/>
875
                                            <input type="hidden" name="ordernumber" value=""/>
876
                                            <input type="hidden" name="basketno" value="[% basketno | html %]"/>
877
                                        </form>
878
                                    </div> <!-- /#cancelledorders -->
879
                                [% END # /IF (cancelledorders_loop) %]
880
                                <br />
881
882
                                [% UNLESS ( closedate ) %]
883
                                    <!-- Modal -->
884
                                    <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true" data-basketno="[% basket.basketname | html %]">
885
                                        <div class="modal-dialog">
886
                                            <div class="modal-content">
887
                                                <div class="modal-header">
888
                                                    <h1 class="modal-title" id="addtoBasketLabel">Add order to basket</h1>
889
                                                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
890
                                                </div>
891
                                                <div class="modal-body">
892
                                                    [% IF active %]
893
                                                        [% INCLUDE 'acquisitions-add-to-basket.inc' %]
908
                                                    [% END %]
894
                                                    [% END %]
909
                                                </p>
895
                                                </div>
910
                                                [% IF order.transferred_to %]
896
                                                <div class="modal-footer">
911
                                                    [% basket = order.transferred_to.basket %]
897
                                                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
912
                                                    [% bookseller = order.transferred_to.bookseller %]
898
                                                </div>
913
                                                    [% timestamp = order.transferred_to.timestamp %]
899
                                            </div><!-- /.modal-content -->
914
                                                    <p
900
                                        </div><!-- /.modal-dialog -->
915
                                                        >Transferred to basket:
901
                                    </div><!-- /.modal#addtoBasket -->
916
                                                        <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
902
                                [% END # /UNLESS ( closedate ) %]
917
                                                        (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>) on
903
918
                                                        <span title="[% timestamp | $KohaDates with_hours = 1 %]"> [% timestamp | $KohaDates %] </span>
904
                            [% END # /IF ( delete_confirmed ) %]
919
                                                    </p>
905
                        [% END # /IF ( NO_BOOKSELLER ) %]
920
                                                [% END %]
906
                    [% ELSE %]
921
                                            </td>
907
                        <!-- if we want just to select a basketgroup for a closed basket -->
922
                                            <td class="number">
908
                    [% END #/IF !confirm_close && !edi_confirm  %]
923
                                                [% order.rrp_tax_excluded | $Price %]
909
924
                                                [% IF ( order.uncertain ) %]
910
                    [% IF ( confirm_close ) %]
925
                                                    <span>(Uncertain)</span>
911
                        <div id="closebasket_needsconfirmation" class="alert alert-warning">
926
                                                [% END %]
912
927
                                            </td>
913
                            <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
928
                                            <td class="number">[% order.ecost_tax_excluded | $Price %]</td>
929
                                            <td class="number">[% order.rrp_tax_included | $Price %]</td>
930
                                            <td class="number">[% order.ecost_tax_included | $Price %]</td>
931
                                            <td class="number">[% order.replacementprice | $Price %]</td>
932
                                            <td class="number">[% order.quantity | html %]</td>
933
                                            <td class="number">[% order.total_tax_excluded | $Price %]</td>
934
                                            <td class="number">[% order.total_tax_included | $Price %]</td>
935
                                            <td class="number">[% order.tax_rate * 100 | html %]</td>
936
                                            <td class="number">[% order.tax_value | $Price %]</td>
937
                                            <td>[% order.budget_name | html %]</td>
938
                                            <td> [% UNLESS closedate %]<a class="delete_order" href="#" data-ordernumber="[% order.ordernumber | html %]" data-biblionumber="[% order.biblionumber | html %]">Delete</a>[% END %] </td>
939
                                        </tr>
940
                                    [% END # /FOREACH order %]
941
                                </tbody>
942
                            </table>
943
                            <!-- /#cancelledorderst -->
944
                            <form id="delete_order_form" method="post">
945
                                [% INCLUDE 'csrf-token.inc' %]
914
                                [% INCLUDE 'csrf-token.inc' %]
946
                                <input type="hidden" name="op" value="cud-delete-order" />
915
                                <h1>Are you sure you want to close basket [% basketname | html %]?</h1>
947
                                <input type="hidden" name="ordernumber" value="" />
916
                                [% IF ( CAN_user_acquisition_group_manage ) %]
917
                                    <p>
918
                                        <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
919
                                        <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
920
                                    </p>
921
                                [% END %]
922
                                <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
923
                                <input type="hidden" value="cud-close" name="op" />
924
                                <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
925
                                <input type="hidden" name="confirm" value="1" />
926
                                <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
927
                                <button type="submit" class="btn btn-default approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
928
                            </form>
929
                            <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
948
                                <input type="hidden" name="basketno" value="[% basketno | html %]" />
930
                                <input type="hidden" name="basketno" value="[% basketno | html %]" />
931
                                <button type="submit" class="btn btn-default deny" accesskey="n"><i class="fa fa-fw fa-times"></i> No, don't close (N)</button>
949
                            </form>
932
                            </form>
950
                        </div>
933
                        </div>
951
                        <!-- /#cancelledorders -->
934
                    [% END # /IF ( confirm_close ) %]
952
                    [% END # /IF (cancelledorders_loop) %]
953
                    <br />
954
935
955
                    [% UNLESS ( closedate ) %]
936
                    [% IF edi_confirm %]
956
                        <!-- Modal -->
937
                        <div id="closebasket_needsconfirmation" class="alert alert-warning">
957
                        <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true" data-basketno="[% basket.basketname | html %]">
938
                            <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
958
                            <div class="modal-dialog">
939
                                [% INCLUDE 'csrf-token.inc' %]
959
                                <div class="modal-content">
940
                                <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname | html %]?</h1>
960
                                    <div class="modal-header">
941
                                [% IF CAN_user_acquisition_group_manage %]
961
                                        <h1 class="modal-title" id="addtoBasketLabel">Add order to basket</h1>
942
                                    <p>
962
                                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
943
                                        <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
963
                                    </div>
944
                                        <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
964
                                    <div class="modal-body">
945
                                    </p>
965
                                        [% IF active %]
946
                                [% END %]
966
                                            [% INCLUDE 'acquisitions-add-to-basket.inc' %]
947
                                <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
967
                                        [% END %]
948
                                <input type="hidden" value="cud-ediorder" name="op" />
968
                                    </div>
949
                                <input type="hidden" name="ean" value="[% ean | html %]" />
969
                                    <div class="modal-footer">
950
                                <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
970
                                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
951
                                <input type="hidden" name="confirm" value="1" />
971
                                    </div> </div
952
                                <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
972
                                ><!-- /.modal-content --> </div
953
                                <button type="submit" class="btn btn-default approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
973
                            ><!-- /.modal-dialog --> </div
954
                            </form>
974
                        ><!-- /.modal#addtoBasket -->
955
                            <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
975
                    [% END # /UNLESS ( closedate ) %]
956
                                <input type="hidden" name="basketno" value="[% basketno | html %]" />
976
                [% END # /IF ( delete_confirmed ) %]
957
                                <button type="submit" class="btn btn-default deny" accesskey="N"><i class="fa fa-fw fa-times"></i> No, don't close (N)</button>
977
            [% END # /IF ( NO_BOOKSELLER ) %]
958
                            </form>
978
        [% ELSE %]
959
                        </div> <!-- /#closebasket_needsconfirmation -->
979
            <!-- if we want just to select a basketgroup for a closed basket -->
960
                    [% END # /IF edi_confirm %]
980
        [% END #/IF !confirm_close && !edi_confirm %]
961
                [% END # /IF (cannot_manage_basket) %]
962
            </main>
963
        </div> <!-- /.col-md-10 order-md-2 order-sm-2 -->
981
964
982
        [% IF ( confirm_close ) %]
965
        <div class="col-md-2 order-sm-2 order-md-1">
983
            <div id="closebasket_needsconfirmation" class="alert alert-warning">
966
            <aside>
984
                <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
967
                [% INCLUDE 'vendor-menu.inc' %]
985
                    [% INCLUDE 'csrf-token.inc' %]
968
                [% INCLUDE 'acquisitions-menu.inc' %]
986
                    <h1>Are you sure you want to close basket [% basketname | html %]?</h1>
969
            </aside>
987
                    [% IF ( CAN_user_acquisition_group_manage ) %]
970
        </div> <!-- /.col-md-2 order-sm-2 order-md-1 -->
988
                        <p>
971
    </div> <!-- /.row -->
989
                            <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
990
                            <input type="checkbox" id="createbasketgroup" name="createbasketgroup" />
991
                        </p>
992
                    [% END %]
993
                    <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
994
                    <input type="hidden" value="cud-close" name="op" />
995
                    <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
996
                    <input type="hidden" name="confirm" value="1" />
997
                    <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
998
                    <button type="submit" class="btn btn-default approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
999
                </form>
1000
                <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
1001
                    <input type="hidden" name="basketno" value="[% basketno | html %]" />
1002
                    <button type="submit" class="btn btn-default deny" accesskey="n"><i class="fa fa-fw fa-times"></i> No, don't close (N)</button>
1003
                </form>
1004
            </div>
1005
        [% END # /IF ( confirm_close ) %]
1006
972
1007
        [% IF edi_confirm %]
1008
            <div id="closebasket_needsconfirmation" class="alert alert-warning">
1009
                <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
1010
                    [% INCLUDE 'csrf-token.inc' %]
1011
                    <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname | html %]?</h1>
1012
                    [% IF CAN_user_acquisition_group_manage %]
1013
                        <p>
1014
                            <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
1015
                            <input type="checkbox" id="createbasketgroup" name="createbasketgroup" />
1016
                        </p>
1017
                    [% END %]
1018
                    <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
1019
                    <input type="hidden" value="cud-ediorder" name="op" />
1020
                    <input type="hidden" name="ean" value="[% ean | html %]" />
1021
                    <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
1022
                    <input type="hidden" name="confirm" value="1" />
1023
                    <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
1024
                    <button type="submit" class="btn btn-default approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
1025
                </form>
1026
                <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
1027
                    <input type="hidden" name="basketno" value="[% basketno | html %]" />
1028
                    <button type="submit" class="btn btn-default deny" accesskey="N"><i class="fa fa-fw fa-times"></i> No, don't close (N)</button>
1029
                </form>
1030
            </div>
1031
            <!-- /#closebasket_needsconfirmation -->
1032
        [% END # /IF edi_confirm %]
1033
    [% END # /IF (cannot_manage_basket) %]
1034
[% END %]
1035
973
1036
<!-- Modal for editing vendor and internal notes -->
974
    <!-- Modal for editing vendor and internal notes -->
1037
<div class="modal" id="noteEditor" tabindex="-1" role="dialog" aria-labelledby="noteEditorLabel">
975
    <div class="modal" id="noteEditor" tabindex="-1" role="dialog" aria-labelledby="noteEditorLabel">
1038
    <div class="modal-dialog">
976
        <div class="modal-dialog">
1039
        <form id="modify_order_notes" action="/cgi-bin/koha/acqui/modordernotes.pl" method="post">
977
            <form id="modify_order_notes" action="/cgi-bin/koha/acqui/modordernotes.pl" method="post">
1040
            [% INCLUDE 'csrf-token.inc' %]
978
                [% INCLUDE 'csrf-token.inc' %]
1041
            <div class="modal-content">
979
                <div class="modal-content">
1042
                <div class="modal-header">
980
                    <div class="modal-header">
1043
                    <h1 class="modal-title" id="noteEditorLabel">Order note</h1>
981
                        <h1 class="modal-title" id="noteEditorLabel">Order note</h1>
1044
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
982
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
1045
                </div>
983
                    </div>
1046
                <div class="modal-body">
984
                    <div class="modal-body">
1047
                    <textarea id="ordernotes" name="ordernotes" rows="3" cols="30" class="focus">[% ordernotes | html %]</textarea>
985
                        <textarea id="ordernotes" name="ordernotes" rows="3" cols="30" class="focus">[% ordernotes | html %]</textarea>
1048
                    <input type="hidden" id="ordernumber" name="ordernumber" value="" />
986
                        <input type="hidden" id="ordernumber" name="ordernumber" value="" />
1049
                    <input type="hidden" name="op" value="cud-save" />
987
                        <input type="hidden" name="op" value="cud-save" />
1050
                    <input type="hidden" id="type" name="type" value="" />
988
                        <input type="hidden" id="type" name="type" value="" />
1051
                </div>
989
                    </div>
1052
                <div class="modal-footer">
990
                    <div class="modal-footer">
1053
                    <button type="submit" class="btn btn-primary">Save</button>
991
                        <button type="submit" class="btn btn-primary">Save</button>
1054
                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
992
                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
1055
                </div>
993
                    </div>
1056
            </div>
994
                </div> <!-- /.modal-content -->
1057
            <!-- /.modal-content -->
995
            </form> <!-- /#modify_order_notes -->
1058
        </form>
996
        </div> <!-- /.modal-dialog -->
1059
        <!-- /#modify_order_notes -->
997
    </div> <!-- /.modal#noteEditor -->
1060
    </div>
1061
    <!-- /.modal-dialog -->
1062
</div>
1063
<!-- /.modal#noteEditor -->
1064
998
1065
<!-- Modal for editing estimated delivery date -->
999
    <!-- Modal for editing estimated delivery date -->
1066
<div class="modal" id="dateEditor" tabindex="-1" role="dialog" aria-labelledby="dateEditorLabel">
1000
    <div class="modal" id="dateEditor" tabindex="-1" role="dialog" aria-labelledby="dateEditorLabel">
1067
    <div class="modal-dialog">
1001
        <div class="modal-dialog">
1068
        <form id="modify_estimated_delivery_date" action="/cgi-bin/koha/acqui/moddeliverydate.pl" method="post">
1002
            <form id="modify_estimated_delivery_date" action="/cgi-bin/koha/acqui/moddeliverydate.pl" method="post">
1069
            [% INCLUDE 'csrf-token.inc' %]
1003
                [% INCLUDE 'csrf-token.inc' %]
1070
            <div class="modal-content">
1004
                <div class="modal-content">
1071
                <div class="modal-header">
1005
                    <div class="modal-header">
1072
                    <h1 class="modal-title" id="dateEditorLabel">Estimated delivery date</h1>
1006
                        <h1 class="modal-title" id="dateEditorLabel">Estimated delivery date</h1>
1073
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
1007
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
1074
                </div>
1008
                    </div>
1075
                <div class="modal-body">
1009
                    <div class="modal-body">
1076
                    <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% books_loo.estimated_delivery_date | html %]" />
1010
                        <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% books_loo.estimated_delivery_date | html %]"/>
1077
                    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1011
                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1078
                    <input type="hidden" id="date_ordernumber" name="ordernumber" value="" />
1012
                        <input type="hidden" id="date_ordernumber" name="ordernumber" value="" />
1079
                    <input type="hidden" name="op" value="cud-save" />
1013
                        <input type="hidden" name="op" value="cud-save" />
1080
                </div>
1014
                    </div>
1081
                <div class="modal-footer">
1015
                    <div class="modal-footer">
1082
                    <button type="submit" class="btn btn-primary">Save</button>
1016
                        <button type="submit" class="btn btn-primary">Save</button>
1083
                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
1017
                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
1084
                </div>
1018
                    </div>
1085
            </div>
1019
                </div> <!-- /.modal-content -->
1086
            <!-- /.modal-content -->
1020
            </form> <!-- /#modify_estimated_delivery_date -->
1087
        </form>
1021
        </div> <!-- /.modal-dialog -->
1088
        <!-- /#modify_estimated_delivery_date -->
1022
    </div> <!-- /.modal#dateEditor -->
1089
    </div>
1090
    <!-- /.modal-dialog -->
1091
</div>
1092
<!-- /.modal#dateEditor -->
1093
1023
1094
[% MACRO jsinclude BLOCK %]
1024
[% MACRO jsinclude BLOCK %]
1095
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
1025
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
Lines 1184-1189 Link Here
1184
            });
1114
            });
1185
        });
1115
        });
1186
    </script>
1116
    </script>
1117
1187
    [% UNLESS ( closedate ) %]
1118
    [% UNLESS ( closedate ) %]
1188
        <script>
1119
        <script>
1189
            function transfer_order_popup(ordernumber) {
1120
            function transfer_order_popup(ordernumber) {
Lines 1312-1317 Link Here
1312
            $("#add_user_submit").show();
1243
            $("#add_user_submit").show();
1313
        }
1244
        }
1314
    </script>
1245
    </script>
1246
1315
    [% INCLUDE 'select2.inc' %]
1247
    [% INCLUDE 'select2.inc' %]
1316
    [% SET columns = ['cardnumber','name','category','branch','action'] %]
1248
    [% SET columns = ['cardnumber','name','category','branch','action'] %]
1317
    [% SET filter = 'baskets_managers' %]
1249
    [% SET filter = 'baskets_managers' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt (-97 / +116 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Koha %]
3
[% USE Branches %]
2
[% USE Branches %]
4
[% USE Price %]
3
[% USE Price %]
5
[% USE Asset %]
4
[% USE Asset %]
Lines 38-141 Link Here
38
    [% END #/ WRAPPER breadcrumbs %]
37
    [% END #/ WRAPPER breadcrumbs %]
39
[% END #/ WRAPPER sub-header.inc %]
38
[% END #/ WRAPPER sub-header.inc %]
40
39
41
[% WRAPPER 'main-container.inc' aside='acquisitions-menu' %]
40
<div class="main container-fluid">
42
    <h1>Suggestions</h1>
41
    <div class="row">
42
        <div class="col-md-10 order-md-2 order-sm-2">
43
            <main>
44
                [% INCLUDE 'messages.inc' %]
43
45
44
    <div class="page-section">
46
                <h1>Suggestions</h1>
45
        [% IF suggestions.size %]
47
46
            <a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a>
48
                <div class="page-section">
47
            <table id="suggestionst">
49
                    [% IF suggestions.size %]
48
                <thead>
50
                        <a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a>
49
                    <tr>
51
                        <table id="suggestionst">
50
                        <th>Mine</th>
52
                            <thead>
51
                        <th>Suggestion</th>
53
                                <tr>
52
                        <th>Document type</th>
54
                                    <th>Mine</th>
53
                        <th>Suggested by</th>
55
                                    <th>Suggestion</th>
54
                        <th>Accepted by</th>
56
                                    <th>Document type</th>
55
                        <th>Library</th>
57
                                    <th>Suggested by</th>
56
                        <th>Fund</th>
58
                                    <th>Accepted by</th>
57
                        <th>Price</th>
59
                                    <th>Library</th>
58
                        <th>Quantity</th>
60
                                    <th>Fund</th>
59
                        <th>Total</th>
61
                                    <th>Price</th>
60
                        <th>&nbsp;</th>
62
                                    <th>Quantity</th>
61
                    </tr>
63
                                    <th>Total</th>
62
                </thead>
64
                                    <th>&nbsp;</th>
63
                <tbody>
65
                                </tr>
64
                    [% FOREACH suggestion IN suggestions %]
66
                            </thead>
65
                        <tr>
67
                            <tbody>
66
                            <td>[% suggestion.managedby | html %]</td>
68
                                [% FOREACH suggestion IN suggestions %]
67
                            <td>
69
                                    <tr>
68
                                <p>[% suggestion.title | html %] - [% suggestion.author | html %]</p>
70
                                        <td>[% suggestion.managedby | html %]</td>
69
                                <p>
71
                                        <td>
70
                                    [% IF ( suggestion.copyrightdate ) %]&copy; [% suggestion.copyrightdate | html %][% END %]
72
                                            <p>[% suggestion.title | html %] - [% suggestion.author | html %]</p>
71
                                    [% IF ( suggestion.volumedesc ) %]volume: <em>[% suggestion.volumedesc | html %]</em>[% END %]
73
                                            <p>
72
                                    [% IF ( suggestion.isbn ) %]ISBN: <em>[% suggestion.isbn | html %]</em>[% END %]
74
                                                [% IF ( suggestion.copyrightdate ) %]&copy; [% suggestion.copyrightdate | html %][% END %]
73
                                    [% IF ( suggestion.publishercode ) %]<br />published by: [% suggestion.publishercode | html %][% END %]
75
                                                [% IF ( suggestion.volumedesc ) %]volume: <em>[% suggestion.volumedesc | html %]</em>[% END %]
74
                                    [% IF ( suggestion.publicationyear ) %]in <em>[% suggestion.publicationyear | html %]</em>[% END %]
76
                                                [% IF ( suggestion.isbn ) %]ISBN: <em>[% suggestion.isbn | html %]</em>[% END %]
75
                                    [% IF ( suggestion.place ) %]in <em>[% suggestion.place | html %]</em>[% END %]
77
                                                [% IF ( suggestion.publishercode ) %]<br />published by: [% suggestion.publishercode | html %][% END %]
76
                                    [% IF ( suggestion.note ) %]<p><em>([% suggestion.note | html %])</em></p>[% END %]
78
                                                [% IF ( suggestion.publicationyear ) %]in <em>[% suggestion.publicationyear | html %]</em>[% END %]
77
                                </p>
79
                                                [% IF ( suggestion.place ) %]in <em>[% suggestion.place | html %]</em>[% END %]
78
                            </td>
80
                                                [% IF ( suggestion.note ) %]<p><em>([% suggestion.note | html %])</em></p>[% END %]
79
                            <td>[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype ) | html %]</td>
81
                                            </p>
80
                            <td>[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</td>
82
                                        </td>
81
                            <td>[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</td>
83
                                        <td>[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype ) | html %]</td>
82
                            <td> [% Branches.GetName(suggestion.branchcode) | html %] </td>
84
                                        <td>[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</td>
83
                            <td> [% suggestion.fund.budget_name | html %] </td>
85
                                        <td>[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</td>
84
                            <td> [% suggestion.price | $Price %] </td>
86
                                        <td> [% Branches.GetName(suggestion.branchcode) | html %] </td>
85
                            <td>
87
                                        <td> [% suggestion.fund.budget_name | html %] </td>
86
                                [% IF (suggestion.quantity > 0) %]
88
                                        <td> [% suggestion.price | $Price %] </td>
87
                                    [% suggestion.quantity | html %]
89
                                        <td>
88
                                [% END %]
90
                                            [% IF (suggestion.quantity > 0) %]
89
                            </td>
91
                                                [% suggestion.quantity | html %]
90
                            <td> [% suggestion.total | $Price %] </td>
92
                                            [% END %]
91
                            <td class="actions">
93
                                        </td>
92
                                [% IF ( suggestion.biblionumber ) %]
94
                                        <td> [% suggestion.total | $Price %] </td>
93
                                    <a
95
                                        <td class="actions">
94
                                        href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]&amp;biblio=[% suggestion.biblionumber | uri %]"
96
                                            [% IF link_order %]
95
                                        class="btn btn-default btn-xs"
97
                                                <a
96
                                        ><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a
98
                                                    href="/cgi-bin/koha/acqui/newordersuggestion.pl?op=link_order&amp;link_order=[% link_order | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]"
97
                                    >
99
                                                    class="btn btn-default btn-xs"
98
                                [% ELSE %]
100
                                                    ><i class="fa fa-plus"></i> [% tp('verb', 'Link suggestion') | html %]</a
99
                                    <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]" class="btn btn-default btn-xs"
101
                                                >
100
                                        ><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a
102
                                            [% ELSIF ( suggestion.biblionumber ) %]
101
                                    >
103
                                                <a
104
                                                    href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]&amp;biblio=[% suggestion.biblionumber | uri %]"
105
                                                    class="btn btn-default btn-xs"
106
                                                    ><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a
107
                                                >
108
                                            [% ELSE %]
109
                                                <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]" class="btn btn-default btn-xs"
110
                                                    ><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a
111
                                                >
112
                                            [% END %]
113
                                        </td>
114
                                    </tr>
102
                                [% END %]
115
                                [% END %]
103
                            </td>
116
                            </tbody>
104
                        </tr>
117
                        </table>
118
                    [% ELSE %]
119
                        There are no outstanding (accepted) suggestions.
105
                    [% END %]
120
                    [% END %]
106
                </tbody>
121
                </div>
107
            </table>
122
                <!-- /.page-section -->
108
        [% ELSE %]
123
            </main>
109
            There are no outstanding (accepted) suggestions.
124
        </div>
110
        [% END %]
125
        <!-- /.col-md-10.order-md-2 -->
126
127
        <div class="col-md-2 order-sm-2 order-md-1">
128
            <aside> [% INCLUDE 'acquisitions-menu.inc' %] </aside>
129
        </div>
130
        <!-- /.col-md-2.order-md-1 -->
111
    </div>
131
    </div>
112
    <!-- /.page-section -->
132
    <!-- /.row -->
113
[% END %]
114
133
115
[% MACRO jsinclude BLOCK %]
134
    [% MACRO jsinclude BLOCK %]
116
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
135
        [% Asset.js("js/acquisitions-menu.js") | $raw %]
117
    [% INCLUDE 'datatables.inc' %]
136
        [% INCLUDE 'datatables.inc' %]
118
    [% INCLUDE 'calendar.inc' %]
137
        [% INCLUDE 'calendar.inc' %]
119
    <script>
138
        <script>
120
        $(document).ready(function() {
139
            $(document).ready(function() {
121
           var suggestionst = $("#suggestionst").kohaTable({
140
               var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
122
               columnDefs: [
141
                   "columnDefs": [
123
                   { targets: [0], visible: false, searchable: true }, // must be searchable for filtering
142
                       { "targets": [ 0 ],  "visible": false, "searchable":  true }, // must be searchable for filtering
124
                   { targets: [-1], orderable: false, searchable: false },
143
                       { "targets": [ -1 ], "orderable": false, "searchable":  false },
125
               ],
144
                   ],
126
               pagingType: "full",
145
                   "pagingType": "full"
127
           });
146
               }));
128
           let table_dt = suggestionst.DataTable();
147
               let table_dt = suggestionst.DataTable();
129
           $("#show_only_mine").on('click', function(e){
148
               $("#show_only_mine").on('click', function(e){
130
               e.preventDefault();
149
                   e.preventDefault();
131
               table_dt.columns(0).search('^[% logged_in_user.borrowernumber | html %]$', true).draw();
150
                   table_dt.columns(0).search('^[% logged_in_user.borrowernumber | html %]$', true).draw();
132
           });
151
               });
133
           $("#show_all").on('click', function(e){
152
               $("#show_all").on('click', function(e){
134
               e.preventDefault();
153
                   e.preventDefault();
135
               table_dt.columns(0).search("").draw();
154
                   table_dt.columns(0).search("").draw();
136
           });
155
               });
137
        });
156
            });
138
    </script>
157
        </script>
139
[% END %]
158
    [% END %]
140
159
141
[% INCLUDE 'intranet-bottom.inc' %]
160
    [% INCLUDE 'intranet-bottom.inc' %]</div
161
>
142
- 

Return to bug 31632