Lines 19-24
Link Here
|
19 |
|
19 |
|
20 |
<div class="main container-fluid"> |
20 |
<div class="main container-fluid"> |
21 |
<div class="row"> |
21 |
<div class="row"> |
|
|
22 |
[% AcqCreateItem = order.basket.effective_create_items %] |
22 |
<div class="col-sm-10 col-sm-push-2"> |
23 |
<div class="col-sm-10 col-sm-push-2"> |
23 |
<main> |
24 |
<main> |
24 |
|
25 |
|
Lines 141-147
Link Here
|
141 |
</tbody> |
142 |
</tbody> |
142 |
</table> |
143 |
</table> |
143 |
</fieldset> |
144 |
</fieldset> |
144 |
[% ELSIF (AcqCreateItemReceiving) %] |
145 |
[% ELSIF (AcqCreateItem == 'receiving') %] |
145 |
<div id="items_list" style="display:none"> |
146 |
<div id="items_list" style="display:none"> |
146 |
<p><strong>Items list</strong></p> |
147 |
<p><strong>Items list</strong></p> |
147 |
<div style="width:100%;overflow:auto;"> |
148 |
<div style="width:100%;overflow:auto;"> |
Lines 184-190
Link Here
|
184 |
</fieldset> |
185 |
</fieldset> |
185 |
[% END %] |
186 |
[% END %] |
186 |
[% ELSIF (AcqCreateItem == 'ordering') %] |
187 |
[% ELSIF (AcqCreateItem == 'ordering') %] |
187 |
[% IF (items.count) %] |
188 |
[% IF (order.items.size) %] |
188 |
<h5>Items</h5> |
189 |
<h5>Items</h5> |
189 |
<div style="width:100%;overflow:auto"> |
190 |
<div style="width:100%;overflow:auto"> |
190 |
<table> |
191 |
<table> |
Lines 208-214
Link Here
|
208 |
</tr> |
209 |
</tr> |
209 |
</thead> |
210 |
</thead> |
210 |
<tbody> |
211 |
<tbody> |
211 |
[% FOREACH item IN items %] |
212 |
[% FOREACH item IN order.items %] |
212 |
<tr id="item_[% item.itemnumber | html %]"> |
213 |
<tr id="item_[% item.itemnumber | html %]"> |
213 |
<td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber | html %]" /></td> |
214 |
<td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber | html %]" /></td> |
214 |
<td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber | html %],[% item.itemnumber | html %]);">Edit</a></td> |
215 |
<td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber | html %],[% item.itemnumber | html %]);">Edit</a></td> |
Lines 277-283
Link Here
|
277 |
[% IF order.subscriptionid %] |
278 |
[% IF order.subscriptionid %] |
278 |
<input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantity | html %]" /> |
279 |
<input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantity | html %]" /> |
279 |
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" /> |
280 |
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" /> |
280 |
[% ELSIF AcqCreateItemReceiving %] |
281 |
[% ELSIF AcqCreateItem == 'receiving' %] |
281 |
<input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" /> |
282 |
<input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" /> |
282 |
[% ELSE %] |
283 |
[% ELSE %] |
283 |
[% IF ( order.quantityreceived ) %] |
284 |
[% IF ( order.quantityreceived ) %] |
Lines 285-291
Link Here
|
285 |
<input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived | html %]" /> |
286 |
<input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived | html %]" /> |
286 |
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" /> |
287 |
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" /> |
287 |
[% ELSE %] |
288 |
[% ELSE %] |
288 |
[% IF ( items ) %] |
289 |
[% IF ( order.items.count ) %] |
289 |
<input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived + 1 | html %]" /> |
290 |
<input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived + 1 | html %]" /> |
290 |
[% ELSE %] |
291 |
[% ELSE %] |
291 |
<input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived + 1 | html %]" /> |
292 |
<input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived + 1 | html %]" /> |
Lines 300-306
Link Here
|
300 |
<p class="error">Warning, you have entered more items than expected. |
301 |
<p class="error">Warning, you have entered more items than expected. |
301 |
Items will not be created.</p> |
302 |
Items will not be created.</p> |
302 |
</div> |
303 |
</div> |
303 |
[% END %][%# IF (order.subscriptionid) ELSIF (AcqCreateItemReceiving) %] |
304 |
[% END %][%# IF (order.subscriptionid) ELSIF (AcqCreateItem == 'receiving' ) %] |
304 |
</li> |
305 |
</li> |
305 |
|
306 |
|
306 |
[% IF ( gst_values ) %] |
307 |
[% IF ( gst_values ) %] |
Lines 391-397
Link Here
|
391 |
[% Asset.js("js/cataloging.js") | $raw %] |
392 |
[% Asset.js("js/cataloging.js") | $raw %] |
392 |
<script> |
393 |
<script> |
393 |
function Check(form) { |
394 |
function Check(form) { |
394 |
[% IF (AcqCreateItemReceiving) %] |
395 |
[% IF (AcqCreateItem == 'receiving') %] |
395 |
var total_errors = CheckMandatorySubfields(form); |
396 |
var total_errors = CheckMandatorySubfields(form); |
396 |
if (total_errors != 0) { |
397 |
if (total_errors != 0) { |
397 |
var alertString = _("Form not submitted because of the following problem(s)"); |
398 |
var alertString = _("Form not submitted because of the following problem(s)"); |
Lines 401-407
Link Here
|
401 |
return false; |
402 |
return false; |
402 |
} |
403 |
} |
403 |
|
404 |
|
404 |
if(check_additem('[% UniqueItemFields | html %]') == false){ |
405 |
if(check_additem('[% Koha.Preference("UniqueItemFields") | html %]') == false){ |
405 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
406 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
406 |
return false; |
407 |
return false; |
407 |
}; |
408 |
}; |
Lines 419-425
Link Here
|
419 |
$(lastitemblock).remove(); |
420 |
$(lastitemblock).remove(); |
420 |
} |
421 |
} |
421 |
|
422 |
|
422 |
if(check_additem('[% UniqueItemFields | html %]') == false){ |
423 |
if(check_additem('[% Koha.Preference("UniqueItemFields") | html %]') == false){ |
423 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
424 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
424 |
if(tobedeleted) { |
425 |
if(tobedeleted) { |
425 |
$(lastitemblock).appendTo("#outeritemblock"); |
426 |
$(lastitemblock).appendTo("#outeritemblock"); |
Lines 478-484
Link Here
|
478 |
[% END %] |
479 |
[% END %] |
479 |
|
480 |
|
480 |
$(document).ready(function() { |
481 |
$(document).ready(function() { |
481 |
[% IF (AcqCreateItemReceiving) %] |
482 |
[% IF (AcqCreateItem == 'receiving') %] |
482 |
cloneItemBlock(0, '[% UniqueItemFields | html %]'); |
483 |
cloneItemBlock(0, '[% UniqueItemFields | html %]'); |
483 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
484 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
484 |
$("input[name='items_to_receive']").change(function() { |
485 |
$("input[name='items_to_receive']").change(function() { |
485 |
- |
|
|