X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIR.pm;h=30f49fd7c6f7bb47da723aff694a6fbbaf7a85b0;hb=e411fd61f5174cd315a083226bb5e2e071a2caf4;hp=8fa92e6374f457e82926e5b9fb7452b6243c94e0;hpb=8688e71eb56abdd9641f07a47135bb02841607fb;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index 8fa92e637..30f49fd7c 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -178,8 +178,6 @@ sub post_invoice { @values = ($form->{"sellprice_$i"}, conv_i($form->{"id_$i"})); do_query($form, $dbh, $query, @values); - $form->update_balance($dbh, "parts", "onhand", qq|id = ?|, $baseqty, $form->{"id_$i"}) if !$form->{shipped}; - # check if we sold the item already and # make an entry for the expense and inventory $query = @@ -572,9 +570,6 @@ sub reverse_invoice { next unless $ref->{inventory_accno_id}; - # update onhand - $form->update_balance($dbh, "parts", "onhand", qq|id = $ref->{parts_id}|, $ref->{qty}); - # if $ref->{allocated} > 0 than we sold that many items next if ($ref->{allocated} <= 0); @@ -1057,6 +1052,8 @@ sub retrieve_item { $stw->finish(); chop $ref->{taxaccounts}; + $ref->{onhand} *= 1; + push @{ $form->{item_list} }, $ref; }