]> wagnertech.de Git - kivitendo-erp.git/commitdiff
EK-/VK-Preis bei Erzeugnissen
authorNiclas Zimmermann <niclas@kivitendo-premium.de>
Mon, 15 Apr 2013 12:05:21 +0000 (14:05 +0200)
committerNiclas Zimmermann <niclas@kivitendo-premium.de>
Mon, 15 Apr 2013 12:31:06 +0000 (14:31 +0200)
Wenn man bei einem Erzeugnis eine falsche Artikelnummer bei einem
Erzeugnis eingetragen hat und dann auf den Zurück-Button gedrückt hat,
so haben sich EK-/VK-Preis verändert. Jetzt bleibt er gleich.

Weiterhin wurde das Verhalten beim Hinzufügen eines Artikels ver-
bessert. Bisher wurde immer der Verkaufspreis des Artikels auf den
Verkaufspreis addiert, wenn der Artikel durch eine Auswahlliste
hinzugefügt wurde. Dieses Verhalten ist aber nur im unteren Abschnitt
bei der Summe aller Verkaufspreise erwünscht.

bin/mozilla/ic.pl
bin/mozilla/io.pl

index b1540e161cd46cf640d7fa7f8d7fc191cb604eba..c0841cfa939e51723bb9eda4fbe05de4484008f9 100644 (file)
@@ -1761,12 +1761,14 @@ sub update {
 
   # parse pricegroups. and no, don't rely on check_form for this...
   map { $form->{"price_$_"} = $form->parse_amount(\%myconfig, $form->{"price_$_"}) } 1 .. $form->{price_rows};
+  $form->{sellprice} = $form->parse_amount(\%myconfig, $form->{sellprice});
 
   # same for makemodel lastcosts
   # but parse_amount not necessary for assembly component lastcosts
   unless ($form->{item} eq "assembly") {
     map { $form->{"lastcost_$_"} = $form->parse_amount(\%myconfig, $form->{"lastcost_$_"}) } 1 .. $form->{"makemodel_rows"};
   };
+  $form->{listprice} = $form->parse_amount(\%myconfig, $form->{listprice});
 
   if ($form->{item} eq "assembly") {
     my $i = $form->{assembly_rows};
index 4ec2729255f4e3c1fbc0e7f1a201399f5141afbc..515d08ec172380712dafd0a90764158d9d083981 100644 (file)
@@ -571,7 +571,6 @@ sub item_selected {
   map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
     qw(sellprice listprice weight);
 
-  $form->{sellprice} += ($form->{"sellprice_$i"} * $form->{"qty_$i"});
   $form->{weight}    += ($form->{"weight_$i"} * $form->{"qty_$i"});
 
   if ($form->{"not_discountable_$i"}) {