=item breedingid
the item's id in the breeding reservoir
-=item close
-
=back
=cut
our $biblionumber = $input->param('biblionumber');
our $basketno = $input->param('basketno');
my $suggestionid = $input->param('suggestionid');
-my $close = $input->param('close');
my $uncertainprice = $input->param('uncertainprice');
my $import_batch_id = $input->param('import_batch_id'); # if this is filled, we come from a staged file, and we will return here after saving the order !
my $from_subscriptionid = $input->param('from_subscriptionid');
};
}
-if ($close) {
- $budget_id = $data->{'budget_id'};
- $budget_name = $budget->{'budget_name'};
-
-}
$template->param( sort1 => $data->{'sort1'} );
$template->param( sort2 => $data->{'sort2'} );
# Find the items.barcode subfield for barcode validations
my (undef, $barcode_subfield) = GetMarcFromKohaField( 'items.barcode' );
-# fill template
-$template->param(
- close => $close,
- budget_id => $budget_id,
- budget_name => $budget_name
-) if ($close);
# get option values for gist syspref
my @gst_values = map {
$data->{'quantity'};
$quantity //= 0;
+# fill template
$template->param(
existing => $biblionumber,
ordernumber => $ordernumber,
<legend>Accounting details</legend>
<ol>
<li>
- [% IF ( close ) %]
- <span class="label required">Quantity: </span>
- <input type="hidden" name="quantity" value="[% quantity | html %]" />[% quantity | html %]
+ <label class="required" for="quantity">Quantity: </label>
+ [% IF subscriptionid %]
+ <input type="text" size="20" id="quantity" name="quantity" value="1" onchange="updateCosts();" />
+ [% ELSIF AcqCreateItemOrdering %]
+ [% IF basket.is_standing %]
+ <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
+ [% ELSE %]
+ <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
+ [% END %]
[% ELSE %]
- <label class="required" for="quantity">Quantity: </label>
- [% IF subscriptionid %]
- <input type="text" size="20" id="quantity" name="quantity" value="1" onchange="updateCosts();" />
- [% ELSIF AcqCreateItemOrdering %]
- [% IF basket.is_standing %]
- <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
- [% ELSE %]
- <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
- [% END %]
+ [% IF basket.is_standing %]
+ <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
[% ELSE %]
- [% IF basket.is_standing %]
- <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
- [% ELSE %]
- <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
- [% END %]
+ <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
[% END %]
- <span class="required">Required</span>
[% END %]
+ <span class="required">Required</span>
<!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
[% END %]
</li>
<li>
- [% IF ( close ) %]
- <span class="label required">Fund: </span>
- <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
- [% ELSE %]
<label class="required" for="budget_id">Fund: </label>
[% active_count = 0 %]
[% IF !ordernumber %]
style="padding-left:[% budget_loo.b_level | html %]em;"
>
[% END %]
- [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
+ [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
</option>
[% END %]
</select>
<span class="required">Required</span>
<label for="showallbudgets" style="float:none;"> Show inactive:</label>
<input type="checkbox" id="showallbudgets" />
- [% END %]
</li>
<li>
- [% IF ( close ) %]
- <span class="label">Currency: </span>
- <input type="hidden" name="currency" id="currency" value="[% currency | html %]" />[% currency | html %]
- [% ELSE %]
<label for="currency">Currency:</label>
<select name="currency" id="currency" onchange="updateCosts();">
[% FOREACH c IN currencies %]
[% END %]
[% END %]
</select>
- [% END %]
</li>
<li>
- [% IF ( close ) %]
- <span class="label">Vendor price: </span>
- <input type="hidden" name="listprice" id="listprice" value="[% listprice | html %]" />[% listprice | html %] [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
- [% ELSE %]
<label for="listprice">Vendor price: </label>
<input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
- [% END %]
</li>
- [% UNLESS ( close ) %]
<li>
<label for="uncertainprice">Uncertain price: </label>
[% IF ( uncertainprice ) %]
<input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
[% END %]
</li>
- [% END %]
[% IF ( gst_values ) %]
<li>
- [% IF ( close ) %]
- <span class="label">Tax rate: </span>
- <input type="hidden" name="tax_rate" id="tax_rate" value="[% tax_rate | html %]" />[% tax_rate | html %]%
- [% ELSE %]
- <label for="tax_rate">Tax rate: </label>
- <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
- [% FOREACH gst IN gst_values %]
- [% IF ( gst.option == tax_rate ) %]
- <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
- [% ELSE %]
- <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
- [% END %]
- [% END %]
- </select>
+ <label for="tax_rate">Tax rate: </label>
+ <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
+ [% FOREACH gst IN gst_values %]
+ [% IF ( gst.option == tax_rate ) %]
+ <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
+ [% ELSE %]
+ <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
+ [% END %]
[% END %]
- [% ELSE %]
+ </select>
+ [% ELSE %]
<input type="hidden" name="tax_rate" value="0" />
</li>
[% END %]
<li>
<label for="discount">Discount: </label>
- [% IF ( close ) %]
- [% IF ( orderdiscount ) %]
- <input type="hidden" name="discount" id="discount" value="[% orderdiscount | html %]" />[% orderdiscount_2dp | html %]%
- [% ELSE %]
- <input type="hidden" name="discount" id="discount" value="[% discount | html %]" />[% discount_2dp | html %]%
- [% END %]
+ [% IF ( orderdiscount ) %]
+ <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
[% ELSE %]
- [% IF ( orderdiscount ) %]
- <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
- [% ELSE %]
- <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
- [% END %]
+ <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
[% END %]
</li>
<li>
- [% IF ( close ) %]
- <span class="label">Retail price: </span>
- <input type="hidden" name="rrp" id="rrp" value="[% rrp | html %]" />[% rrp | html %] (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])
- [% ELSE %]
- <label for="rrp">Retail price: </label>
- <input type="text" size="20" name="rrp" id="rrp" value="[% rrp | html %]" /> (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])
- [% END %]
+ <label for="rrp">Retail price: </label>
+ <input type="text" size="20" name="rrp" id="rrp" value="[% rrp | html %]" /> (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])
</li>
<li>
<label for="replacementprice">Replacement cost: </label>