From 6f4692e80ae92e825ea1c485a18f1fcfb847f469 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 10 Jan 2012 09:52:43 +0100 Subject: [PATCH] =?utf8?q?customer=5Fid=20statt=20oldcustomer=20nach=20che?= =?utf8?q?ck=5Fname=20benutzen=20um=20Kunden=C3=A4nderung=20festzustellen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das Format von oldcustomer ist abhängig vom vclimit Status, im select Fall ist es Name--Id, ansonsten nur Name. --- bin/mozilla/ar.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 1522339b8..a6e122067 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1046,13 +1046,12 @@ sub update { $form->{invdate} = $form->{transdate}; - my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 oldcustomer); + my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 customer_id); &check_name("customer"); - # check_name ruft get_customer auf, oldcustomer wird überschrieben, daher wird dies vorher gemerkt - # get_customer holt Bemerkungen als intnotes, für Debitorenbuchungen gibt es aber nur das Feld notes - $form->{notes} = $form->{intnotes} if $saved_variables{oldcustomer} ne $form->{customer}; + # check_name loads customer notes into notes, but ar only knows intnotes, so copy them + $form->{notes} = $form->{intnotes} if $saved_variables{customer_id} != $form->{customer_id}; $form->{AR} = $saved_variables{AR}; if ($saved_variables{AR_amount_1} =~ m/.--./) { -- 2.20.1