]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/OE.pm
Merge von 684, 686-689 aus unstable: Sammelauftraege
[kivitendo-erp.git] / SL / OE.pm
index 4c65c05452aed199d01aed1c29840b807b15a485..4abdac0f99633b5d75a19cf5460274c0848d4776 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -467,6 +467,25 @@ sub close_orders {
 
   my ($self, $myconfig ,$form) = @_;
 
+  for my $i (1 .. $form->{rowcount}) {
+
+    map {
+      $form->{"${_}_$i"} = $form->parse_amount($myconfig, $form->{"${_}_$i"})
+    } qw(qty ship);
+    if ($delete_oe_id) {
+      $form->{"orderitems_id_$i"} = "";
+    }
+
+    if ($form->{"qty_$i"}) {
+
+      # set values to 0 if nothing entered
+      $form->{"discount_$i"} =
+        $form->parse_amount($myconfig, $form->{"discount_$i"});
+
+      $form->{"sellprice_$i"} =
+        $form->parse_amount($myconfig, $form->{"sellprice_$i"});
+    }
+  }
   # get ids from $form
   map { push @ids, $form->{"ordnumber_$_"} if $form->{"ordnumber_$_"} } (1 .. $form->{rowcount});