Prozentzeichen bei Rabatt in der Kundenmaske anzeigen
[kivitendo-erp.git] / bin / mozilla / do.pl
index d5ad88b..06b4c4e 100644 (file)
@@ -165,7 +165,7 @@ sub order_links {
   $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
 
   # retrieve order/quotation
-  $form->{webdav}   = $::lx_office_conf{features}->{webdav};
+  $form->{webdav}   = $::instance_conf->get_webdav;
 
   my $editing = $form->{id};
 
@@ -396,7 +396,10 @@ sub update_delivery_order {
     my $rows = scalar @{ $form->{item_list} };
 
     if ($rows) {
-      $form->{"qty_$i"} = 1 unless $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+      $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+      if( !$form->{"qty_$i"} ) {
+        $form->{"qty_$i"} = 1;
+      }
 
       if ($rows > 1) {
 
@@ -504,14 +507,15 @@ sub orders {
   my $report = SL::ReportGenerator->new(\%myconfig, $form);
 
   my @hidden_variables = map { "l_${_}" } @columns;
-  push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber
-                                          transaction_description transdatefrom transdateto type vc employee_id salesman_id project_id);
+  push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber
+                                          transaction_description transdatefrom transdateto reqdatefrom reqdateto
+                                          type vc employee_id salesman_id project_id);
 
   my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
 
   my %column_defs = (
     'ids'                     => { 'text' => '', },
-    'transdate'               => { 'text' => $locale->text('Date'), },
+    'transdate'               => { 'text' => $locale->text('Delivery Order Date'), },
     'reqdate'                 => { 'text' => $locale->text('Reqdate'), },
     'id'                      => { 'text' => $locale->text('ID'), },
     'donumber'                => { 'text' => $locale->text('Delivery Order'), },
@@ -562,15 +566,20 @@ sub orders {
   if ($form->{ordnumber}) {
     push @options, $locale->text('Order Number') . " : $form->{ordnumber}";
   }
+  push @options, $locale->text('Serial Number') . " : $form->{serialnumber}" if $form->{serialnumber};
   if ($form->{transaction_description}) {
     push @options, $locale->text('Transaction description') . " : $form->{transaction_description}";
   }
-  if ($form->{transdatefrom}) {
-    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
-  }
-  if ($form->{transdateto}) {
-    push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1);
-  }
+  if ( $form->{transdatefrom} or $form->{transdateto} ) {
+    push @options, $locale->text('Delivery Order Date');
+    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1)     if $form->{transdatefrom};
+    push @options, $locale->text('Bis')  . " " . $locale->date(\%myconfig, $form->{transdateto},   1)     if $form->{transdateto};
+  };
+  if ( $form->{reqdatefrom} or $form->{reqdateto} ) {
+    push @options, $locale->text('Reqdate');
+    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{reqdatefrom}, 1)       if $form->{reqdatefrom};
+    push @options, $locale->text('Bis')  . " " . $locale->date(\%myconfig, $form->{reqdateto},   1)       if $form->{reqdateto};
+  };
   if ($form->{open}) {
     push @options, $locale->text('Open');
   }
@@ -688,25 +697,6 @@ sub delete {
 
   check_do_access();
 
-  my $form     = $main::form;
-  my $locale   = $main::locale;
-
-  map { delete $form->{$_} } qw(action header login password);
-  my @variables = map { { 'key' => $_, 'value' => $form->{$_} } } grep { '' eq ref $form->{$_} } keys %{ $form };
-
-  $form->{title} = $locale->text('Delete delivery order');
-  $form->header();
-
-  print $form->parse_html_template('do/delete', { 'VARIABLES' => \@variables });
-
-  $main::lxdebug->leave_sub();
-}
-
-sub delete_delivery_order {
-  $main::lxdebug->enter_sub();
-
-  check_do_access();
-
   my $form     = $main::form;
   my %myconfig = %main::myconfig;
   my $locale   = $main::locale;
@@ -1126,8 +1116,8 @@ sub display_stock_in_form {
 
   # Standardlagerplatz für Standard-Auslagern verwenden, falls keiner für die Ware explizit definiert wurde
   if ($::instance_conf->get_transfer_default_use_master_default_bin) {
-    $part_info->{warehouse_id} ||= $::instance_conf->get_default_warehouse_id;
-    $part_info->{bin_id}       ||= $::instance_conf->get_default_bin_id;
+    $part_info->{warehouse_id} ||= $::instance_conf->get_warehouse_id;
+    $part_info->{bin_id}       ||= $::instance_conf->get_bin_id;
   }
 
   my $units      = AM->retrieve_units(\%myconfig, $form);
@@ -1560,8 +1550,8 @@ sub transfer_in_out_default {
 
   # entsprechende defaults holen, falls standardlagerplatz verwendet werden soll
   if ($::instance_conf->get_transfer_default_use_master_default_bin) {
-    $default_warehouse_id = $::instance_conf->get_default_warehouse_id;
-    $default_bin_id       = $::instance_conf->get_default_bin_id;
+    $default_warehouse_id = $::instance_conf->get_warehouse_id;
+    $default_bin_id       = $::instance_conf->get_bin_id;
   }
 
 
@@ -1637,8 +1627,8 @@ sub transfer_in_out_default {
       # auslagern soll immer gehen, auch wenn nicht genügend auf lager ist.
       # der lagerplatz ist hier extra konfigurierbar, bspw. Lager-Korrektur mit
       # Lagerplatz Lagerplatz-Korrektur
-      my $default_warehouse_id_ignore_onhand = $::instance_conf->get_default_warehouse_id_ignore_onhand;
-      my $default_bin_id_ignore_onhand       = $::instance_conf->get_default_bin_id_ignore_onhand;
+      my $default_warehouse_id_ignore_onhand = $::instance_conf->get_warehouse_id_ignore_onhand;
+      my $default_bin_id_ignore_onhand       = $::instance_conf->get_bin_id_ignore_onhand;
       if ($::instance_conf->get_transfer_default_ignore_onhand && $default_bin_id_ignore_onhand) {
         # entsprechende defaults holen
         # falls chargenumber, bestbefore oder anzahl nicht stimmt, auf automatischen