X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIS.pm;h=402df0d289499d82cfa23d61273aece22cdb6490;hb=84bed7a655edfe816ad2a04b5549b6bd6a968c79;hp=6523d243bb5606137025786503ae20cfa0e3f109;hpb=6968d2572f6ab7b0f1b2f61672f38833417037d7;p=kivitendo-erp.git diff --git a/SL/IS.pm b/SL/IS.pm index 6523d243b..402df0d28 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -711,9 +711,8 @@ sub post_invoice { $sth->execute || $form->dberror($query); if ($sth->fetchrow_array) { - $form->update_balance($dbh, "parts", "onhand", - qq|id = $form->{"id_$i"}|, - $baseqty * -1) + $form->update_balance($dbh, "parts", "onhand", qq|id = ?|, + $baseqty * -1, $form->{"id_$i"}) unless $form->{shipped}; } $sth->finish; @@ -721,9 +720,8 @@ sub post_invoice { # record assembly item as allocated &process_assembly($dbh, $form, $form->{"id_$i"}, $baseqty); } else { - $form->update_balance($dbh, "parts", "onhand", - qq|id = $form->{"id_$i"}|, - $baseqty * -1) + $form->update_balance($dbh, "parts", "onhand", qq|id = ?|, + $baseqty * -1, $form->{"id_$i"}) unless $form->{shipped}; $allocated = &cogs($dbh, $form, $form->{"id_$i"}, $baseqty, $basefactor, $i);