- my @column_index = qw(ndx partnumber description rop onhand unit sellprice);
- my %column_data;
- $column_data{ndx} = qq|<th> </th>|;
- $column_data{partnumber} =
- qq|<th class="listheading">| . $locale->text('Number') . qq|</th>|;
- $column_data{description} =
- qq|<th class="listheading">| . $locale->text('Part Description') . qq|</th>|;
- $column_data{sellprice} =
- qq|<th class="listheading">| . $locale->text('Price') . qq|</th>|;
- if ($is_purchase){
- $column_data{rop} =
- qq|<th class="listheading">| . $locale->text('ROP') . qq|</th>|;
- }# ende if $is_purchase -> Überschrift Mindestlagerbestand - ähnliche Prüfung weiter unten
- $column_data{onhand} =
- qq|<th class="listheading">| . $locale->text('Qty') . qq|</th>|;
- $column_data{unit} =
- qq|<th class="listheading">| . $locale->text('Unit') . qq|</th>|;
- # list items with radio button on a form
- $form->header;
-
- my $title = $locale->text('Select from one of the items below');
- my $colspan = $#column_index + 1;
-
- print qq|
- <body>
-
-<form method="post" action="$form->{script}">
-
-<table width="100%">
- <tr>
- <th class="listtop" colspan="$colspan">$title</th>
- </tr>
- <tr height="5"></tr>
- <tr class="listheading">|;
-
- map { print "\n$column_data{$_}" } @column_index;
-
- print qq|</tr>|;
-
- my $i = 0;
- my $j;
- foreach my $ref (@{ $form->{item_list} }) {
- my $checked = ($i++) ? "" : "checked";
-
- if ($::lx_office_conf{features}->{lizenzen}) {
- if ($ref->{inventory_accno} > 0) {
- $ref->{"lizenzen"} = qq|<option></option>|;
- foreach my $item (@{ $form->{LIZENZEN}{ $ref->{"id"} } }) {
- $ref->{"lizenzen"} .=
- qq|<option value=\"$item->{"id"}\">$item->{"licensenumber"}</option>|;
- }
- $ref->{"lizenzen"} .= qq|<option value="-1">Neue Lizenz</option>|;
- $ref->{"lizenzen"} =~ s/\"/"/g;
- }
- }
-
- my $display_sellprice = $ref->{sellprice} * (1 - $form->{tradediscount});
- $display_sellprice /= $ref->{price_factor} if ($ref->{price_factor});
- $display_sellprice = $form->format_amount(\%myconfig, $display_sellprice, 2);
- my $new_id = $ref->{id};
-
- map { $ref->{$_} = H($ref->{$_}) } qw(id partnumber description unit);