-########################################
- # Eintrag fuer Version 2.2.0 geaendert #
- # neue Optik im Rechnungsformular #
-########################################
- $column_data{runningnumber} =
- qq|<th align="left" nowrap width="5" class="listheading">|
- . $locale->text('No.')
- . qq|</th>|;
- $column_data{partnumber} =
- qq|<th align="left" nowrap width="12" class="listheading">|
- . $locale->text('Number')
- . qq|</th>|;
- $column_data{description} =
- qq|<th align="left" nowrap width="30" class="listheading">|
- . $locale->text('Part Description')
- . qq|</th>|;
- if ($form->{"type"} eq "purchase_order") {
- $column_data{ship} =
- qq|<th align="left" nowrap width="5" class="listheading">|
- . $locale->text('Ship rcvd')
- . qq|</th>|;
- } else {
- $column_data{ship} =
- qq|<th align="left" nowrap width="5" class="listheading">|
- . $locale->text('Ship')
- . qq|</th>|;
- }
- $column_data{qty} =
- qq|<th align="left" nowrap width="5" class="listheading">|
- . $locale->text('Qty')
- . qq|</th>|;
- $column_data{unit} =
- qq|<th align="left" nowrap width="5" class="listheading">|
- . $locale->text('Unit')
- . qq|</th>|;
- $column_data{license} =
- qq|<th align="left" nowrap width="10" class="listheading">|
- . $locale->text('License')
- . qq|</th>|;
- $column_data{serialnr} =
- qq|<th align="left" nowrap width="10" class="listheading">|
- . $locale->text('Serial No.')
- . qq|</th>|;
- $column_data{projectnr} =
- qq|<th align="left" nowrap width="10" class="listheading">|
- . $locale->text('Project')
- . qq|</th>|;
- $column_data{sellprice} =
- qq|<th align="left" nowrap width="15" class="listheading">|
- . $locale->text('Price')
- . qq|</th>|;
- $column_data{sellprice_pg} =
- qq|<th align="left" nowrap width="15" class="listheading">|
- . $locale->text('Pricegroup')
- . qq|</th>|;
- $column_data{discount} =
- qq|<th align="left" class="listheading">|
- . $locale->text('Discount')
- . qq|</th>|;
- $column_data{linetotal} =
- qq|<th align="left" nowrap width="10" class="listheading">|
- . $locale->text('Extended')
- . qq|</th>|;
- $column_data{bin} =
- qq|<th align="left" nowrap width="10" class="listheading">|
- . $locale->text('Bin')
- . qq|</th>|;
-############## ENDE Neueintrag ##################
-
- $myconfig{"show_form_details"} = 1
- unless (defined($myconfig{"show_form_details"}));
- $form->{"show_details"} = $myconfig{"show_form_details"}
- unless (defined($form->{"show_details"}));
- $form->{"show_details"} = $form->{"show_details"} ? 1 : 0;
- my $show_details_new = 1 - $form->{"show_details"};
- my $show_details_checked = $form->{"show_details"} ? "checked" : "";
+ retrieve_partunits();
+ }
+
+ # column_index
+ my @header_sort = qw(runningnumber partnumber description ship qty unit sellprice_pg sellprice discount linetotal);
+ my @HEADER = (
+ { id => 'runningnumber', width => 5, value => $locale->text('No.'), display => 1, },
+ { id => 'partnumber', width => 8, value => $locale->text('Number'), display => 1, },
+ { id => 'description', width => 30, value => $locale->text('Part Description'), display => 1, },
+ { id => 'ship', width => 5, value => $locale->text('Delivered'), display => $is_s_p_order, },
+ { id => 'qty', width => 5, value => $locale->text('Qty'), display => 1, },
+ { id => 'price_factor', width => 5, value => $locale->text('Price Factor'), display => !$is_delivery_order, },
+ { id => 'unit', width => 5, value => $locale->text('Unit'), display => 1, },
+ { id => 'license', width => 10, value => $locale->text('License'), display => 0, },
+ { id => 'serialnr', width => 10, value => $locale->text('Serial No.'), display => 0, },
+ { id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, },
+ { id => 'sellprice', width => 15, value => $locale->text('Price'), display => !$is_delivery_order, },
+ { id => 'sellprice_pg', width => 8, value => $locale->text('Pricegroup'), display => ($form->{type} =~ /^(sales_|invoice)/) && !$is_delivery_order, },
+ { id => 'discount', width => 5, value => $locale->text('Discount'), display => !$is_delivery_order, },
+ { id => 'linetotal', width => 10, value => $locale->text('Extended'), display => !$is_delivery_order, },
+ { id => 'bin', width => 10, value => $locale->text('Bin'), display => 0, },
+ { id => 'stock_in_out', width => 10, value => $stock_in_out_title, display => $is_delivery_order, },
+ );
+ my @column_index = map { $_->{id} } grep { $_->{display} } @HEADER;