Wenn bei Rechnungen bei einer Zeile kein Projekt ausgewählt ist, dann richtigen Wert...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 20 Feb 2007 16:51:48 +0000 (16:51 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 20 Feb 2007 16:51:48 +0000 (16:51 +0000)
SL/IR.pm
SL/IS.pm

index 5970672..3bad7ce 100644 (file)
--- a/SL/IR.pm
+++ b/SL/IR.pm
@@ -383,7 +383,7 @@ sub post_invoice {
                  VALUES ($form->{id}, $form->{"id_$i"},
                  '$form->{"description_$i"}', | . ($form->{"qty_$i"} * -1) . qq|,  | . ($baseqty * -1) . qq|,
                  $form->{"sellprice_$i"}, $fxsellprice, $allocated,
-                 '$form->{"unit_$i"}', $deliverydate, | . conv_i($form->{"project_id_$i"}) . qq|,
+                 '$form->{"unit_$i"}', $deliverydate, | . conv_i($form->{"project_id_$i"}, 'NULL') . qq|,
                  '$form->{"serialnumber_$i"}')|;
       $dbh->do($query) || $form->dberror($query);
     }
index aa8ded9..18c615f 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -741,7 +741,7 @@ sub post_invoice {
                  '$form->{"description_$i"}', '$form->{"longdescription_$i"}', $form->{"qty_$i"},
                  $form->{"sellprice_$i"}, $fxsellprice,
                  $form->{"discount_$i"}, $allocated, 'f',
-                 '$form->{"unit_$i"}', $deliverydate, | . conv_i($form->{"project_id_$i"}) . qq|,
+                 '$form->{"unit_$i"}', $deliverydate, | . conv_i($form->{"project_id_$i"}, 'NULL') . qq|,
                  '$form->{"serialnumber_$i"}', '$pricegroup_id',
                  '$form->{"ordnumber_$i"}', '$form->{"transdate_$i"}', '$form->{"cusordnumber_$i"}', $baseqty, '$subtotal')|;
       $dbh->do($query) || $form->dberror($query);