From: Waldemar Toews Date: Tue, 7 Jan 2014 09:47:43 +0000 (+0100) Subject: Artikelmenge nach Hinzufügen übernehmen X-Git-Tag: release-3.1.0beta1~22^2~38^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5629b51b3fb4c1675310a95332c7ed046b093548;p=kivitendo-erp.git Artikelmenge nach Hinzufügen übernehmen Behebt #2281 --- diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index a696f9c18..f986715eb 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1918,7 +1918,7 @@ sub save { } else { $i = $form->{assembly_rows}; } - $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); + $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"} > 0); $form->{sellprice} -= $form->{"sellprice_$i"} * $form->{"qty_$i"}; $form->{weight} -= $form->{"weight_$i"} * $form->{"qty_$i"}; @@ -1935,7 +1935,7 @@ sub save { # set values for last invoice/order item $i = $form->{rowcount}; - $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); + $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"} > 0); map { $form->{"${_}_$i"} = $newform{$_} } qw(partnumber description bin unit listprice inventory_accno income_accno expense_accno sellprice lastcost price_factor_id); map { $form->{"ic_${_}_$i"} = $newform{$_} } @ic_cvar_fields;