From 82a9544a39aba6a691653c379c92b390c0733edb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 4 Jul 2007 12:56:43 +0000 Subject: [PATCH] =?utf8?q?Die=20Margen=20nur=20bei=20Verkaufsmasken=20anze?= =?utf8?q?igen,=20und=20auch=20nur=20in=20Zeilen,=20in=20denen=20schon=20e?= =?utf8?q?in=20Artikel=20ausgew=C3=A4hlt=20wurde.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/io.pl | 15 ++++++++++++--- bin/mozilla/oe.pl | 8 ++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 19f8113be..2c44d60c1 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -91,6 +91,11 @@ sub display_row { $lxdebug->enter_sub(); my $numrows = shift; + my $is_sales = + (substr($form->{type}, 0, 6) eq "sales_") + || (($form->{type} eq "invoice") && ($form->{script} eq "is.pl")) + || ($form->{type} eq 'credit_note'); + if ($lizenzen && $form->{vc} eq "customer") { if ($form->{type} =~ /sales_order/) { @column_index = (runningnumber, partnumber, description, ship, qty); @@ -525,10 +530,14 @@ sub display_row { |.$locale->text('Subtotal').qq|  |; + if ($form->{"id_$i"} && $is_sales) { + print qq| + ${marge_font_start}| . $locale->text('Ertrag') . qq| $form->{"marge_absolut_$i"}  $form->{"marge_percent_$i"} % ${marge_font_end} +  | . $locale->text('LP') . qq| | . $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2) . qq| +  | . $locale->text('EK') . qq| | . $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, 2); + } + print qq| - ${marge_font_start}|.$locale->text('Ertrag').qq| $form->{"marge_absolut_$i"}  $form->{"marge_percent_$i"} % ${marge_font_end} -  |.$locale->text('LP').qq| |.$form->format_amount(\%myconfig,$form->{"listprice_$i"},2).qq| -  |.$locale->text('EK').qq| |.$form->format_amount(\%myconfig,$form->{"lastcost_$i"},2).qq| |; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 452613c8f..424cf34a6 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1012,6 +1012,10 @@ sub form_footer { +|; + + if ($form->{type} =~ /^sales_/) { + print qq| @@ -1020,6 +1024,10 @@ sub form_footer { +|; + } + + print qq|
| . $locale->text('Ertrag') . qq| | . $form->format_amount(\%myconfig, $form->{marge_total}, 2, 0) . qq|| . $locale->text('Ertrag prozentual') . qq| | . $form->format_amount(\%myconfig, $form->{marge_percent}, 2, 0) . qq| %
-- 2.20.1