From a842826405b29ac07c13b98ec7fd5da358a0cb6a Mon Sep 17 00:00:00 2001 From: Bernd Blessmann Date: Fri, 13 May 2011 14:56:39 +0200 Subject: [PATCH 1/1] =?utf8?q?Bug=201630:=20=20kein=20Rabatt=20auf=20nicht?= =?utf8?q?=20rabattierf=C3=A4hige=20Artikel?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit im workflow (Auftrag->)Lieferschein->Rechnung --- bin/mozilla/do.pl | 11 ++++++++--- bin/mozilla/io.pl | 2 +- doc/changelog | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 1b7a10960..99a2cc751 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -401,6 +401,7 @@ sub update_delivery_order { && ($form->{"description_$i"} eq "")) { $form->{rowcount}--; $form->{"discount_$i"} = ""; + $form->{"not_discountable_$i"} = ""; display_form(); } else { @@ -745,9 +746,13 @@ sub invoice { for my $i (1 .. $form->{rowcount}) { # für bug 1284 - if ($form->{discount}){ # Falls wir einen Lieferanten-/Kundenrabatt haben - # und keinen anderen discount wert an $i ... - $form->{"discount_$i"} ||= $form->{discount}*100; # ... nehmen wir diesen Rabatt + unless ($form->{"ordnumber"}) { + if ($form->{discount}) { # Falls wir einen Lieferanten-/Kundenrabatt haben + # und rabattfähig sind, dann + unless ($form->{"not_discountable_$i"}) { + $form->{"discount_$i"} = $form->{discount}*100; # ... nehmen wir diesen Rabatt + } + } } map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if $form->{"${_}_${i}"} } qw(ship qty sellprice listprice lastcost basefactor); } diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index b26bce415..866e5ec32 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -370,7 +370,7 @@ sub display_row { if ($is_delivery_order) { map { $form->{"${_}_${i}"} = $form->format_amount(\%myconfig, $form->{"${_}_${i}"}) } qw(sellprice discount lastcost); - push @hidden_vars, qw(sellprice discount price_factor_id lastcost); + push @hidden_vars, qw(sellprice discount not_discountable price_factor_id lastcost); push @hidden_vars, "stock_${stock_in_out}_sum_qty", "stock_${stock_in_out}"; } diff --git a/doc/changelog b/doc/changelog index eefcecbda..b76755204 100644 --- a/doc/changelog +++ b/doc/changelog @@ -44,6 +44,7 @@ - Bugfix 1633: Stammdatenaufruf aus SEPA-Modul - Bugfix 1575: Kundenrabatt geht verloren - Bugfix 1647: Lieferanten-Einkaufspreise verlieren Nachkommastellen + - Bugfix 1630: Rabatt wird auf der Rechnung auch auf nicht rabattierfähige Artikel gewährt 2011-02-02 - Release 2.6.2 -- 2.20.1