projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
[kivitendo-erp.git]
/
SL
/
IR.pm
diff --git
a/SL/IR.pm
b/SL/IR.pm
index
7f4389f
..
edf55f1
100644
(file)
--- a/
SL/IR.pm
+++ b/
SL/IR.pm
@@
-207,9
+207,9
@@
sub post_invoice {
next if $payments_only;
next if $payments_only;
- # update parts table
+ # update parts table
by setting lastcost to current price, don't allow negative values by using abs
$query = qq|UPDATE parts SET lastcost = ? WHERE id = ?|;
$query = qq|UPDATE parts SET lastcost = ? WHERE id = ?|;
- @values = (
$form->{"sellprice_$i"}
, conv_i($form->{"id_$i"}));
+ @values = (
abs($form->{"sellprice_$i"})
, conv_i($form->{"id_$i"}));
do_query($form, $dbh, $query, @values);
# check if we sold the item already and
do_query($form, $dbh, $query, @values);
# check if we sold the item already and