From: Sven Schöling Date: Mon, 12 Nov 2012 07:27:33 +0000 (+0100) Subject: Bei rekursivem Speichern von Artikeln die richtige Zeile editieren. X-Git-Tag: release-3.0.0beta1~9 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=43b585927cf026686116dc6d1d68ca13e1ee02aa;p=kivitendo-erp.git Bei rekursivem Speichern von Artikeln die richtige Zeile editieren. Mechanismus ist sehr unschön, das muss nochmal besser gemacht werden. behebt #1956 --- diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 9ee6e604b..5b3e66563 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1694,7 +1694,7 @@ sub assembly_row { $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}); $linetotal = $form->format_amount(\%myconfig, $linetotal, 2); $line_purchase_price = $form->format_amount(\%myconfig, $line_purchase_price, 2); - $href = qq|$form->{script}?action=edit&id=$form->{"id_$i"}&rowcount=$i&previousform=$previousform|; + $href = build_std_url("action=edit", qq|id=$form->{"id_$i"}|, "rowcount=$numrows", "currow=$i", "previousform=$previousform"); map { $row{$_}{data} = "" } qw(qty unit partnumber description bom partsgroup runningnumber); # last row @@ -1714,7 +1714,8 @@ sub assembly_row { $row{bom}{data} = $form->{"bom_$i"} ? "x" : " "; $row{qty}{align} = 'right'; } else { - $row{partnumber}{data} = qq|$form->{"partnumber_$i"}|; + $row{partnumber}{data} = qq|$form->{"partnumber_$i"}|; + $row{partnumber}{link} = $href; $row{qty}{data} = qq||; $row{runningnumber}{data} = qq||; $row{bom}{data} = sprintf qq||, @@ -1875,7 +1876,11 @@ sub save { qw(weight listprice sellprice rop); $form->{assembly_rows}--; - $i = $form->{assembly_rows}; + if ($newform{currow}) { + $i = $newform{currow}; + } else { + $i = $form->{assembly_rows}; + } $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); $form->{sellprice} -= $form->{"sellprice_$i"} * $form->{"qty_$i"}; diff --git a/templates/webpages/ic/assembly_row.html b/templates/webpages/ic/assembly_row.html index 1eaea8637..401b54a06 100644 --- a/templates/webpages/ic/assembly_row.html +++ b/templates/webpages/ic/assembly_row.html @@ -1,6 +1,7 @@ [%- USE T8 %] [%- USE LxERP %] [%- USE HTML %] +[%- USE L %] [% 'Individual Items' | $T8 %] @@ -20,7 +21,7 @@ [%- IF rcol.escape %]