From: Moritz Bunkus Date: Wed, 4 Jul 2007 12:56:43 +0000 (+0000) Subject: Die Margen nur bei Verkaufsmasken anzeigen, und auch nur in Zeilen, in denen schon... X-Git-Tag: release-2.4.3^2~47 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=82a9544a39aba6a691653c379c92b390c0733edb;p=kivitendo-erp.git Die Margen nur bei Verkaufsmasken anzeigen, und auch nur in Zeilen, in denen schon ein Artikel ausgewählt wurde. --- 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| %