menuv3 strict
[kivitendo-erp.git] / bin / mozilla / invoice_io.pl
index 1286429..d947bae 100644 (file)
@@ -117,9 +117,9 @@ use Data::Dumper;
 #  }
 ############### ENDE Neueintrag ##################
 #
-#  my $dimension_units = AM->retrieve_units(\%myconfig, $form, "dimension");
-#  my $service_units = AM->retrieve_units(\%myconfig, $form, "service");
 #  my $all_units = AM->retrieve_units(\%myconfig, $form);
+#  my $dimension_units = $all_units;
+#  my $service_units = $all_units;
 #
 #  my %price_factors = map { $_->{id} => $_->{factor} } @{ $form->{ALL_PRICE_FACTORS} };
 #
@@ -323,7 +323,7 @@ use Data::Dumper;
 #    $qty_dec = length $qty_dec;
 #
 #    $column_data{qty} =
-#        qq|<td align="right"><input name="qty_$i" size="5" value="|
+#        qq|<td align="right" nowrap><input name="qty_$i" size="5" value="|
 #      . $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec) .qq|">|;
 #    if ($form->{"formel_$i"}) {
 #      $column_data{qty} .= qq|<button type="button" onclick="calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)">| . $locale->text('*/') . qq|</button>|
@@ -596,7 +596,12 @@ sub set_pricegroup {
 sub display_form {
   $lxdebug->enter_sub();
 
+  $auth->assert('part_service_assembly_edit   | vendor_invoice_edit       | sales_order_edit    | invoice_edit |' .
+                'request_quotation_edit       | sales_quotation_edit      | purchase_order_edit | '.
+                'purchase_delivery_order_edit | sales_delivery_order_edit');
+
   relink_accounts();
+  retrieve_partunits() if ($form->{type} =~ /_delivery_order$/);
 
   my $new_rowcount = $form->{"rowcount"} * 1 + 1;
   $form->{"project_id_${new_rowcount}"} = $form->{"globalproject_id"};