use CGI qw ( -utf8 );
use Carp;
use YAML qw/Load/;
+use List::MoreUtils qw/uniq/;
use C4::Context;
use C4::Auth;
} else {
SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
}
- # 3rd add order
- my $patron = C4::Members::GetMember( borrowernumber => $loggedinuser );
- # get quantity in the MARC record (1 if none)
- my $quantity = GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour')) || 1;
- my %orderinfo = (
- biblionumber => $biblionumber,
- basketno => $cgiparams->{'basketno'},
- quantity => $c_quantity,
- branchcode => $patron->{branchcode},
- budget_id => $c_budget_id,
- uncertainprice => 1,
- sort1 => $c_sort1,
- sort2 => $c_sort2,
- order_internalnote => $cgiparams->{'all_order_internalnote'},
- order_vendornote => $cgiparams->{'all_order_vendornote'},
- currency => $cgiparams->{'all_currency'},
- );
- # get the price if there is one.
- my $price= shift( @prices ) || GetMarcPrice($marcrecord, C4::Context->preference('marcflavour'));
- if ($price){
- # in France, the cents separator is the , but sometimes, ppl use a .
- # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
- $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
- $price = Koha::Number::Price->new($price)->unformat;
- $orderinfo{tax_rate} = $bookseller->tax_rate;
- my $c = $c_discount ? $c_discount : $bookseller->discount / 100;
- if ( $bookseller->listincgst ) {
- if ( $c_discount ) {
- $orderinfo{ecost} = $price;
- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c );
- } else {
- $orderinfo{ecost} = $price * ( 1 - $c );
- $orderinfo{rrp} = $price;
+
+ # Add items from MarcItemFieldsToOrder
+ my @homebranches = $input->multi_param('homebranch');
+ my $count = scalar @homebranches;
+ my @holdingbranches = $input->multi_param('holdingbranch');
+ my @itypes = $input->multi_param('itype');
+ my @nonpublic_notes = $input->multi_param('nonpublic_note');
+ my @public_notes = $input->multi_param('public_note');
+ my @locs = $input->multi_param('loc');
+ my @ccodes = $input->multi_param('ccodes');
+ my @notforloans = $input->multi_param('notforloans');
+ my @uris = $input->multi_param('uri');
+ my @copynos = $input->multi_param('copyno');
+ my @budget_codes = $input->multi_param('budget_code');
+ my @itemprices = $input->multi_param('itemprice');
+ my $itemcreation = 0;
+ for (my $i = 0; $i < $count; $i++) {
+ $itemcreation = 1;
+ my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({
+ homebranch => $homebranches[$i],
+ holdingbranch => $holdingbranches[$i],
+ itemnotes_nonpublic => $nonpublic_notes[$i],
+ itemnotes => $public_notes[$i],
+ location => $locs[$i],
+ ccode => $ccodes[$i],
+ notforloan => $notforloans[$i],
+ uri => $uris[$i],
+ copynumber => $copynos[$i],
+ price => $itemprices[$i],
+ }, $biblionumber);
+ }
+ if ($itemcreation == 1) {
+ # Group orderlines from MarcItemFieldsToOrder
+ my $budget_hash;
+ for (my $i = 0; $i < $count; $i++) {
+ $budget_hash->{$budget_codes[$i]}->{quantity} += 1;
+ $budget_hash->{$budget_codes[$i]}->{price} = $itemprices[$i];
+ }
+
+ # Create orderlines from MarcItemFieldsToOrder
+ while(my ($budget_id, $infos) = each $budget_hash) {
+ if ($budget_id) {
+ my %orderinfo = (
+ biblionumber => $biblionumber,
+ basketno => $cgiparams->{'basketno'},
+ quantity => $infos->{quantity},
+ budget_id => $budget_id,
+ currency => $cgiparams->{'all_currency'},
+ );
+
+ my $price = $infos->{price};
+ if ($price){
+ # in France, the cents separator is the , but sometimes, ppl use a .
+ # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
+ $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
+ $price = Koha::Number::Price->new($price)->unformat;
+ $orderinfo{gstrate} = $bookseller->{gstrate};
+ my $c = $c_discount ? $c_discount : $bookseller->{discount} / 100;
+ if ( $bookseller->{listincgst} ) {
+ if ( $c_discount ) {
+ $orderinfo{ecost} = $price;
+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c );
+ } else {
+ $orderinfo{ecost} = $price * ( 1 - $c );
+ $orderinfo{rrp} = $price;
+ }
+ } else {
+ if ( $c_discount ) {
+ $orderinfo{ecost} = $price / ( 1 + $orderinfo{gstrate} );
+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c );
+ } else {
+ $orderinfo{rrp} = $price / ( 1 + $orderinfo{gstrate} );
+ $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $c );
+ }
+ }
+ $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
+ $orderinfo{unitprice} = $orderinfo{ecost};
+ $orderinfo{total} = $orderinfo{ecost} * $infos->{quantity};
+ } else {
+ $orderinfo{listprice} = 0;
+ }
+
+ # remove uncertainprice flag if we have found a price in the MARC record
+ $orderinfo{uncertainprice} = 0 if $orderinfo{listprice};
+ my $order = Koha::Acquisition::Order->new( \%orderinfo )->insert;
}
- } else {
- if ( $c_discount ) {
- $orderinfo{ecost} = $price / ( 1 + $orderinfo{tax_rate} );
- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c );
+ }
+ } else {
+ # 3rd add order
+ my $patron = C4::Members::GetMember( borrowernumber => $loggedinuser );
+ # get quantity in the MARC record (1 if none)
+ my $quantity = GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour')) || 1;
+ my %orderinfo = (
+ biblionumber => $biblionumber,
+ basketno => $cgiparams->{'basketno'},
+ quantity => $c_quantity,
+ branchcode => $patron->{branchcode},
+ budget_id => $c_budget_id,
+ uncertainprice => 1,
+ sort1 => $c_sort1,
+ sort2 => $c_sort2,
+ order_internalnote => $cgiparams->{'all_order_internalnote'},
+ order_vendornote => $cgiparams->{'all_order_vendornote'},
+ currency => $cgiparams->{'all_currency'},
+ );
+ # get the price if there is one.
+ my $price= shift( @prices ) || GetMarcPrice($marcrecord, C4::Context->preference('marcflavour'));
+ if ($price){
+ # in France, the cents separator is the , but sometimes, ppl use a .
+ # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
+ $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
+ $price = Koha::Number::Price->new($price)->unformat;
+ $orderinfo{gstrate} = $bookseller->{gstrate};
+ my $c = $c_discount ? $c_discount : $bookseller->{discount} / 100;
+ if ( $bookseller->{listincgst} ) {
+ if ( $c_discount ) {
+ $orderinfo{ecost} = $price;
+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c );
+ } else {
+ $orderinfo{ecost} = $price * ( 1 - $c );
+ $orderinfo{rrp} = $price;
+ }
} else {
- $orderinfo{rrp} = $price / ( 1 + $orderinfo{tax_rate} );
- $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $c );
+ if ( $c_discount ) {
+ $orderinfo{ecost} = $price / ( 1 + $orderinfo{gstrate} );
+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c );
+ } else {
+ $orderinfo{rrp} = $price / ( 1 + $orderinfo{gstrate} );
+ $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $c );
+ }
}
+ $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
+ $orderinfo{unitprice} = $orderinfo{ecost};
+ $orderinfo{total} = $orderinfo{ecost} * $c_quantity;
+ } else {
+ $orderinfo{listprice} = 0;
}
- $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
- $orderinfo{unitprice} = $orderinfo{ecost};
- $orderinfo{total} = $orderinfo{ecost} * $c_quantity;
- } else {
- $orderinfo{listprice} = 0;
- }
# remove uncertainprice flag if we have found a price in the MARC record
$orderinfo{uncertainprice} = 0 if $orderinfo{listprice};
for (my $qtyloop=1;$qtyloop <= $c_quantity;$qtyloop++) {
my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber );
$order->add_item( $itemnumber );
+ }
+ } else {
+ SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
}
- } else {
- SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
}
$imported++;
}
push @{$budget_loop},
{ b_id => $r->{budget_id},
b_txt => $r->{budget_name},
+ b_code => $r->{budget_code},
b_sort1_authcat => $r->{'sort1_authcat'},
b_sort2_authcat => $r->{'sort2_authcat'},
b_active => $r->{budget_period_active},
return () unless $batch and $batch->{import_status} =~ /^staged$|^reverted$/;
my $biblios = GetImportRecordsRange($import_batch_id,'','',$batch->{import_status});
my @list = ();
+ my $item_id = 1;
+ my $item_error = 0;
+
+ my $ccodes = GetKohaAuthorisedValues("items.ccode");
+ my $locations = GetKohaAuthorisedValues("items.location");
+ # location list
+ my @locations;
+ foreach (sort keys %$locations) {
+ push @locations, { code => $_, description => "$_ - " . $locations->{$_} };
+ }
+ my @ccodes;
+ foreach (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) {
+ push @ccodes, { code => $_, description => $ccodes->{$_} };
+ }
+
+
foreach my $biblio (@$biblios) {
my $citation = $biblio->{'title'};
);
my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} );
my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information";
- my $infos = get_infos_syspref($marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2']);
+
+ my $infos = get_infos_syspref('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2']);
my $price = $infos->{price};
my $quantity = $infos->{quantity};
my $budget_code = $infos->{budget_code};
$budget_id = $biblio_budget->{budget_id};
}
}
- $cellrecord{price} = $price || '';
- $cellrecord{quantity} = $quantity || '';
- $cellrecord{budget_id} = $budget_id || '';
- $cellrecord{discount} = $discount || '';
- $cellrecord{sort1} = $sort1 || '';
- $cellrecord{sort2} = $sort2 || '';
+ # Items
+ my @itemlist = ();
+ my $all_items_quantity = 0;
+ my $alliteminfos = get_infos_syspref_on_item('MarcItemFieldsToOrder', $marcrecord, ['homebranch', 'holdingbranch', 'itype', 'nonpublic_note', 'public_note', 'loc', 'ccode', 'notforloan', 'uri', 'copyno', 'price', 'quantity', 'budget_code']);
+ if ($alliteminfos != -1) {
+ foreach my $iteminfos (@$alliteminfos) {
+ my $item_homebranch = $iteminfos->{homebranch};
+ my $item_holdingbranch = $iteminfos->{holdingbranch};
+ my $item_itype = $iteminfos->{itype};
+ my $item_nonpublic_note = $iteminfos->{nonpublic_note};
+ my $item_public_note = $iteminfos->{public_note};
+ my $item_loc = $iteminfos->{loc};
+ my $item_ccode = $iteminfos->{ccode};
+ my $item_notforloan = $iteminfos->{notforloan};
+ my $item_uri = $iteminfos->{uri};
+ my $item_copyno = $iteminfos->{copyno};
+ my $item_quantity = $iteminfos->{quantity} || 1;
+ my $item_budget_code = $iteminfos->{budget_code};
+ my $item_price = $iteminfos->{price};
+
+ for (my $i = 0; $i < $item_quantity; $i++) {
+
+ my %itemrecord = (
+ 'item_id' => $item_id++,
+ 'homebranch' => $item_homebranch,
+ 'holdingbranch' => $item_holdingbranch,
+ 'itype' => $item_itype,
+ 'nonpublic_note' => $item_nonpublic_note,
+ 'public_note' => $item_public_note,
+ 'loc' => $item_loc,
+ 'ccode' => $item_ccode,
+ 'notforloan' => $item_notforloan,
+ 'uri' => $item_uri,
+ 'copyno' => $item_copyno,
+ 'quantity' => $item_quantity,
+ 'budget_code' => $item_budget_code || $budget_code,
+ 'itemprice' => $item_price || $price,
+ );
+ $all_items_quantity++;
+ push @itemlist, \%itemrecord;
+
+ }
+ }
+
+ $cellrecord{'iteminfos'} = \@itemlist;
+ } else {
+ $item_error = 1;
+ }
push @list, \%cellrecord;
+
+ if ($alliteminfos == -1 || scalar(@$alliteminfos) == 0) {
+ $cellrecord{price} = $price || '';
+ $cellrecord{quantity} = $quantity || '';
+ $cellrecord{budget_id} = $budget_id || '';
+ $cellrecord{discount} = $discount || '';
+ $cellrecord{sort1} = $sort1 || '';
+ $cellrecord{sort2} = $sort2 || '';
+ } else {
+ $cellrecord{quantity} = $all_items_quantity;
+ }
+
}
my $num_records = $batch->{'num_records'};
my $overlay_action = GetImportBatchOverlayAction($import_batch_id);
my $nomatch_action = GetImportBatchNoMatchAction($import_batch_id);
my $item_action = GetImportBatchItemAction($import_batch_id);
+ my @itypes = Koha::ItemTypes->search;
$template->param(biblio_list => \@list,
num_results => $num_records,
import_batch_id => $import_batch_id,
"nomatch_action_${nomatch_action}" => 1,
nomatch_action => $nomatch_action,
"item_action_${item_action}" => 1,
- item_action => $item_action
+ item_action => $item_action,
+ item_error => $item_error,
+ branchloop => GetBranchesLoop(),
+ locationloop => \@locations,
+ itypeloop => \@itypes,
+ ccodeloop => \@ccodes,
);
batch_info($template, $batch);
}
}
sub get_infos_syspref {
- my ($record, $field_list) = @_;
- my $syspref = C4::Context->preference('MarcFieldsToOrder');
+ my ($syspref_name, $record, $field_list) = @_;
+ my $syspref = C4::Context->preference($syspref_name);
$syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
my $yaml = eval {
YAML::Load($syspref);
};
if ( $@ ) {
- warn "Unable to parse MarcFieldsToOrder syspref : $@";
+ warn "Unable to parse $syspref syspref : $@";
return ();
}
my $r;
}
return $r;
}
+
+sub equal_number_of_fields {
+ my ($tags_list, $record) = @_;
+ my $refcount = 0;
+ my $count = 0;
+ for my $tag (@$tags_list) {
+ return -1 if $count != $refcount;
+ $count = 0;
+ for my $field ($record->field($tag)) {
+ $count++;
+ }
+ $refcount = $count if ($refcount == 0);
+ }
+ return -1 if $count != $refcount;
+ return $count;
+}
+
+sub get_infos_syspref_on_item {
+ my ($syspref_name, $record, $field_list) = @_;
+ my $syspref = C4::Context->preference($syspref_name);
+ $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
+ my $yaml = eval {
+ YAML::Load($syspref);
+ };
+ if ( $@ ) {
+ warn "Unable to parse $syspref syspref : $@";
+ return ();
+ }
+ my @result;
+ my @tags_list;
+
+ # Check tags in syspref definition
+ for my $field_name ( @$field_list ) {
+ next unless exists $yaml->{$field_name};
+ my @fields = split /\|/, $yaml->{$field_name};
+ for my $field ( @fields ) {
+ my ( $f, $sf ) = split /\$/, $field;
+ next unless $f and $sf;
+ push @tags_list, $f;
+ }
+ }
+ @tags_list = List::MoreUtils::uniq(@tags_list);
+
+ my $tags_count = equal_number_of_fields(\@tags_list, $record);
+ # Return if the number of theses fields in the record is not the same.
+ return -1 if $tags_count == -1;
+
+ # Gather the fields
+ my $fields_hash;
+ foreach my $tag (@tags_list) {
+ my @tmp_fields;
+ foreach my $field ($record->field($tag)) {
+ push @tmp_fields, $field;
+ }
+ $fields_hash->{$tag} = \@tmp_fields;
+ }
+
+ for (my $i = 0; $i < $tags_count; $i++) {
+ my $r;
+ for my $field_name ( @$field_list ) {
+ next unless exists $yaml->{$field_name};
+ my @fields = split /\|/, $yaml->{$field_name};
+ for my $field ( @fields ) {
+ my ( $f, $sf ) = split /\$/, $field;
+ next unless $f and $sf;
+ my $v = $fields_hash->{$f}[$i]->subfield( $sf );
+ $r->{$field_name} = $v if (defined $v);
+ last if $yaml->{$field};
+ }
+ }
+ push @result, $r;
+ }
+ return \@result;
+}
$("select[name='all_budget_id']").change();
- $("#records_to_import fieldset.rows ol").hide();
+ $("#records_to_import fieldset.rows div").hide();
$('input:checkbox[name="import_record_id"]').change(function(){
var container = $(this).parents("fieldset");
if ( $(this).is(':checked') ) {
$(container).addClass("selected");
$(container).removeClass("unselected");
- $(container).find("ol").toggle(true);
+ $(container).find("div").toggle(true);
} else {
$(container).addClass("unselected");
$(container).removeClass("selected");
- $(container).find("ol").toggle(false);
+ $(container).find("div").toggle(false);
}
} );
if ( error > 0 ) {
alert(error + " " + _("quantity values are not filled in or are not numbers"));
return false;
+
+ }
+ var error = 0;
+ $("select[name='budget_code']").each(function() {
+ if (!$(this).val()) {
+ error++;
+ }
+ });
+ if ( error > 0 ) {
+ alert(_("Some budgets are not defined in item records"));
+ return false;
}
return disableUnchecked($(this));
( <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id %]" class="previewData">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&breedingid=[% biblio.import_record_id %]&import_batch_id=[% biblio.import_batch_id %]&biblionumber=[% biblio.match_biblionumber %]">Add order</a> )
</span>
</legend>
+ <div style="float:left">
<ol>
<li class="status">
<span class="match">
<input id="sort2_record_[% biblio.import_record_id %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" />
</li>
</ol>
+ </div>
+ <div style="float:right">
+ [% IF item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
+ [% FOREACH item IN biblio.iteminfos %]
+ <fieldset>
+ <legend>Item Record [% item.item_id %]</legend>
+ <ol>
+ <li>
+ <label for="homebranch_item_[% item.item_id %]">homebranch</label><select id="homebranch_item_[% item.item_id %]" name="homebranch">
+ [% FOREACH branchloo IN branchloop %]
+ [% IF ( branchloo.value ) == ( item.homebranch ) %]
+ <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
+ [% ELSE %]
+ <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
+
+ <li><label for="holdingbranch_item_[% item.item_id %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id %]" name="holdingbranch">
+ [% FOREACH branchloo IN branchloop %]
+ [% IF ( branchloo.value ) == ( item.holdingbranch ) %]
+ <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
+ [% ELSE %]
+ <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
+ <li><label for="itype_item_[% item.item_id %]">itype</label><select id="itype_item_[% item.item_id %]" name="itype">
+ [% FOREACH itypeloo IN itypeloop %]
+ [% IF ( itypeloo.value ) == ( item.itype ) %]
+ <option value="[% itypeloo.itemtype %]" selected="selected">[% itypeloo.description |html %]</option>
+ [% ELSE %]
+ <option value="[% itypeloo.itemtype %]">[% itypeloo.description |html %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
+
+ <li><label for="nonpublic_note_item_[% item.item_id %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id %]" name="nonpublic_note" value="[% item.nonpublic_note %]"></li>
+ <li><label for="public_note_item_[% item.item_id %]">public_note</label><input type="text" id="public_note_item_[% item.item_id %]" name="public_note" value="[% item.public_note %]"></li>
+ <li><label for="loc_item_[% item.item_id %]">loc</label><select id="loc_item_[% item.item_id %]" name="loc">
+ <option value=""> </option>
+ [% FOREACH locationloo IN locationloop %]
+ [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %]
+ [% END %]
+ </select>
+ </li>
+
+ <li><label for="ccode_item_[% item.item_id %]">ccode</label><select id="ccode_item_[% item.item_id %]" name="ccode">
+ [% FOREACH ccodeloo IN ccodeloop %]
+ [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code %]" selected="selected">[% ccodeloo.description %]</option>[% ELSE %]<option value="[% ccodeloo.code %]">[% ccodeloo.description %]</option>[% END %]
+ [% END %]
+ </select>
+ </li>
+
+ <li><label for="notforloan_item_[% item.item_id %]">notforloan</label><input type="text" id="notforloan_item_[% item.item_id %]" name="notforloan" value="[% item.notforloan %]"></li>
+ <li><label for="uri_item_[% item.item_id %]">uri</label><input type="text" id="uri_item_[% item.item_id %]" name="uri" value="[% item.uri %]"></li>
+ <li><label for="copyno_item_[% item.item_id %]">copyno</label><input type="text" id="copyno_item_[% item.item_id %]" name="copyno" value="[% item.copyno %]"></li>
+ <li><label for="budget_code_item_[% item.item_id %]">budget_code</label><select id="budget_code_item_[% item.item_id %]" name="budget_code">
+ <option value="">Select a fund</option>
+ [% FOREACH budget_loo IN budget_loop %]
+ [% IF ( budget_loo.b_code ) == ( item.budget_code ) %]<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
+ [% ELSE %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
+ <li><label for="price_item_[% item.item_id %]">price</label><input type="text" id="price_item_[% item.item_id %]" name="itemprice" value="[% item.itemprice %]"></li>
+ </ol>
+ </fieldset>
+ [% END %]
+ </div>
</fieldset>
<div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
<div class="modal-dialog">