Erfolgsrechnung: von pos_eur auf pos_er gelegt.
[kivitendo-erp.git] / bin / mozilla / do.pl
index 55c37ad..e0a40f3 100644 (file)
@@ -46,7 +46,6 @@ use SL::WH;
 use Sort::Naturally ();
 require "bin/mozilla/arap.pl";
 require "bin/mozilla/common.pl";
-require "bin/mozilla/invoice_io.pl";
 require "bin/mozilla/io.pl";
 require "bin/mozilla/reportgenerator.pl";
 
@@ -173,8 +172,6 @@ sub order_links {
   $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
 
   # retrieve order/quotation
-  $form->{webdav}   = $::instance_conf->get_webdav;
-
   my $editing = $form->{id};
 
   DO->retrieve('vc'  => $form->{vc},
@@ -1540,6 +1537,27 @@ sub mark_closed {
   $main::lxdebug->leave_sub();
 }
 
+sub display_form {
+  $::lxdebug->enter_sub;
+
+  $::auth->assert('purchase_delivery_order_edit | sales_delivery_order_edit');
+
+  relink_accounts();
+  retrieve_partunits();
+
+  my $new_rowcount = $::form->{"rowcount"} * 1 + 1;
+  $::form->{"project_id_${new_rowcount}"} = $::form->{"globalproject_id"};
+
+  $::form->language_payment(\%::myconfig);
+
+  Common::webdav_folder($::form);
+
+  form_header();
+  display_row(++$::form->{rowcount});
+  form_footer();
+
+  $::lxdebug->leave_sub;
+}
 
 sub yes {
   call_sub($main::form->{yes_nextsub});
@@ -1737,9 +1755,7 @@ sub transfer_in_out_default {
   undef (@all_requests);
   foreach my $i (1 .. $form->{rowcount}) {
     next unless ($form->{"id_$i"} && $form->{"stock_${prefix}_$i"});
-    foreach my $request (@{ DO->unpack_stock_information('packed' => $form->{"stock_${prefix}_$i"}) }) {
-      push @all_requests, $request;
-    }
+    push @all_requests, @{ DO->unpack_stock_information('packed' => $form->{"stock_${prefix}_$i"}) };
   }
   DO->transfer_in_out('direction' => $prefix,
                       'requests'  => \@all_requests);