Erste Version Template Toolkit Druck
[kivitendo-erp.git] / SL / IR.pm
index 1f0ae58..22c5dc1 100644 (file)
--- a/SL/IR.pm
+++ b/SL/IR.pm
@@ -1218,7 +1218,9 @@ sub retrieve_item {
 
   my $transdate = "";
   if ($form->{type} eq "invoice") {
-    $transdate = $form->{invdate} ? $dbh->quote($form->{invdate}) : "current_date";
+    $transdate = $form->{deliverydate} ? $dbh->quote($form->{deliverydate}) 
+               : $form->{invdate} ? $dbh->quote($form->{invdate}) 
+               : "current_date";
   } else {
     $transdate = $form->{transdate} ? $dbh->quote($form->{transdate}) : "current_date";
   }