changelog
[kivitendo-erp.git] / SL / IS.pm
index 3b0e156..7f49201 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -198,7 +198,7 @@ sub invoice_details {
       push @{ $form->{TEMPLATE_ARRAYS}->{longdescription} },   $form->{"longdescription_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{qty} },               $form->format_amount($myconfig, $form->{"qty_$i"});
       push @{ $form->{TEMPLATE_ARRAYS}->{unit} },              $form->{"unit_$i"};
-      push @{ $form->{TEMPLATE_ARRAYS}->{deliverydate_oe} },   $form->{"deliverydate_$i"};
+      push @{ $form->{TEMPLATE_ARRAYS}->{deliverydate_oe} },   $form->{"reqdate_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{sellprice} },         $form->{"sellprice_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{ordnumber_oe} },      $form->{"ordnumber_$i"};
       push @{ $form->{TEMPLATE_ARRAYS}->{transdate_oe} },      $form->{"transdate_$i"};
@@ -1017,13 +1017,6 @@ sub post_invoice {
                 conv_i($form->{"id"}));
   do_query($form, $dbh, $query, @values);
 
-  if($form->{"formname"} eq "credit_note") {
-    for my $i (1 .. $form->{rowcount}) {
-      $query = qq|UPDATE parts SET onhand = onhand - ? WHERE id = ?|;
-      @values = (conv_i($form->{"qty_$i"}), conv_i($form->{"id_$i"}));
-      do_query($form, $dbh, $query, @values);
-    }
-  }
 
   if ($form->{storno}) {
     $query =
@@ -1754,8 +1747,8 @@ sub retrieve_item {
 
   #Es soll auch nach EAN gesucht werden, ohne Einschränkung durch Beschreibung
   if ($form->{"partnumber_$i"} && !$form->{"description_$i"}) {
-       $where .= qq| OR (NOT p.obsolete = '1' AND p.ean = ? )|;
-       push @values, $form->{"partnumber_$i"};
+    $where .= qq| OR (NOT p.obsolete = '1' AND p.ean = ? )|;
+    push @values, $form->{"partnumber_$i"};
   }
 
   if ($form->{"description_$i"}) {
@@ -1954,38 +1947,6 @@ sub retrieve_item {
   $main::lxdebug->leave_sub();
 }
 
-##########################
-# Get data for the submitted order id
-# from database
-#
-sub get_order_data {
-
-  $main::lxdebug->enter_sub();
-
-  my $self      = shift;
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $dbh      = $form->get_standard_dbh();
-
-  my @values = (conv_i($form->{ordnumber}));
-
-  # We query the database for the fields we need using the submitted "ordnumber"
-  my $query = <<SQL;
-    SELECT o.payment_id, o.salesman_id, o.transdate AS orddate, o.taxzone_id, o.quonumber
-    FROM oe o
-    WHERE o.ordnumber = ?;
-SQL
-
-  # Do the actual query and return the results for later processing by our "frontend"
-  my ($result) = selectfirst_hashref_query($form, $dbh, $query, @values);
-
-  $dbh->disconnect;
-
-  $main::lxdebug->leave_sub();
-
-  return $result;
-}
-
 ##########################
 # get pricegroups from database
 # build up selected pricegroup