Bug 7090 follow-up, setting DBrev number when pushing
[koha.git] / acqui / neworderempty.pl
index e99eeb0..459dfe8 100755 (executable)
@@ -330,7 +330,11 @@ if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber) {
     $template->param(items => \@itemloop);
 }
 # Get the item types list, but only if item_level_itype is YES. Otherwise, it will be in the item, no need to display it in the biblio
-my @itemtypes = C4::ItemType->all unless C4::Context->preference('item-level_itypes');
+my @itemtypes;
+@itemtypes = C4::ItemType->all unless C4::Context->preference('item-level_itypes');
+
+# Find the items.barcode subfield for barcode validations
+my (undef, $barcode_subfield) = GetMarcFromKohaField('items.barcode', '');
 
 # fill template
 $template->param(
@@ -382,8 +386,10 @@ $template->param(
     listprice        => sprintf("%.2f", $data->{'listprice'}||$data->{'price'}||$listprice),
     total            => sprintf("%.2f", ($data->{'ecost'}||0)*($data->{'quantity'}||0) ),
     ecost            => $data->{'ecost'},
+    unitprice        => sprintf("%.2f", $data->{'unitprice'}),
     notes            => $data->{'notes'},
     publishercode    => $data->{'publishercode'},
+    barcode_subfield => $barcode_subfield,
     
     import_batch_id  => $import_batch_id,