From 77903c6cafdfa031fc10c0512ff1aaf6cda409cf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 5 May 2008 07:13:59 +0000 Subject: [PATCH] =?utf8?q?Anlegen=20von=20Waren=20und=20Dienstleistungen?= =?utf8?q?=20aus=20Vorg=C3=A4ngen=20heraus:=20Beim=20eingegebenen=20Preis?= =?utf8?q?=20wurde=20der=20Nachkommaanteil=20abgeschnitten.=20Zus=C3=A4tzl?= =?utf8?q?ich=20wird=20der=20Preis=20nun=20beim=20"Einkaufspreis"=20einget?= =?utf8?q?ragen,=20wenn=20der=20Artikel=20aus=20einem=20Einkaufsformular?= =?utf8?q?=20heraus=20angelegt=20wird.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/io.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 93c2668c7..da884bc78 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -618,6 +618,8 @@ sub new_item { _check_io_auth(); + my $price_key = ($form->{type} =~ m/request_quotation|purchase_order/) || ($form->{script} eq 'ir.pl') ? 'lastcost' : 'sellprice'; + # change callback $form->{old_callback} = $form->escape($form->{callback}, 1); $form->{callback} = $form->escape("$form->{script}?action=display_form", 1); @@ -627,8 +629,9 @@ sub new_item { push @HIDDENS, { 'name' => 'previousform', 'value' => $form->escape($previousform, 1) }; push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{$_} }, qw(rowcount vc); - push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{"${_}_$form->{rowcount}"} }, qw(partnumber description unit sellprice); + push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{"${_}_$form->{rowcount}"} }, qw(partnumber description unit); push @HIDDENS, { 'name' => 'taxaccount2', 'value' => $form->{taxaccounts} }; + push @HIDDENS, { 'name' => $price_key, 'value' => $form->parse_amount(\%myconfig, $form->{"sellprice_$form->{rowcount}"}) }; $form->header(); print $form->parse_html_template("generic/new_item", { HIDDENS => [ sort { $a->{name} cmp $b->{name} } @HIDDENS ] } ); -- 2.20.1