From 3b21dee36ce7c81b395e9c57629d57bf5bd640b9 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Wed, 3 Mar 2010 13:20:43 +0100 Subject: [PATCH] =?utf8?q?Bug=201181:=20bei=20Gutschriften=20werden=20Zahl?= =?utf8?q?ungseing=C3=A4nge=20aus=20Rechnung=20nicht=20=C3=BCbernommen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/is.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index b90209f94..8e2046897 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -860,6 +860,9 @@ sub credit_note { my %myconfig = %main::myconfig; my $locale = $main::locale; + open(FH, ">/tmp/lx.dump"); + print FH Dumper($form); + close FH; $main::auth->assert('invoice_edit'); $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig); @@ -898,6 +901,16 @@ sub credit_note { $form->{creditremaining} -= ($form->{oldinvtotal} - $form->{ordtotal}); + # bei Gutschriften werden Zahlungseingänge aus Rechnung nicht übernommen + for my $i (1 .. $form->{paidaccounts}) { + delete $form->{"paid_$i"}; + delete $form->{"source_$i"}; + delete $form->{"memo_$i"}; + delete $form->{"datepaid_$i"}; + delete $form->{"AR_paid_$i"}; + }; + $form->{paidaccounts} = 1; + &prepare_invoice; -- 2.20.1