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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-559 / +664 lines)
Lines 26-39 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>[% FILTER collapse %]
29
<title
30
    [% tx("Basket {basketname} ({basketnumber}) for {vendor}", { basketname = basketname, basketnumber = basketno, vendor = booksellername }) | html %] &rsaquo;
30
    >[% FILTER collapse %]
31
    [% t("Acquisitions") | html %] &rsaquo;
31
        [% tx("Basket {basketname} ({basketnumber}) for {vendor}", { basketname = basketname, basketnumber = basketno, vendor = booksellername }) | html %]
32
    [% t("Koha") | html %]
32
        &rsaquo; [% t("Acquisitions") | html %] &rsaquo; [% t("Koha") | html %]
33
[% END %]</title>
33
    [% END %]</title
34
>
34
[% INCLUDE 'doc-head-close.inc' %]
35
[% INCLUDE 'doc-head-close.inc' %]
35
<style>
36
<style>
36
    .sortmsg {font-size: 80%;}
37
    .sortmsg {
38
        font-size: 80%;
39
    }
37
</style>
40
</style>
38
</head>
41
</head>
39
42
Lines 83-108 Link Here
83
                                [% UNLESS ( delete_confirmed ) %]
86
                                [% UNLESS ( delete_confirmed ) %]
84
                                    <div id="toolbar" class="btn-toolbar sticky fh-fixedHeader">
87
                                    <div id="toolbar" class="btn-toolbar sticky fh-fixedHeader">
85
                                        [% IF active %]
88
                                        [% IF active %]
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>
89
                                            <div class="btn-group"
90
                                                ><a href="#addtoBasket" role="button" class="btn btn-default" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div
91
                                            >
87
                                        [% END %]
92
                                        [% END %]
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>
93
                                        <div class="btn-group"
94
                                            ><a href="basketheader.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;op=add_form" class="btn btn-default" id="basketheadbutton"
95
                                                ><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit basket</a
96
                                            ></div
97
                                        >
89
                                        [% IF CAN_user_acquisition_delete_baskets %]
98
                                        [% IF CAN_user_acquisition_delete_baskets %]
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>
99
                                            <div class="btn-group"
100
                                                ><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
101
                                            >
91
                                        [% END %]
102
                                        [% END %]
92
                                        [% IF ( unclosable ) %]
103
                                        [% IF ( unclosable ) %]
104
93
                                        [% ELSIF ( uncertainprices ) %]
105
                                        [% ELSIF ( uncertainprices ) %]
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>
106
                                            <div class="btn-group"
107
                                                ><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&amp;owner=1" class="btn btn-default" id="uncertpricesbutton"
108
                                                    ><i class="fa-solid fa-dollar-sign"></i> Uncertain prices</a
109
                                                ></div
110
                                            >
95
                                            <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
111
                                            <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
96
                                                <a href="" class="btn btn-default disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close basket</a>
112
                                                <a href="" class="btn btn-default disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close basket</a>
97
                                            </div>
113
                                            </div>
98
                                        [% ELSE %]
114
                                        [% ELSE %]
99
                                            <div class="btn-group">
115
                                            <div class="btn-group">
100
                                                <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
116
                                                <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
101
                                                     [% INCLUDE 'csrf-token.inc' %]
117
                                                    [% INCLUDE 'csrf-token.inc' %]
102
                                                     <input type="hidden" name="op" value="cud-close">
118
                                                    <input type="hidden" name="op" value="cud-close" />
103
                                                     <input type="hidden" name="bookseller" value="[% booksellerid | html %]">
119
                                                    <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>
120
                                                    <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 %]">
121
                                                    <input type="hidden" name="basketno" value="[% basketno | html %]" />
106
                                                </form>
122
                                                </form>
107
                                            </div>
123
                                            </div>
108
                                        [% END %]
124
                                        [% END %]
Lines 111-134 Link Here
111
127
112
                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
128
                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
113
                                            [% UNLESS eans.size %]
129
                                            [% UNLESS eans.size %]
114
                                            <div class="btn-group" title="You must define an EAN in Administration -> Library EANs">
130
                                                <div class="btn-group" title="You must define an EAN in Administration -> Library EANs">
115
                                                <button class="btn btn-default btn-xs disabled" disabled="disabled" href="#"><i class="fa fa-download"></i> Create EDIFACT order</button>
131
                                                    <button class="btn btn-default btn-xs disabled" disabled="disabled" href="#"><i class="fa fa-download"></i> Create EDIFACT order</button>
116
                                            </div>
132
                                                </div>
117
                                            [% ELSE %]
133
                                            [% ELSE %]
118
                                            <div class="btn-group">
134
                                                <div class="btn-group">
119
                                                [% IF eans.size == 1 %]
135
                                                    [% IF eans.size == 1 %]
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>
136
                                                        <a
121
                                                [% ELSE %]
137
                                                            class="btn btn-default btn-xs submit-form-link"
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>
138
                                                            href="#"
123
                                                    <ul class="dropdown-menu">
139
                                                            data-ean="[% eans.0 | html %]"
124
                                                        [% FOREACH eanacct IN eans %]
140
                                                            data-basketno="[% basketno | html %]"
125
                                                        <li>
141
                                                            data-action="basket.pl"
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>
142
                                                            data-method="post"
127
                                                        </li>
143
                                                            data-op="cud-ediorder"
128
                                                        [% END %]
144
                                                            ><i class="fa fa-download"></i> Create EDIFACT order</a
129
                                                    </ul>
145
                                                        >
130
                                                [% END %]
146
                                                    [% ELSE %]
131
                                            </div>
147
                                                        <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>
148
                                                        <ul class="dropdown-menu">
149
                                                            [% FOREACH eanacct IN eans %]
150
                                                                <li>
151
                                                                    <a
152
                                                                        class="btn btn-default btn-xs submit-form-link"
153
                                                                        href="#"
154
                                                                        data-ean="[% eanacct.ean | html %]"
155
                                                                        data-basketno="[% basketno | html %]"
156
                                                                        data-action="basket.pl"
157
                                                                        data-method="post"
158
                                                                        data-op="cud-ediorder"
159
                                                                        >[% eanacct.branch.branchname | html %] ([% eanacct.ean | html %]) [% IF eanacct     .description %][[% eanacct.description | html %]][% END %]</a
160
                                                                    >
161
                                                                </li>
162
                                                            [% END %]
163
                                                        </ul>
164
                                                    [% END %]
165
                                                </div>
132
                                            [% END %]
166
                                            [% END %]
133
                                        [% END %]
167
                                        [% END %]
134
168
Lines 142-148 Link Here
142
                                                </form>
176
                                                </form>
143
                                            </div>
177
                                            </div>
144
                                        [% END %]
178
                                        [% END %]
145
                                    </div> <!-- /#toolbar -->
179
                                    </div>
180
                                    <!-- /#toolbar -->
146
                                [% END # / UNLESS ( delete_confirmed ) %]
181
                                [% END # / UNLESS ( delete_confirmed ) %]
147
182
148
                                <!-- Modal for confirm deletion box-->
183
                                <!-- Modal for confirm deletion box-->
Lines 195-218 Link Here
195
                                                        <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
230
                                                        <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
196
                                                    </form>
231
                                                    </form>
197
                                                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
232
                                                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
198
                                                </div> <!-- /.modal-footer -->
233
                                                </div>
234
                                                <!-- /.modal-footer -->
199
                                            [% END # /UNLESS book_foot_loop %]
235
                                            [% END # /UNLESS book_foot_loop %]
200
                                        </div> <!-- /.modal-content -->
236
                                        </div>
201
                                    </div> <!-- /.modal-dialog -->
237
                                        <!-- /.modal-content -->
202
                                </div> <!-- /.modal#deleteBasketModal -->
238
                                    </div>
239
                                    <!-- /.modal-dialog -->
240
                                </div>
241
                                <!-- /.modal#deleteBasketModal -->
203
                                <!-- End of Modal-->
242
                                <!-- End of Modal-->
204
                            [% ELSE # UNLESS ( closedate ) %]
243
                            [% ELSE # UNLESS ( closedate ) %]
205
                                <div id="toolbar" class="btn-toolbar">
244
                                <div id="toolbar" class="btn-toolbar">
206
                                    [% IF grouped %]
245
                                    [% IF grouped %]
207
                                        <div title="Can not reopen baskets that are part of a basket group." class="btn-group">
246
                                        <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>
247
                                            <div class="btn-group"
248
                                                ><a href="#" class="btn btn-default disabled" id="reopenbutton"><i class="fa-solid fa-rotate"></i> Reopen basket</a></div
249
                                            >
209
                                        </div>
250
                                        </div>
210
                                    [% ELSE %]
251
                                    [% ELSE %]
211
                                        <div class="btn-group">
252
                                        <div class="btn-group">
212
                                            <form action="basket.pl" method="post" id="reopenform">
253
                                            <form action="basket.pl" method="post" id="reopenform">
213
                                                [% INCLUDE 'csrf-token.inc' %]
254
                                                [% INCLUDE 'csrf-token.inc' %]
214
                                                <input type="hidden" name="op" value="cud-reopen">
255
                                                <input type="hidden" name="op" value="cud-reopen" />
215
                                                <input type="hidden" name="basketno" value="[% basketno | html %]">
256
                                                <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>
257
                                                <button type="submit" class="btn btn-default"><i class="fa-solid fa-rotate"></i> Reopen basket</button>
217
                                            </form>
258
                                            </form>
218
                                        </div>
259
                                        </div>
Lines 250-256 Link Here
250
                                    </div>
291
                                    </div>
251
                                    <a href="booksellers.pl">Go back to vendor page</a>
292
                                    <a href="booksellers.pl">Go back to vendor page</a>
252
                                [% ELSE %]
293
                                [% ELSE %]
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>
294
                                    <a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-sm">Show baskets for vendor [% booksellername | html %]</a>
295
                                    <a href="/cgi-bin/koha/acqui/booksellers.pl" class="btn btn-default btn-sm">Show all active baskets</a>
254
                                [% END # /IF (cannotdelbiblios) %]
296
                                [% END # /IF (cannotdelbiblios) %]
255
                            [% ELSE # IF ( delete_confirmed ) %]
297
                            [% ELSE # IF ( delete_confirmed ) %]
256
298
Lines 271-497 Link Here
271
                                    </div>
313
                                    </div>
272
                                [% END # /FOR m %]
314
                                [% END # /FOR m %]
273
315
274
                                <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for <a href="supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
316
                                <h1>[% UNLESS ( basketno ) %]New[% END %]Basket [% basketname | html %] ([% basketno | html %]) for <a href="supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
275
317
276
                                [% IF ( basketno ) %]
318
                                [% IF ( basketno ) %]
277
                                    <div id="acqui_basket_summary" class="row">
319
                                    <div id="acqui_basket_summary" class="row">
278
                                            <div class="col-md-6 col-sm-12">
320
                                        <div class="col-md-6 col-sm-12">
279
                                                <div class="page-section rows">
321
                                            <div class="page-section rows">
280
                                                    <h2>General information</h2>
322
                                                <h2>General information</h2>
281
                                                    <ol>
323
                                                <ol>
282
                                                        [% IF ( basketnote ) %]
324
                                                    [% IF ( basketnote ) %]
283
                                                            <li><span class="label">Internal note:</span> [% basketnote | html %]</li>
325
                                                        <li><span class="label">Internal note:</span> [% basketnote | html %]</li>
284
                                                        [% END %]
326
                                                    [% END %]
285
                                                        [% IF ( basketbooksellernote ) %]
327
                                                    [% IF ( basketbooksellernote ) %]
286
                                                            <li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>
328
                                                        <li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>
287
                                                        [% END %]
329
                                                    [% END %]
288
                                                        [% IF ( basketcontractno ) %]
330
                                                    [% IF ( basketcontractno ) %]
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>
331
                                                        <li
290
                                                        [% END %]
332
                                                            ><span class="label">Contract name:</span>
291
                                                        [% IF deliveryplace %]
333
                                                            <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno | uri %]&amp;booksellerid=[% booksellerid | uri %]">[% basketcontractname | html %]</a></li
292
                                                            <li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) | html %]</li>
334
                                                        >
293
                                                        [% END %]
335
                                                    [% END %]
294
                                                        [% IF billingplace %]
336
                                                    [% IF deliveryplace %]
295
                                                            <li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) | html %]</li>
337
                                                        <li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) | html %]</li>
296
                                                        [% END %]
338
                                                    [% END %]
297
                                                        [% IF ( authorisedbyname ) %]
339
                                                    [% IF billingplace %]
298
                                                            <li><span class="label">[% tp('basket created by', 'Created by:') | html %]</span>  [% authorisedbyname | html %]</li>
340
                                                        <li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) | html %]</li>
299
                                                        [% END %]
341
                                                    [% END %]
342
                                                    [% IF ( authorisedbyname ) %]
343
                                                        <li><span class="label">[% tp('basket created by', 'Created by:') | html %]</span> [% authorisedbyname | html %]</li>
344
                                                    [% END %]
300
345
301
                                                        [% IF ( creationdate ) %]
346
                                                    [% IF ( creationdate ) %]
302
                                                            <li><span class="label">Opened on:</span>  [% creationdate | $KohaDates %]</li>
347
                                                        <li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>
303
                                                        [% END %]
348
                                                    [% END %]
304
                                                        [% IF ( closedate ) %]
349
                                                    [% IF ( closedate ) %]
305
                                                            <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
350
                                                        <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
306
                                                        [% END %]
351
                                                    [% END %]
307
352
308
                                                        [% IF ( ediaccount ) %]
353
                                                    [% IF ( ediaccount ) %]
309
                                                            [%- BLOCK edi_status -%]
354
                                                        [%- BLOCK edi_status -%]
310
                                                                [%- SWITCH edi_order.status -%]
355
                                                            [%- SWITCH edi_order.status -%]
311
                                                                    [%- CASE 'pending'   -%]<span>Pending</span>
356
312
                                                                    [%- CASE 'sent'      -%]<span>Sent</span>
357
                                                            [%- CASE 'pending' -%]
313
                                                                    [%- CASE 'processed' -%]<span>Processed</span>
358
                                                                <span>Pending</span>
314
                                                                [%- END -%]
359
                                                            [%- CASE 'sent' -%]
360
                                                                <span>Sent</span>
361
                                                            [%- CASE 'processed' -%]
362
                                                                <span>Processed</span>
315
                                                            [%- END -%]
363
                                                            [%- END -%]
316
                                                            [% IF ( edi_order ) %]
364
                                                        [%- END -%]
317
                                                                <li><span class="label">EDI status:</span> [%- PROCESS edi_status edi_order=edi_order -%] ([% edi_order.transfer_date | $KohaDates %])</li>
365
                                                        [% IF ( edi_order ) %]
318
                                                            [% ELSE %]
366
                                                            <li><span class="label">EDI status:</span> [%- PROCESS edi_status edi_order=edi_order -%] ([% edi_order.transfer_date | $KohaDates %])</li>
319
                                                                <li><span class="label">EDI status:</span> Not ordered</li>
367
                                                        [% ELSE %]
320
                                                            [% END %]
368
                                                            <li><span class="label">EDI status:</span> Not ordered</li>
321
                                                        [% END %]
369
                                                        [% END %]
322
                                                        [% IF ( estimateddeliverydate ) %]
370
                                                    [% END %]
323
                                                            <li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>
371
                                                    [% IF ( estimateddeliverydate ) %]
324
                                                        [% END %]
372
                                                        <li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>
325
                                                        <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
373
                                                    [% END %]
374
                                                    <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
326
375
327
                                                        [% IF basket.create_items %]
376
                                                    [% IF basket.create_items %]
328
                                                            <li>
377
                                                        <li>
329
                                                                <span class="label">Create items when:</span>
378
                                                            <span class="label">Create items when:</span>
330
                                                                [% SWITCH basket.create_items %]
379
                                                            [% SWITCH basket.create_items %]
331
                                                                    [% CASE 'receiving' %]<span>Receiving items</span>
380
                                                            [% CASE 'receiving' %]
332
                                                                    [% CASE 'cataloguing' %]<span>Cataloguing items</span>
381
                                                                <span>Receiving items</span>
333
                                                                    [% CASE %]<span>Placing orders</span>
382
                                                            [% CASE 'cataloguing' %]
334
                                                                [% END %]
383
                                                                <span>Cataloguing items</span>
335
                                                            </li>
384
                                                            [% CASE %]
336
                                                        [% END %]
385
                                                                <span>Placing orders</span>
386
                                                            [% END %]
387
                                                        </li>
388
                                                    [% END %]
337
389
338
                                                        [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
390
                                                    [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
391
                                                </ol>
392
                                            </div>
393
                                            <!-- /.page-section -->
394
                                        </div>
395
                                        <!-- /.col-sm-6 -->
339
396
340
                                                    </ol>
397
                                        <div class="col-md-6 col-sm-12">
341
                                                </div> <!-- /.page-section -->
398
                                            <div class="page-section rows">
342
                                            </div> <!-- /.col-sm-6 -->
399
                                                <h2>Settings</h2>
343
400
344
                                            <div class="col-md-6 col-sm-12">
401
                                                <ol>
345
                                                <div class="page-section rows">
402
                                                    <li id="managedby">
346
                                                    <h2>Settings</h2>
403
                                                        <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
404
                                                            [% INCLUDE 'csrf-token.inc' %]
405
                                                            <span class="label">[% tp('Acquisitions basket managed by user', 'Managed by:') | html %]</span>
406
                                                            <div style="display:inline-block">
407
                                                                <ul id="users_names" style="padding-left:0">
408
                                                                    [% FOREACH user IN users %]
409
                                                                        <li id="user_[% user.borrowernumber | html %]">
410
                                                                            [% user.firstname | html %] [% user.surname | html %]
411
                                                                            <a href="#" data-borrowernumber="[% user.borrowernumber | html %]" class="del_user"><i class="fa fa-trash-can"></i> Delete user</a>
412
                                                                        </li>
413
                                                                    [% END %]
414
                                                                    <li>
415
                                                                        <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>
416
                                                                    </li>
417
                                                                    <li id="add_user_submit" style="display:none;">
418
                                                                        <button type="submit" class="btn btn-default btn-xs">Save changes</button>
419
                                                                    </li>
420
                                                                </ul>
421
                                                            </div>
422
                                                            <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
423
                                                            <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
424
                                                            <input type="hidden" id="op" name="op" value="cud-mod_users" />
425
                                                        </form>
426
                                                    </li>
427
                                                    <!-- /#managedby -->
428
                                                    <li id="branch">
429
                                                        <span class="label">Managing library:</span>
430
                                                        [% IF basketbranchcode %]
431
                                                            [% Branches.GetName( basketbranchcode ) | html %]
432
                                                            <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Change library</a>
433
                                                        [% ELSE %]
434
                                                            No library
435
                                                            <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set library</a>
436
                                                        [% END %]
437
                                                    </li>
438
                                                    <!-- /#branch -->
439
                                                    [% IF branches_loop.size %]
440
                                                        <li id="managing_library_entry" style="display:none;">
441
                                                            <span class="label">&nbsp;</span>
442
                                                            <div>
443
                                                                <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
444
                                                                    [% INCLUDE 'csrf-token.inc' %]
445
                                                                    <select id="select_managing_library" name="branch">
446
                                                                        <option value="">(no library)</option>
447
                                                                        [% FOREACH branch IN branches_loop %]
448
                                                                            [% IF ( basketbranchcode == branch.branchcode ) %]
449
                                                                                <option selected="selected" value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
450
                                                                            [% ELSE %]
451
                                                                                <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
452
                                                                            [% END %]
453
                                                                        [% END %]
454
                                                                    </select>
455
                                                                    <a id="library_entry_cancel" href="#" class="cancel">Cancel</a>
456
                                                                    <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
457
                                                                    <input type="hidden" id="op" name="op" value="cud-mod_branch" />
458
                                                                </form>
459
                                                            </div>
460
                                                        </li>
461
                                                        <!-- #/managing_library_entry -->
462
                                                    [% END # /IF branches_loop.size %]
463
                                                </ol>
347
464
465
                                                [% IF ( closedate ) %]
348
                                                    <ol>
466
                                                    <ol>
349
                                                        <li id="managedby">
467
                                                        <li>
350
                                                            <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
468
                                                            <span class="label">Basket group:</span>
351
                                                                [% INCLUDE 'csrf-token.inc' %]
469
                                                            [% IF basketgroup.id and not basketgroup.name %]
352
                                                                <span class="label">[% tp('Acquisitions basket managed by user', 'Managed by:') | html %]</span>
470
                                                                [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
353
                                                                <div style="display:inline-block">
471
                                                            [% END %]
354
                                                                    <ul id="users_names" style="padding-left:0">
355
                                                                        [% FOREACH user IN users %]
356
                                                                            <li id="user_[% user.borrowernumber | html %]">
357
                                                                                [% user.firstname | html %] [% user.surname | html %]
358
                                                                                <a href="#" data-borrowernumber="[% user.borrowernumber | html %]" class="del_user"><i class="fa fa-trash-can"></i> Delete user</a>
359
                                                                            </li>
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>
373
472
374
                                                        </li> <!-- /#managedby -->
473
                                                            [% IF basketgroup.closed %]
375
                                                        <li id="branch">
474
                                                                [% IF ( CAN_user_acquisition_group_manage ) %]
376
                                                            <span class="label">Managing library:</span>
475
                                                                    <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]" title="basketgroup"
377
                                                            [% IF basketbranchcode %]
476
                                                                        >[% basketgroup.name | html %] <span>(closed)</span></a
378
                                                                [% Branches.GetName( basketbranchcode ) | html %]
477
                                                                    >
379
                                                                <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Change library</a>
478
                                                                [% ELSE %]
479
                                                                    [% basketgroup.name | html %] <span>(closed)</span>
480
                                                                [% END %]
481
                                                            [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
482
                                                                [%- IF basketgroup.id -%]
483
                                                                    [% basketgroup.name | html %]
484
                                                                [%- ELSE -%]
485
                                                                    <span>No group</span>
486
                                                                [%- END -%]
380
                                                            [% ELSE %]
487
                                                            [% ELSE %]
381
                                                                No library
488
                                                                [% IF ( CAN_user_acquisition_group_manage ) %]
382
                                                                <a href="#" id="set_managing_library"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set library</a>
489
                                                                    [% IF ( basketgroup.id ) %]
490
                                                                        <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basket.booksellerid | uri %]&amp;basketgroupid=[% basketgroup.id | uri %]">
491
                                                                            [% basketgroup.name | html %]
492
                                                                        </a>
493
                                                                        <a href="#" id="set_basket_group"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Change basket group</a>
494
                                                                    [% ELSE %]
495
                                                                        No group
496
                                                                        <a href="#" id="set_basket_group"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set basket group</a>
497
                                                                    [% END %]
498
                                                                [% END %]
383
                                                            [% END %]
499
                                                            [% END %]
384
                                                        </li> <!-- /#branch -->
500
                                                        </li>
385
                                                        [% IF branches_loop.size %]
501
                                                        [% IF ( CAN_user_acquisition_group_manage ) %]
386
                                                            <li id="managing_library_entry" style="display:none;">
502
                                                            <li id="basket_grouping" style="display:none;">
387
                                                                <span class="label">&nbsp;</span>
503
                                                                <span class="label">&nbsp;</span>
388
                                                                <div>
504
                                                                <div style="float:left">
389
                                                                    <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
505
                                                                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
390
                                                                        [% INCLUDE 'csrf-token.inc' %]
506
                                                                        [% INCLUDE 'csrf-token.inc' %]
391
                                                                        <select id="select_managing_library" name="branch">
507
                                                                        <select id="basketgroupid" name="basketgroupid">
392
                                                                            <option value="">(no library)</option>
508
                                                                            <option value="">No group</option>
393
                                                                            [% FOREACH branch IN branches_loop %]
509
                                                                            [% FOREACH bg IN basketgroups %]
394
                                                                                [% IF ( basketbranchcode == branch.branchcode ) %]
510
                                                                                [% IF ( bg.default ) %]
395
                                                                                    <option selected="selected" value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
511
                                                                                    <option value="[% bg.id | html %]" selected="selected">[% bg.name | html %]</option>
396
                                                                                [% ELSE %]
512
                                                                                [% ELSE %]
397
                                                                                    <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
513
                                                                                    [% UNLESS bg.closed %]
514
                                                                                        <option value="[% bg.id | html %]">[% bg.name | html %]</option>
515
                                                                                    [% ELSE %]
516
                                                                                        <option value="[% bg.id | html %]" disabled="disabled">[% bg.name | html %] <span>(closed)</span></option>
517
                                                                                    [% END %]
398
                                                                                [% END %]
518
                                                                                [% END %]
399
                                                                            [% END %]
519
                                                                            [% END %]
520
                                                                            <option value="new">Add new group</option>
400
                                                                        </select>
521
                                                                        </select>
401
                                                                        <a id="library_entry_cancel" href="#" class="cancel">Cancel</a>
522
                                                                        <a href="#" id="basket_group_cancel" class="cancel">Cancel</a>
402
                                                                        <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
523
                                                                        <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
403
                                                                        <input type="hidden" id="op" name="op" value="cud-mod_branch" />
524
                                                                        <input type="hidden" value="cud-mod_basket" name="op" />
525
                                                                        <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
404
                                                                    </form>
526
                                                                    </form>
405
                                                                </div>
527
                                                                </div>
406
                                                            </li> <!-- #/managing_library_entry -->
407
                                                        [% END # /IF branches_loop.size %]
408
409
                                                    </ol>
410
411
                                                    [% IF ( closedate ) %]
412
                                                        <ol>
413
                                                            <li>
414
                                                                <span class="label">Basket group:</span>
415
                                                                [% IF basketgroup.id and not basketgroup.name %]
416
                                                                    [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
417
                                                                [% END %]
418
419
                                                                [% IF basketgroup.closed %]
420
                                                                    [% IF ( CAN_user_acquisition_group_manage ) %]
421
                                                                        <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]" title="basketgroup">[% basketgroup.name | html %] <span>(closed)</span></a>
422
                                                                    [% ELSE %]
423
                                                                        [% basketgroup.name | html %] <span>(closed)</span>
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>
438
                                                                        [% ELSE %]
439
                                                                            No group
440
                                                                            <a href="#" id="set_basket_group"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Set basket group</a>
441
                                                                        [% END %]
442
                                                                    [% END %]
443
                                                                [% END %]
444
                                                            </li>
528
                                                            </li>
445
                                                            [% IF ( CAN_user_acquisition_group_manage ) %]
529
                                                        [% END # /IF ( CAN_user_acquisition_group_manage ) %]
446
                                                                <li id="basket_grouping" style="display:none;">
530
                                                        [% IF basketgroup.deliveryplace %]
447
                                                                    <span class="label">&nbsp;</span>
531
                                                            <li> <span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) | html %] </li>
448
                                                                    <div style="float:left">
532
                                                        [% END %]
449
                                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
533
                                                        [% IF basketgroup.billingplace %]
450
                                                                            [% INCLUDE 'csrf-token.inc' %]
534
                                                            <li> <span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) | html %] </li>
451
                                                                            <select id="basketgroupid" name="basketgroupid">
535
                                                        [% END %]
452
                                                                                <option value="">No group</option>
536
                                                    </ol>
453
                                                                                [% FOREACH bg IN basketgroups %]
537
                                                [% END # /IF closeddate %]
454
                                                                                    [% IF ( bg.default ) %]
538
                                            </div>
455
                                                                                        <option value="[% bg.id | html %]" selected="selected">[% bg.name | html %]</option>
539
                                            <!-- /.page-section -->
456
                                                                                    [% ELSE %]
540
                                        </div>
457
                                                                                        [% UNLESS bg.closed %]
541
                                        <!-- /.rows -->
458
                                                                                            <option value="[% bg.id | html %]">[% bg.name | html %]</option>
542
                                    </div>
459
                                                                                        [% ELSE %]
543
                                    <!-- /#acqui_basket_summary.row -->
460
                                                                                            <option value="[% bg.id | html %]" disabled="disabled">[% bg.name | html %] <span>(closed)</span></option>
461
                                                                                        [% END %]
462
                                                                                    [% END %]
463
                                                                                [% END %]
464
                                                                                <option value="new">Add new group</option>
465
                                                                            </select>
466
                                                                            <a href="#" id="basket_group_cancel" class="cancel">Cancel</a>
467
                                                                            <input type="hidden" id="basketno" value="[% basketno | html %]" name="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 ) %]
544
                                [% END # /IF ( basketno ) %]
490
545
491
                                [% IF ( duplinbatch ) %]
546
                                [% IF ( duplinbatch ) %]
492
                                    <div class="alert alert-warning">
547
                                    <div class="alert alert-warning">
493
                                        <h4>Duplicate warning</h4>
548
                                        <h4>Duplicate warning</h4>
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>
549
                                        <p
550
                                            >Some records have not been automatically added because they match an existing record in your catalog:<a
551
                                                href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=[% duplinbatch | uri %]&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]"
552
                                                title="Open in new window"
553
                                                target="_blank"
554
                                                style="margin-left:10px"
555
                                                ><i class="fa-solid fa-window-restore"></i> Display them</a
556
                                            ></p
557
                                        >
495
                                    </div>
558
                                    </div>
496
                                [% END %]
559
                                [% END %]
497
560
Lines 525-531 Link Here
525
                                                    [% END %]
588
                                                    [% END %]
526
                                                    <th class="NoSort">Place hold</th>
589
                                                    <th class="NoSort">Place hold</th>
527
                                                    [% IF ( active && !closedate ) %]
590
                                                    [% IF ( active && !closedate ) %]
528
                                                            <th class="NoSort">Modify</th>
591
                                                        <th class="NoSort">Modify</th>
529
                                                    [% END %]
592
                                                    [% END %]
530
                                                    [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
593
                                                    [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %]
531
                                                        <th class="NoSort">Cancel order</th>
594
                                                        <th class="NoSort">Cancel order</th>
Lines 599-645 Link Here
599
                                                </tr>
662
                                                </tr>
600
                                            </tfoot>
663
                                            </tfoot>
601
                                            <tbody>
664
                                            <tbody>
602
                                    [% FOREACH books_loo IN books_loop %]
665
                                                [% FOREACH books_loo IN books_loop %]
603
                                        [% IF ( books_loo.order_received ) %]
666
                                                    [% IF ( books_loo.order_received ) %]
604
                                            [% SET tr_class = "disabled" %]
667
                                                        [% SET tr_class = "disabled" %]
605
                                        [% END %]
668
                                                    [% END %]
606
                                        <tr class="[% tr_class | html %]">
669
                                                    <tr class="[% tr_class | html %]">
607
                                                        <td>
670
                                                        <td> [% books_loo.ordernumber | html %] </td>
608
                                                            [% books_loo.ordernumber | html %]
609
                                                        </td>
610
                                                        <td>
671
                                                        <td>
611
                                                            <p>
672
                                                            <p>
612
                                                                [% IF ( books_loo.order_received ) %] <span class="order-received">(received)</span>[% END %]
673
                                                                [% IF ( books_loo.order_received ) %]<span class="order-received">(received)</span>[% END %]
613
                                                                [% IF books_loo.title %]
674
                                                                [% IF books_loo.title %]
614
                                                                    [% INCLUDE 'biblio-title.inc' biblio=books_loo link = 1 %] [% IF books_loo.author %] by [% books_loo.author | html %][% END %]
675
                                                                    [% INCLUDE 'biblio-title.inc' biblio=books_loo link = 1 %]
676
                                                                    [% IF books_loo.author %]by [% books_loo.author | html %][% END %]
615
                                                                [% ELSIF books_loo.deleted_biblio %]
677
                                                                [% ELSIF books_loo.deleted_biblio %]
616
                                                                    [% INCLUDE 'biblio-title.inc' biblio=books_loo.deleted_biblio %]
678
                                                                    [% INCLUDE 'biblio-title.inc' biblio=books_loo.deleted_biblio %]
617
                                                                    <br/>(Deleted bibliographic record)
679
                                                                    <br />(Deleted bibliographic record)
618
                                                                [% ELSE %]
680
                                                                [% ELSE %]
619
                                                                    <em>Deleted bibliographic record, can't find title</em><br />
681
                                                                    <em>Deleted bibliographic record, can't find title</em><br />
620
                                                                [%- END %]
682
                                                                [%- END %]
621
                                                                <br />
683
                                                                <br />
622
                                                                [%- IF ( books_loo.isbn ) %] - [% books_loo.isbn | html %][% END -%]
684
                                                                [%- IF ( books_loo.isbn ) %]- [% books_loo.isbn | html %][% END -%]
623
                                                                [%- IF ( books_loo.issn ) %] - [% books_loo.issn | html %][% END -%]
685
                                                                [%- IF ( books_loo.issn ) %]- [% books_loo.issn | html %][% END -%]
624
                                                                [%- IF ( books_loo.publishercode ) %], [% books_loo.publishercode | html %][% END -%]
686
                                                                [%- IF ( books_loo.publishercode ) %], [% books_loo.publishercode | html %][% END -%]
625
                                                                [%- IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear | html -%]
687
                                                                [%- IF ( books_loo.publicationyear ) %]
626
                                                                [%- ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate | html %][% END -%]
688
                                                                    , [% books_loo.publicationyear | html -%]
689
                                                                [%- ELSIF ( books_loo.copyrightdate ) %]
690
                                                                    [% books_loo.copyrightdate | html %]
691
                                                                [% END -%]
627
                                                                [%- IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END -%]
692
                                                                [%- IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END -%]
628
                                                                [%- IF ( books_loo.suggestionid ) %]
693
                                                                [%- IF ( books_loo.suggestionid ) %]
629
                                                                    <br/>
694
                                                                    <br />
630
                                                                    Suggested by: [% books_loo.surnamesuggestedby | html %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby | html %] [% END %]
695
                                                                    Suggested by: [% books_loo.surnamesuggestedby | html %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby | html %][% END %] (<a
631
                                                                    (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid | uri %]&amp;op=show">suggestion #[% books_loo.suggestionid | html %]</a>)
696
                                                                        href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid | uri %]&amp;op=show"
697
                                                                        >suggestion #[% books_loo.suggestionid | html %]</a
698
                                                                    >)
632
                                                                [% END %]
699
                                                                [% END %]
633
                                                            </p>
700
                                                            </p>
634
                                                            [% IF ( books_loo.order_internalnote ) %]
701
                                                            [% IF ( books_loo.order_internalnote ) %]
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>
702
                                                                <p class="ordernote"
703
                                                                    ><strong>Internal note: </strong><span id="internal-note-[% books_loo.ordernumber | html %]">[% books_loo.order_internalnote | html %]</span>
704
                                                                    <a
705
                                                                        class="edit_note noExport"
706
                                                                        data-ordernumber="[% books_loo.ordernumber | html %]"
707
                                                                        data-note_type="internal"
708
                                                                        href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal"
709
                                                                        title="Edit internal note"
710
                                                                        ><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit internal note</a
711
                                                                    ></p
712
                                                                >
636
                                                            [% ELSE %]
713
                                                            [% ELSE %]
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>
714
                                                                <a
715
                                                                    class="edit_note noExport"
716
                                                                    data-ordernumber="[% books_loo.ordernumber | html %]"
717
                                                                    data-note_type="internal"
718
                                                                    href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal"
719
                                                                    title="Add internal note"
720
                                                                    ><i class="fa fa-plus"></i> Add internal note</a
721
                                                                >
638
                                                            [% END %]
722
                                                            [% END %]
639
                                                            [% IF ( books_loo.order_vendornote ) %]
723
                                                            [% IF ( books_loo.order_vendornote ) %]
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>
724
                                                                <p class="ordernote"
725
                                                                    ><strong>Vendor note: </strong> <span id="vendor-note-[% books_loo.ordernumber | html %]">[% books_loo.order_vendornote | html %]</span>
726
                                                                    <a
727
                                                                        class="edit_note noExport"
728
                                                                        data-ordernumber="[% books_loo.ordernumber | html %]"
729
                                                                        data-note_type="vendor"
730
                                                                        href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor"
731
                                                                        title="Edit vendor note"
732
                                                                        ><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit vendor note</a
733
                                                                    ></p
734
                                                                >
641
                                                            [% ELSE %]
735
                                                            [% ELSE %]
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>
736
                                                                <a
737
                                                                    class="edit_note noExport"
738
                                                                    data-ordernumber="[% books_loo.ordernumber | html %]"
739
                                                                    data-note_type="vendor"
740
                                                                    href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor"
741
                                                                    title="Add vendor note"
742
                                                                    ><i class="fa fa-plus"></i> Add vendor note</a
743
                                                                >
643
                                                            [% END %]
744
                                                            [% END %]
644
                                                            [% IF (books_loo.transferred_from) %]
745
                                                            [% IF (books_loo.transferred_from) %]
645
                                                                [% basket = books_loo.transferred_from.basket %]
746
                                                                [% basket = books_loo.transferred_from.basket %]
Lines 648-712 Link Here
648
                                                                <p>
749
                                                                <p>
649
                                                                    Transferred from basket:
750
                                                                    Transferred from basket:
650
                                                                    <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
751
                                                                    <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
651
                                                                    (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>)
752
                                                                    (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>) on
652
                                                                    on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
753
                                                                    <span title="[% timestamp | $KohaDates with_hours = 1 %]"> [% timestamp | $KohaDates %] </span>
653
                                                                    [% timestamp | $KohaDates %]
654
                                                                    </span>
655
                                                                </p>
754
                                                                </p>
656
                                                            [% END %]
755
                                                            [% END %]
657
                                                            [% SET claims = books_loo.order_object.claims %]
756
                                                            [% SET claims = books_loo.order_object.claims %]
658
                                                            [% IF claims.count %]
757
                                                            [% IF claims.count %]
659
                                                                <p>
758
                                                                <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>
660
                                                                    This order has been claimed [% claims.count | html %] times. On [% FOR c IN claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %]
661
                                                                </p>
662
                                                            [% END %]
759
                                                            [% END %]
663
                                                        </td>
760
                                                        </td>
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 ... %]
761
                                                        [% 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 ... %]
665
                                                        [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
762
                                                        [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
666
                                                        <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">
763
                                                        <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">
667
                                                            [% books_loo.rrp_tax_excluded | $Price %] [% IF ( books_loo.uncertainprice ) %] <span>(Uncertain)</span> [% END %]
764
                                                            [% books_loo.rrp_tax_excluded | $Price %] [% IF ( books_loo.uncertainprice ) %]<span>(Uncertain)</span>[% END %]
668
                                                        </td>
669
                                                        <td class="number [% IF books_loo.unitprice_tax_excluded.search(zero_regex) %]error[% END %]">
670
                                                            [% books_loo.unitprice_tax_excluded | $Price %]
671
                                                        </td>
672
                                                        <td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">
673
                                                            [% books_loo.ecost_tax_excluded | $Price %]
674
                                                        </td>
675
                                                        <td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">
676
                                                            [% books_loo.rrp_tax_included | $Price %]
677
                                                        </td>
678
                                                        <td class="number [% IF books_loo.unitprice_tax_included.search(zero_regex) %]error[% END %]">
679
                                                            [% books_loo.unitprice_tax_included | $Price %]
680
                                                        </td>
681
                                                        <td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">
682
                                                            [% books_loo.ecost_tax_included | $Price %]
683
                                                        </td>
684
                                                        <td class="number [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">
685
                                                            [% books_loo.replacementprice | $Price %]
686
                                                        </td>
687
                                                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">
688
                                                            [% books_loo.quantity | html %]
689
                                                        </td>
690
                                                        <td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">
691
                                                            [% books_loo.total_tax_excluded | $Price %]
692
                                                        </td>
693
                                                        <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">
694
                                                            [% books_loo.total_tax_included | $Price %]
695
                                                        </td>
696
                                                        <td class="number">
697
                                                            [% books_loo.tax_rate * 100 | html %]
698
                                                        </td>
699
                                                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">
700
                                                            [% books_loo.tax_value | $Price %]
701
                                                        </td>
702
                                                        <td>
703
                                                            [% books_loo.budget_name | html %]
704
                                                        </td>
765
                                                        </td>
766
                                                        <td class="number [% IF books_loo.unitprice_tax_excluded.search(zero_regex) %]error[% END %]"> [% books_loo.unitprice_tax_excluded | $Price %] </td>
767
                                                        <td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]"> [% books_loo.ecost_tax_excluded | $Price %] </td>
768
                                                        <td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.rrp_tax_included | $Price %] </td>
769
                                                        <td class="number [% IF books_loo.unitprice_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.unitprice_tax_included | $Price %] </td>
770
                                                        <td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.ecost_tax_included | $Price %] </td>
771
                                                        <td class="number [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]"> [% books_loo.replacementprice | $Price %] </td>
772
                                                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]"> [% books_loo.quantity | html %] </td>
773
                                                        <td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]"> [% books_loo.total_tax_excluded | $Price %] </td>
774
                                                        <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]"> [% books_loo.total_tax_included | $Price %] </td>
775
                                                        <td class="number"> [% books_loo.tax_rate * 100 | html %] </td>
776
                                                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]"> [% books_loo.tax_value | $Price %] </td>
777
                                                        <td> [% books_loo.budget_name | html %] </td>
705
                                                        <td data-order="[% books_loo.estimated_delivery_date | html %]" class="actions">
778
                                                        <td data-order="[% books_loo.estimated_delivery_date | html %]" class="actions">
706
                                                            [% books_loo.estimated_delivery_date | $KohaDates %]
779
                                                            [% books_loo.estimated_delivery_date | $KohaDates %]
707
                                                            [% IF CAN_user_acquisition_order_manage %]
780
                                                            [% IF CAN_user_acquisition_order_manage %]
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 %]">
781
                                                                <a
709
                                                                    <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
782
                                                                    class="edit_delivery_date"
783
                                                                    href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% books_loo.ordernumber | html %]"
784
                                                                    title="Edit delivery date"
785
                                                                    data-ordernumber="[% books_loo.ordernumber | html %]"
786
                                                                    id="delivery_date_[% books_loo.ordernumber | html %]"
787
                                                                    data-delivery_date="[% books_loo.estimated_delivery_date | html %]"
788
                                                                >
789
                                                                    <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a
790
                                                                >
710
                                                            [% END %]
791
                                                            [% END %]
711
                                                        </td>
792
                                                        </td>
712
                                                        <td>[% AuthorisedValues.GetByCode( books_loo.sort1_authcat, books_loo.sort1 ) | html %]</td>
793
                                                        <td>[% AuthorisedValues.GetByCode( books_loo.sort1_authcat, books_loo.sort1 ) | html %]</td>
Lines 724-732 Link Here
724
                                                        [% END %]
805
                                                        [% END %]
725
                                                        <td>
806
                                                        <td>
726
                                                            [% IF ( books_loo.biblionumber && CAN_user_reserveforothers_place_holds ) %]
807
                                                            [% IF ( books_loo.biblionumber && CAN_user_reserveforothers_place_holds ) %]
727
                                                                <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% books_loo.biblionumber | uri %]">
808
                                                                <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% books_loo.biblionumber | uri %]"> Place hold </a>
728
                                                                    Place hold
729
                                                                </a>
730
                                                            [% END %]
809
                                                            [% END %]
731
                                                        </td>
810
                                                        </td>
732
                                                        [% IF ( active && !closedate ) %]
811
                                                        [% IF ( active && !closedate ) %]
Lines 738-744 Link Here
738
                                                                    <br />
817
                                                                    <br />
739
                                                                [% END %]
818
                                                                [% END %]
740
                                                                [% UNLESS ( books_loo.suggestionid ) %]
819
                                                                [% UNLESS ( books_loo.suggestionid ) %]
741
                                                                    <a data-action="/cgi-bin/koha/acqui/newordersuggestion.pl" data-booksellerid="[% booksellerid | uri %]" data-basketno="[% basketno | uri %]" data-link_order="[% books_loo.ordernumber | uri %]" data-method="get" class="submit-form-link" href="#">[% tp('verb', 'Link suggestion') | html %]</a>
820
                                                                    <a
821
                                                                        data-action="/cgi-bin/koha/acqui/newordersuggestion.pl"
822
                                                                        data-booksellerid="[% booksellerid | uri %]"
823
                                                                        data-basketno="[% basketno | uri %]"
824
                                                                        data-link_order="[% books_loo.ordernumber | uri %]"
825
                                                                        data-method="get"
826
                                                                        class="submit-form-link"
827
                                                                        href="#"
828
                                                                        >[% tp('verb', 'Link suggestion') | html %]</a
829
                                                                    >
742
                                                                [% END %]
830
                                                                [% END %]
743
                                                            </td>
831
                                                            </td>
744
                                                        [% END %]
832
                                                        [% END %]
Lines 746-768 Link Here
746
                                                            <td>
834
                                                            <td>
747
                                                                [% IF ( books_loo.orderstatus != "complete") %]
835
                                                                [% IF ( books_loo.orderstatus != "complete") %]
748
                                                                    [% IF ( books_loo.left_holds_on_order ) %]
836
                                                                    [% 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>
837
                                                                        <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
838
                                                                        ><br />
750
                                                                    [% ELSE %]
839
                                                                    [% 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>
840
                                                                        <a
841
                                                                            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 %]"
842
                                                                            class="button"
843
                                                                            >Cancel order</a
844
                                                                        ><br />
752
                                                                    [% END %]
845
                                                                    [% END %]
753
                                                                    [% IF ( books_loo.can_del_bib ) %]
846
                                                                    [% 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>
847
                                                                        <a
848
                                                                            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 %]"
849
                                                                            class="button"
850
                                                                            >Cancel order and delete catalog record</a
851
                                                                        ><br />
755
                                                                    [% ELSE %]
852
                                                                    [% ELSE %]
756
                                                                        <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
853
                                                                        <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br />
757
                                                                    [% END %]
854
                                                                    [% END %]
758
                                                                    [% IF ( books_loo.left_item ) %]
855
                                                                    [% 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>
856
                                                                        <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 %]
857
                                                                    [% END %]
761
                                                                    [% IF ( books_loo.left_biblio ) %]
858
                                                                    [% 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>
859
                                                                        <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 %]
860
                                                                    [% END %]
764
                                                                    [% IF ( books_loo.left_subscription ) %]
861
                                                                    [% 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>
862
                                                                        <strong title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions | html %] subscription(s) left</strong><br />
766
                                                                    [% END %]
863
                                                                    [% END %]
767
                                                                    [% IF ( books_loo.left_holds ) %]
864
                                                                    [% 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>
865
                                                                        <strong title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds | html %] hold(s) left</strong>
Lines 773-781 Link Here
773
                                                    </tr>
870
                                                    </tr>
774
                                                [% END %]
871
                                                [% END %]
775
                                            </tbody>
872
                                            </tbody>
776
                                        </table> <!-- /#orders -->
873
                                        </table>
874
                                        <!-- /#orders -->
777
                                        [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>[% END %]
875
                                        [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>[% END %]
778
                                    </div> <!-- /#acqui_basket_content -->
876
                                    </div>
877
                                    <!-- /#acqui_basket_content -->
779
                                [% END # / IF ( books_loop ) %]
878
                                [% END # / IF ( books_loop ) %]
780
879
781
                                [% IF (cancelledorders_loop) %]
880
                                [% IF (cancelledorders_loop) %]
Lines 803-826 Link Here
803
                                            <tbody>
902
                                            <tbody>
804
                                                [% FOREACH order IN cancelledorders_loop %]
903
                                                [% FOREACH order IN cancelledorders_loop %]
805
                                                    <tr style="color:grey">
904
                                                    <tr style="color:grey">
806
                                                        <td>
905
                                                        <td> [% order.ordernumber | html %] </td>
807
                                                            [% order.ordernumber | html %]
808
                                                        </td>
809
                                                        <td>
906
                                                        <td>
810
                                                            <p>
907
                                                            <p>
811
                                                                [% IF ( order.order_received ) %] <span class="order-received">(received)</span>[% END %]
908
                                                                [% IF ( order.order_received ) %]<span class="order-received">(received)</span>[% END %]
812
                                                                [% IF (order.title) %]
909
                                                                [% IF (order.title) %]
813
                                                                    [% order.title | html %][% IF order.author %] by [% order.author | html %][% END %]
910
                                                                    [% order.title | html %][% IF order.author %]by [% order.author | html %][% END %]
814
                                                                [% ELSIF order.deleted_biblio %]
911
                                                                [% ELSIF order.deleted_biblio %]
815
                                                                    [% INCLUDE 'biblio-title.inc' biblio=order.deleted_biblio %]
912
                                                                    [% INCLUDE 'biblio-title.inc' biblio=order.deleted_biblio %]
816
                                                                    <br/>(Deleted bibliographic record)
913
                                                                    <br />(Deleted bibliographic record)
817
                                                                [% ELSE %]
914
                                                                [% ELSE %]
818
                                                                    <em>Deleted bibliographic record, can't find title</em>
915
                                                                    <em>Deleted bibliographic record, can't find title</em>
819
                                                                [% END %]
916
                                                                [% END %]
820
                                                                <br />
917
                                                                <br />
821
                                                                [% IF ( order.order_internalnote ) %] [% order.order_internalnote | html %][% END %]
918
                                                                [% IF ( order.order_internalnote ) %][% order.order_internalnote | html %][% END %]
822
                                                                [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
919
                                                                [% IF ( order.isbn ) %]- [% order.isbn | html %][% END %]
823
                                                                [% IF ( order.issn ) %] - [% order.issn | html %][% END %]
920
                                                                [% IF ( order.issn ) %]- [% order.issn | html %][% END %]
824
                                                                [% IF ( order.publishercode ) %], [% order.publishercode | html %][% END %]
921
                                                                [% IF ( order.publishercode ) %], [% order.publishercode | html %][% END %]
825
                                                                [% IF ( order.publicationyear ) %]
922
                                                                [% IF ( order.publicationyear ) %]
826
                                                                    , [% order.publicationyear | html %]
923
                                                                    , [% order.publicationyear | html %]
Lines 837-848 Link Here
837
                                                                [% basket = order.transferred_to.basket %]
934
                                                                [% basket = order.transferred_to.basket %]
838
                                                                [% bookseller = order.transferred_to.bookseller %]
935
                                                                [% bookseller = order.transferred_to.bookseller %]
839
                                                                [% timestamp = order.transferred_to.timestamp %]
936
                                                                [% timestamp = order.transferred_to.timestamp %]
840
                                                                <p>Transferred to basket:
937
                                                                <p
938
                                                                    >Transferred to basket:
841
                                                                    <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
939
                                                                    <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>)
940
                                                                    (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>) on
843
                                                                    on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
941
                                                                    <span title="[% timestamp | $KohaDates with_hours = 1 %]"> [% timestamp | $KohaDates %] </span>
844
                                                                        [% timestamp | $KohaDates %]
845
                                                                    </span>
846
                                                                </p>
942
                                                                </p>
847
                                                            [% END %]
943
                                                            [% END %]
848
                                                        </td>
944
                                                        </td>
Lines 868-881 Link Here
868
                                                    </tr>
964
                                                    </tr>
869
                                                [% END # /FOREACH order %]
965
                                                [% END # /FOREACH order %]
870
                                            </tbody>
966
                                            </tbody>
871
                                        </table> <!-- /#cancelledorderst -->
967
                                        </table>
968
                                        <!-- /#cancelledorderst -->
872
                                        <form id="delete_order_form" method="post">
969
                                        <form id="delete_order_form" method="post">
873
                                            [% INCLUDE 'csrf-token.inc' %]
970
                                            [% INCLUDE 'csrf-token.inc' %]
874
                                            <input type="hidden" name="op" value="cud-delete-order"/>
971
                                            <input type="hidden" name="op" value="cud-delete-order" />
875
                                            <input type="hidden" name="ordernumber" value=""/>
972
                                            <input type="hidden" name="ordernumber" value="" />
876
                                            <input type="hidden" name="basketno" value="[% basketno | html %]"/>
973
                                            <input type="hidden" name="basketno" value="[% basketno | html %]" />
877
                                        </form>
974
                                        </form>
878
                                    </div> <!-- /#cancelledorders -->
975
                                    </div>
976
                                    <!-- /#cancelledorders -->
879
                                [% END # /IF (cancelledorders_loop) %]
977
                                [% END # /IF (cancelledorders_loop) %]
880
                                <br />
978
                                <br />
881
979
Lines 895-922 Link Here
895
                                                </div>
993
                                                </div>
896
                                                <div class="modal-footer">
994
                                                <div class="modal-footer">
897
                                                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
995
                                                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
898
                                                </div>
996
                                                </div> </div
899
                                            </div><!-- /.modal-content -->
997
                                            ><!-- /.modal-content --> </div
900
                                        </div><!-- /.modal-dialog -->
998
                                        ><!-- /.modal-dialog --> </div
901
                                    </div><!-- /.modal#addtoBasket -->
999
                                    ><!-- /.modal#addtoBasket -->
902
                                [% END # /UNLESS ( closedate ) %]
1000
                                [% END # /UNLESS ( closedate ) %]
903
904
                            [% END # /IF ( delete_confirmed ) %]
1001
                            [% END # /IF ( delete_confirmed ) %]
905
                        [% END # /IF ( NO_BOOKSELLER ) %]
1002
                        [% END # /IF ( NO_BOOKSELLER ) %]
906
                    [% ELSE %]
1003
                    [% ELSE %]
907
                        <!-- if we want just to select a basketgroup for a closed basket -->
1004
                        <!-- if we want just to select a basketgroup for a closed basket -->
908
                    [% END #/IF !confirm_close && !edi_confirm  %]
1005
                    [% END #/IF !confirm_close && !edi_confirm %]
909
1006
910
                    [% IF ( confirm_close ) %]
1007
                    [% IF ( confirm_close ) %]
911
                        <div id="closebasket_needsconfirmation" class="alert alert-warning">
1008
                        <div id="closebasket_needsconfirmation" class="alert alert-warning">
912
913
                            <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
1009
                            <form method="post" action="/cgi-bin/koha/acqui/basket.pl">
914
                                [% INCLUDE 'csrf-token.inc' %]
1010
                                [% INCLUDE 'csrf-token.inc' %]
915
                                <h1>Are you sure you want to close basket [% basketname | html %]?</h1>
1011
                                <h1>Are you sure you want to close basket [% basketname | html %]?</h1>
916
                                [% IF ( CAN_user_acquisition_group_manage ) %]
1012
                                [% IF ( CAN_user_acquisition_group_manage ) %]
917
                                    <p>
1013
                                    <p>
918
                                        <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
1014
                                        <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
919
                                        <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
1015
                                        <input type="checkbox" id="createbasketgroup" name="createbasketgroup" />
920
                                    </p>
1016
                                    </p>
921
                                [% END %]
1017
                                [% END %]
922
                                <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
1018
                                <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
Lines 941-947 Link Here
941
                                [% IF CAN_user_acquisition_group_manage %]
1037
                                [% IF CAN_user_acquisition_group_manage %]
942
                                    <p>
1038
                                    <p>
943
                                        <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
1039
                                        <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
944
                                        <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
1040
                                        <input type="checkbox" id="createbasketgroup" name="createbasketgroup" />
945
                                    </p>
1041
                                    </p>
946
                                [% END %]
1042
                                [% END %]
947
                                <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
1043
                                <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
Lines 956-975 Link Here
956
                                <input type="hidden" name="basketno" value="[% basketno | html %]" />
1052
                                <input type="hidden" name="basketno" value="[% basketno | html %]" />
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>
1053
                                <button type="submit" class="btn btn-default deny" accesskey="N"><i class="fa fa-fw fa-times"></i> No, don't close (N)</button>
958
                            </form>
1054
                            </form>
959
                        </div> <!-- /#closebasket_needsconfirmation -->
1055
                        </div>
1056
                        <!-- /#closebasket_needsconfirmation -->
960
                    [% END # /IF edi_confirm %]
1057
                    [% END # /IF edi_confirm %]
961
                [% END # /IF (cannot_manage_basket) %]
1058
                [% END # /IF (cannot_manage_basket) %]
962
            </main>
1059
            </main>
963
        </div> <!-- /.col-md-10 order-md-2 order-sm-2 -->
1060
        </div>
1061
        <!-- /.col-md-10 order-md-2 order-sm-2 -->
964
1062
965
        <div class="col-md-2 order-sm-2 order-md-1">
1063
        <div class="col-md-2 order-sm-2 order-md-1">
966
            <aside>
1064
            <aside>
967
                [% INCLUDE 'vendor-menu.inc' %]
1065
                [% INCLUDE 'vendor-menu.inc' %]
968
                [% INCLUDE 'acquisitions-menu.inc' %]
1066
                [% INCLUDE 'acquisitions-menu.inc' %]
969
            </aside>
1067
            </aside>
970
        </div> <!-- /.col-md-2 order-sm-2 order-md-1 -->
1068
        </div>
971
    </div> <!-- /.row -->
1069
        <!-- /.col-md-2 order-sm-2 order-md-1 -->
972
1070
    </div>
1071
    <!-- /.row -->
973
1072
974
    <!-- Modal for editing vendor and internal notes -->
1073
    <!-- Modal for editing vendor and internal notes -->
975
    <div class="modal" id="noteEditor" tabindex="-1" role="dialog" aria-labelledby="noteEditorLabel">
1074
    <div class="modal" id="noteEditor" tabindex="-1" role="dialog" aria-labelledby="noteEditorLabel">
Lines 991-1000 Link Here
991
                        <button type="submit" class="btn btn-primary">Save</button>
1090
                        <button type="submit" class="btn btn-primary">Save</button>
992
                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
1091
                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
993
                    </div>
1092
                    </div>
994
                </div> <!-- /.modal-content -->
1093
                </div>
995
            </form> <!-- /#modify_order_notes -->
1094
                <!-- /.modal-content -->
996
        </div> <!-- /.modal-dialog -->
1095
            </form>
997
    </div> <!-- /.modal#noteEditor -->
1096
            <!-- /#modify_order_notes -->
1097
        </div>
1098
        <!-- /.modal-dialog -->
1099
    </div>
1100
    <!-- /.modal#noteEditor -->
998
1101
999
    <!-- Modal for editing estimated delivery date -->
1102
    <!-- Modal for editing estimated delivery date -->
1000
    <div class="modal" id="dateEditor" tabindex="-1" role="dialog" aria-labelledby="dateEditorLabel">
1103
    <div class="modal" id="dateEditor" tabindex="-1" role="dialog" aria-labelledby="dateEditorLabel">
Lines 1007-1013 Link Here
1007
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
1110
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
1008
                    </div>
1111
                    </div>
1009
                    <div class="modal-body">
1112
                    <div class="modal-body">
1010
                        <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% books_loo.estimated_delivery_date | html %]"/>
1113
                        <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% books_loo.estimated_delivery_date | html %]" />
1011
                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1114
                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1012
                        <input type="hidden" id="date_ordernumber" name="ordernumber" value="" />
1115
                        <input type="hidden" id="date_ordernumber" name="ordernumber" value="" />
1013
                        <input type="hidden" name="op" value="cud-save" />
1116
                        <input type="hidden" name="op" value="cud-save" />
Lines 1016-1254 Link Here
1016
                        <button type="submit" class="btn btn-primary">Save</button>
1119
                        <button type="submit" class="btn btn-primary">Save</button>
1017
                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
1120
                        <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
1018
                    </div>
1121
                    </div>
1019
                </div> <!-- /.modal-content -->
1122
                </div>
1020
            </form> <!-- /#modify_estimated_delivery_date -->
1123
                <!-- /.modal-content -->
1021
        </div> <!-- /.modal-dialog -->
1124
            </form>
1022
    </div> <!-- /.modal#dateEditor -->
1125
            <!-- /#modify_estimated_delivery_date -->
1126
        </div>
1127
        <!-- /.modal-dialog -->
1128
    </div>
1129
    <!-- /.modal#dateEditor -->
1023
1130
1024
[% MACRO jsinclude BLOCK %]
1131
    [% MACRO jsinclude BLOCK %]
1025
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
1132
        [% Asset.js("js/acquisitions-menu.js") | $raw %]
1026
    [% Asset.js("js/form-submit.js") | $raw %]
1133
        [% Asset.js("js/form-submit.js") | $raw %]
1027
    [% INCLUDE 'datatables.inc' %]
1134
        [% INCLUDE 'datatables.inc' %]
1028
    [% Asset.js("js/acq.js") | $raw %]
1135
        [% Asset.js("js/acq.js") | $raw %]
1029
    [% INCLUDE 'calendar.inc' %]
1136
        [% INCLUDE 'calendar.inc' %]
1030
    <script>
1137
        <script>
1031
        function updateColumnsVisibility(visible) {
1138
            function updateColumnsVisibility(visible) {
1032
            if ( visible ) {
1139
                if ( visible ) {
1033
                $("table .tax_excluded, .tax_included").show();
1140
                    $("table .tax_excluded, .tax_included").show();
1034
            } else {
1141
                } else {
1035
                [% IF ( listincgst ) %]
1142
                    [% IF ( listincgst ) %]
1036
                    $("table .tax_excluded").hide();
1143
                        $("table .tax_excluded").hide();
1037
                [% ELSE %]
1144
                    [% ELSE %]
1038
                    $("table .tax_included").hide();
1145
                        $("table .tax_included").hide();
1039
                [% END %]
1146
                    [% END %]
1147
                }
1040
            }
1148
            }
1041
        }
1042
1149
1043
        $(document).ready(function() {
1150
            $(document).ready(function() {
1044
1151
1045
            [% UNLESS ( closedate ) %]
1152
                [% UNLESS ( closedate ) %]
1046
                $('#addtoBasket').on('show', function () {
1153
                    $('#addtoBasket').on('show', function () {
1047
                   $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
1154
                       $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
1048
                });
1155
                    });
1049
            [% END %]
1156
                [% END %]
1050
1157
1051
            $("body").on("click", ".del_user", function(e){
1158
                $("body").on("click", ".del_user", function(e){
1052
                e.preventDefault();
1159
                    e.preventDefault();
1053
                del_user( $(this).data("borrowernumber") );
1160
                    del_user( $(this).data("borrowernumber") );
1054
            });
1161
                });
1055
1162
1056
            $(".transfer_order").on("click",function(e){
1163
                $(".transfer_order").on("click",function(e){
1057
                e.preventDefault();
1164
                    e.preventDefault();
1058
                transfer_order_popup( $(this).data("ordernumber"));
1165
                    transfer_order_popup( $(this).data("ordernumber"));
1059
            });
1166
                });
1060
1167
1061
            $(".edit_note").on("click", function(e) {
1168
                $(".edit_note").on("click", function(e) {
1062
                e.preventDefault();
1169
                    e.preventDefault();
1063
                var ordernumber = $(this).data("ordernumber");
1170
                    var ordernumber = $(this).data("ordernumber");
1064
                var note_type = $(this).data("note_type");
1171
                    var note_type = $(this).data("note_type");
1065
                var order_number_text = _("(order number %s)").format(ordernumber);
1172
                    var order_number_text = _("(order number %s)").format(ordernumber);
1066
                var modalTitle = $(this).attr("title") + " " + order_number_text;
1173
                    var modalTitle = $(this).attr("title") + " " + order_number_text;
1067
                var note_text = $( "#" + note_type + "-note-" + ordernumber ).html();
1174
                    var note_text = $( "#" + note_type + "-note-" + ordernumber ).html();
1068
                $("#noteEditor .modal-title").text(modalTitle);
1175
                    $("#noteEditor .modal-title").text(modalTitle);
1069
                $("#ordernumber").val( ordernumber );
1176
                    $("#ordernumber").val( ordernumber );
1070
                $("#ordernotes").html( note_text );
1177
                    $("#ordernotes").html( note_text );
1071
                $("#type").val( note_type );
1178
                    $("#type").val( note_type );
1072
                $("#noteEditor").modal("show");
1179
                    $("#noteEditor").modal("show");
1073
                $("#ordernotes").focus();
1180
                    $("#ordernotes").focus();
1074
            });
1181
                });
1075
1182
1076
             $("#noteEditor").on('hidden.bs.modal', function (e) {
1183
                 $("#noteEditor").on('hidden.bs.modal', function (e) {
1077
                $("#noteEditorLabel").html("");
1184
                    $("#noteEditorLabel").html("");
1078
                $("#noteEditor .modal-title").text("");
1185
                    $("#noteEditor .modal-title").text("");
1079
                $("#ordernotes").html( "" );
1186
                    $("#ordernotes").html( "" );
1080
                $("#ordernumber").val("");
1187
                    $("#ordernumber").val("");
1081
                $("#type").val("");
1188
                    $("#type").val("");
1082
            });
1189
                });
1083
1190
1084
            $("#set_managing_library").on("click", function(e){
1191
                $("#set_managing_library").on("click", function(e){
1085
                e.preventDefault();
1192
                    e.preventDefault();
1086
                $(this).hide();
1193
                    $(this).hide();
1087
                $("#managing_library_entry").show();
1194
                    $("#managing_library_entry").show();
1088
            });
1195
                });
1089
1196
1090
            $("#library_entry_cancel").on("click", function(e){
1197
                $("#library_entry_cancel").on("click", function(e){
1091
                e.preventDefault();
1198
                    e.preventDefault();
1092
                $("#managing_library_entry").hide();
1199
                    $("#managing_library_entry").hide();
1093
                $("#set_managing_library").show();
1200
                    $("#set_managing_library").show();
1094
            });
1201
                });
1095
1202
1096
            $("#set_basket_group").on("click", function(e){
1203
                $("#set_basket_group").on("click", function(e){
1097
                e.preventDefault();
1204
                    e.preventDefault();
1098
                $(this).hide();
1205
                    $(this).hide();
1099
                $("#basket_grouping").show();
1206
                    $("#basket_grouping").show();
1100
            });
1207
                });
1101
1208
1102
            $("#basket_group_cancel").on("click", function(e){
1209
                $("#basket_group_cancel").on("click", function(e){
1103
                e.preventDefault();
1210
                    e.preventDefault();
1104
                $("#basket_grouping").hide();
1211
                    $("#basket_grouping").hide();
1105
                $("#set_basket_group").show();
1212
                    $("#set_basket_group").show();
1106
            });
1213
                });
1107
1214
1108
            $("#addtoBasket").on("shown.bs.modal", function(){
1215
                $("#addtoBasket").on("shown.bs.modal", function(){
1109
                var basket = $(this).data("basketno");
1216
                    var basket = $(this).data("basketno");
1110
                var legend = _("Add order to basket %s").format(basket);
1217
                    var legend = _("Add order to basket %s").format(basket);
1111
                $(this).find("h4").text( legend );
1218
                    $(this).find("h4").text( legend );
1112
                $(this).find("legend").html(legend);
1219
                    $(this).find("legend").html(legend);
1113
                $(this).find("input:text").focus();
1220
                    $(this).find("input:text").focus();
1221
                });
1114
            });
1222
            });
1115
        });
1223
        </script>
1116
    </script>
1224
        [% UNLESS ( closedate ) %]
1117
1225
            <script>
1118
    [% UNLESS ( closedate ) %]
1226
                function transfer_order_popup(ordernumber) {
1119
        <script>
1227
                    var url = "/cgi-bin/koha/acqui/transferorder.pl?"
1120
            function transfer_order_popup(ordernumber) {
1228
                        + "ordernumber=" + ordernumber
1121
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
1229
                    window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
1122
                    + "ordernumber=" + ordernumber
1123
                window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
1124
            }
1125
1126
            function confirm_ediorder() {
1127
                var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
1128
                if (is_confirmed) {
1129
                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno | html %]";
1130
                }
1230
                }
1131
            }
1132
1231
1133
            $(document).ready(function() {
1232
                function confirm_ediorder() {
1134
                $(".delete_order").on('click', function(e) {
1233
                    var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
1135
                    e.preventDefault();
1234
                    if (is_confirmed) {
1136
                    if( $(this).data('biblionumber') ) {
1235
                        window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno | html %]";
1137
                        alert( _("Please delete the linked bibliographic record first.") );
1138
                        return false;
1139
                    } else if( !confirm(_("Are you sure you want to delete this order line?")) ) {
1140
                        return false;
1141
                    }
1236
                    }
1142
                    $('#delete_order_form input[name="ordernumber"]').val( $(this).data('ordernumber') );
1237
                }
1143
                    $('#delete_order_form').submit();
1238
1239
                $(document).ready(function() {
1240
                    $(".delete_order").on('click', function(e) {
1241
                        e.preventDefault();
1242
                        if( $(this).data('biblionumber') ) {
1243
                            alert( _("Please delete the linked bibliographic record first.") );
1244
                            return false;
1245
                        } else if( !confirm(_("Are you sure you want to delete this order line?")) ) {
1246
                            return false;
1247
                        }
1248
                        $('#delete_order_form input[name="ordernumber"]').val( $(this).data('ordernumber') );
1249
                        $('#delete_order_form').submit();
1250
                    });
1144
                });
1251
                });
1145
            });
1252
            </script>
1146
        </script>
1253
        [% ELSE %]
1147
    [% ELSE %]
1254
            <script>
1255
                $(document).ready(function(){
1256
                    $("#basketgroupid").change(function(){
1257
                        if($(this).val() == "new"){
1258
                            location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | html %]";
1259
                        } else {
1260
                            $(this).parent().submit();
1261
                        }
1262
                    });
1263
                });
1264
            </script>
1265
        [% END # /UNLESS (closedate) %]
1148
        <script>
1266
        <script>
1149
            $(document).ready(function(){
1267
            $(document).ready(function() {
1150
                $("#basketgroupid").change(function(){
1268
                var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
1151
                    if($(this).val() == "new"){
1269
                [% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
1152
                        location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | html %]";
1270
                    // FIXME This cannot work correctly without bKohaColumnsUseNames
1153
                    } else {
1271
                    table_settings['columns'].splice(18, 1);
1154
                        $(this).parent().submit();
1272
                [% END %]
1273
                $("#orders").kohaTable({
1274
                    pagingType: "full",
1275
                    autoWidth: false,
1276
                }, table_settings);
1277
1278
                $("#cancelledorderst").kohaTable({
1279
                    pagingType: "full"
1280
                });
1281
                $("#reopenform").on("submit",function(e){
1282
                    var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
1283
                    var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
1284
                    if( is_confirmed ){ return true; }
1285
                    else{ return false }
1286
                });
1287
                // Generates a dynamic link for exporting the selections data as CSV
1288
                $("#exportbutton, #export-csv-menu a").click(function() {
1289
                    // Building the url from currently checked boxes
1290
                    var url = '/cgi-bin/koha/acqui/basket.pl';
1291
                    url += $('#exportbutton').attr('href');
1292
                    if($(this).attr("data-value")) {
1293
                        url += '&amp;csv_profile=' + $(this).attr("data-value");
1155
                    }
1294
                    }
1295
                    // And redirecting to the CSV page
1296
                    location.href = url;
1297
                    return false;
1298
                });
1299
                $("#select_managing_library").on("change", function(){
1300
                    $(this).parent().submit();
1156
                });
1301
                });
1157
            });
1158
        </script>
1159
    [% END # /UNLESS (closedate) %]
1160
    <script>
1161
        $(document).ready(function() {
1162
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
1163
            [% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
1164
                // FIXME This cannot work correctly without bKohaColumnsUseNames
1165
                table_settings['columns'].splice(18, 1);
1166
            [% END %]
1167
            $("#orders").kohaTable({
1168
                pagingType: "full",
1169
                autoWidth: false,
1170
            }, table_settings);
1171
1172
            $("#cancelledorderst").kohaTable({
1173
                pagingType: "full"
1174
            });
1175
            $("#reopenform").on("submit",function(e){
1176
                var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
1177
                var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
1178
                if( is_confirmed ){ return true; }
1179
                else{ return false }
1180
            });
1181
            // Generates a dynamic link for exporting the selections data as CSV
1182
            $("#exportbutton, #export-csv-menu a").click(function() {
1183
                // Building the url from currently checked boxes
1184
                var url = '/cgi-bin/koha/acqui/basket.pl';
1185
                url += $('#exportbutton').attr('href');
1186
                if($(this).attr("data-value")) {
1187
                    url += '&amp;csv_profile=' + $(this).attr("data-value");
1188
                }
1189
                // And redirecting to the CSV page
1190
                location.href = url;
1191
                return false;
1192
            });
1193
            $("#select_managing_library").on("change", function(){
1194
                $(this).parent().submit();
1195
            });
1196
1302
1197
            $(".edit_delivery_date").on("click", function(e) {
1303
                $(".edit_delivery_date").on("click", function(e) {
1198
                e.preventDefault();
1304
                    e.preventDefault();
1199
                var ordernumber = $(this).data("ordernumber");
1305
                    var ordernumber = $(this).data("ordernumber");
1200
                var order_number_text = _("(order number %s)").format(ordernumber);
1306
                    var order_number_text = _("(order number %s)").format(ordernumber);
1201
                var modalTitle = $(this).attr("title") + " " + order_number_text;
1307
                    var modalTitle = $(this).attr("title") + " " + order_number_text;
1202
                var delivery_date = $( "#delivery_date_" + ordernumber ).data("delivery_date");
1308
                    var delivery_date = $( "#delivery_date_" + ordernumber ).data("delivery_date");
1203
                const estimated_delivery_date = document.querySelector("#estimated_delivery_date")._flatpickr;
1309
                    const estimated_delivery_date = document.querySelector("#estimated_delivery_date")._flatpickr;
1204
                estimated_delivery_date.setDate( delivery_date );
1310
                    estimated_delivery_date.setDate( delivery_date );
1205
                $("#dateEditor .modal-title").text(modalTitle);
1311
                    $("#dateEditor .modal-title").text(modalTitle);
1206
                $("#date_ordernumber").val(ordernumber);
1312
                    $("#date_ordernumber").val(ordernumber);
1207
                $("#dateEditor").modal("show");
1313
                    $("#dateEditor").modal("show");
1208
            });
1314
                });
1209
1315
1210
             $("#dateEditor").on('hidden.bs.modal', function (e) {
1316
                 $("#dateEditor").on('hidden.bs.modal', function (e) {
1211
                $("#dateEditorLabel").html("");
1317
                    $("#dateEditorLabel").html("");
1212
                $("#dateEditor .modal-title").text("");
1318
                    $("#dateEditor .modal-title").text("");
1213
                $("#estimated_delivery_date").html( "" );
1319
                    $("#estimated_delivery_date").html( "" );
1214
                $("#date_ordernumber").val("");
1320
                    $("#date_ordernumber").val("");
1321
                });
1215
            });
1322
            });
1216
        });
1217
1323
1218
        function add_user(borrowernumber, borrowername) {
1324
            function add_user(borrowernumber, borrowername) {
1219
            var ids = $("#users_ids").val();
1325
                var ids = $("#users_ids").val();
1220
            if(ids.length > 0) {
1326
                if(ids.length > 0) {
1221
                ids = ids.split(':');
1327
                    ids = ids.split(':');
1222
            } else {
1328
                } else {
1223
                ids = new Array;
1329
                    ids = new Array;
1330
                }
1331
                if (ids.indexOf(borrowernumber.toString()) < 0) {
1332
                    ids.push(borrowernumber);
1333
                    $("#users_ids").val(ids.join(':'));
1334
                    var li = '<li id="user_'+borrowernumber+'">'+borrowername
1335
                    + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash-can"></i> '
1336
                        + _("Delete user") + '</a></li>';
1337
                    $("#users_names").prepend(li);
1338
                    $("#add_user_submit").show();
1339
                    return 0;
1340
                }
1341
                return -1;
1224
            }
1342
            }
1225
            if (ids.indexOf(borrowernumber.toString()) < 0) {
1343
1226
                ids.push(borrowernumber);
1344
            function del_user(borrowernumber) {
1345
                $("#user_"+borrowernumber).remove();
1346
                var ids = $("#users_ids").val().split(':');
1347
                ids.splice(ids.indexOf(borrowernumber.toString()), 1);
1227
                $("#users_ids").val(ids.join(':'));
1348
                $("#users_ids").val(ids.join(':'));
1228
                var li = '<li id="user_'+borrowernumber+'">'+borrowername
1229
                + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash-can"></i> '
1230
                    + _("Delete user") + '</a></li>';
1231
                $("#users_names").prepend(li);
1232
                $("#add_user_submit").show();
1349
                $("#add_user_submit").show();
1233
                return 0;
1234
            }
1350
            }
1235
            return -1;
1351
        </script>
1236
        }
1352
        [% INCLUDE 'select2.inc' %]
1237
1353
        [% SET columns = ['cardnumber','name','category','branch','action'] %]
1238
        function del_user(borrowernumber) {
1354
        [% SET filter = 'baskets_managers' %]
1239
            $("#user_"+borrowernumber).remove();
1355
        [% PROCESS patron_search_modal columns => columns, modal_title => t("Add user") %]
1240
            var ids = $("#users_ids").val().split(':');
1356
        [% PROCESS patron_search_js columns => columns, actions => ["add"], preview_on_name_click => 1 %]
1241
            ids.splice(ids.indexOf(borrowernumber.toString()), 1);
1357
    [% END %]
1242
            $("#users_ids").val(ids.join(':'));
1243
            $("#add_user_submit").show();
1244
        }
1245
    </script>
1246
1247
    [% INCLUDE 'select2.inc' %]
1248
    [% SET columns = ['cardnumber','name','category','branch','action'] %]
1249
    [% SET filter = 'baskets_managers' %]
1250
    [% PROCESS patron_search_modal columns => columns, modal_title => t("Add user") %]
1251
    [% PROCESS patron_search_js columns => columns, actions => ["add"], preview_on_name_click => 1 %]
1252
[% END %]
1253
1358
1254
[% INCLUDE 'intranet-bottom.inc' %]
1359
    [% INCLUDE 'intranet-bottom.inc' %]
1360
</div>
1255
- 

Return to bug 31632