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 392-398
Link Here
|
392 |
[% Asset.js("js/cataloging.js") | $raw %] |
393 |
[% Asset.js("js/cataloging.js") | $raw %] |
393 |
<script> |
394 |
<script> |
394 |
function Check(form) { |
395 |
function Check(form) { |
395 |
[% IF (AcqCreateItemReceiving) %] |
396 |
[% IF (AcqCreateItem == 'receiving') %] |
396 |
var total_errors = CheckMandatorySubfields(form); |
397 |
var total_errors = CheckMandatorySubfields(form); |
397 |
if (total_errors != 0) { |
398 |
if (total_errors != 0) { |
398 |
var alertString = _("Form not submitted because of the following problem(s)"); |
399 |
var alertString = _("Form not submitted because of the following problem(s)"); |
Lines 402-408
Link Here
|
402 |
return false; |
403 |
return false; |
403 |
} |
404 |
} |
404 |
|
405 |
|
405 |
if(check_additem('[% UniqueItemFields | html %]') == false){ |
406 |
if(check_additem('[% Koha.Preference("UniqueItemFields") | html %]') == false){ |
406 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
407 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
407 |
return false; |
408 |
return false; |
408 |
}; |
409 |
}; |
Lines 420-426
Link Here
|
420 |
$(lastitemblock).remove(); |
421 |
$(lastitemblock).remove(); |
421 |
} |
422 |
} |
422 |
|
423 |
|
423 |
if(check_additem('[% UniqueItemFields | html %]') == false){ |
424 |
if(check_additem('[% Koha.Preference("UniqueItemFields") | html %]') == false){ |
424 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
425 |
alert(_("Duplicate values detected. Please correct the errors and resubmit.") ); |
425 |
if(tobedeleted) { |
426 |
if(tobedeleted) { |
426 |
$(lastitemblock).appendTo("#outeritemblock"); |
427 |
$(lastitemblock).appendTo("#outeritemblock"); |
Lines 479-485
Link Here
|
479 |
[% END %] |
480 |
[% END %] |
480 |
|
481 |
|
481 |
$(document).ready(function() { |
482 |
$(document).ready(function() { |
482 |
[% IF (AcqCreateItemReceiving) %] |
483 |
[% IF (AcqCreateItem == 'receiving') %] |
483 |
cloneItemBlock(0, '[% UniqueItemFields | html %]'); |
484 |
cloneItemBlock(0, '[% UniqueItemFields | html %]'); |
484 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
485 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
485 |
$("input[name='items_to_receive']").change(function() { |
486 |
$("input[name='items_to_receive']").change(function() { |
486 |
- |
|
|