From: Moritz Bunkus Date: Thu, 7 Aug 2008 07:24:17 +0000 (+0000) Subject: Beim Anlegen eines Lieferscheins die Kunden-/Lieferantendetails auslesen (z.B. Sprache). X-Git-Tag: release-2.6.0beta1~7 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7fb467ccf1e1db80a86482b95c6c5c99269a0d16;p=kivitendo-erp.git Beim Anlegen eines Lieferscheins die Kunden-/Lieferantendetails auslesen (z.B. Sprache). --- diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 081f87821..9f59d0bfb 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -159,14 +159,19 @@ sub order_links { DO->retrieve('vc' => $form->{vc}, 'ids' => $form->{id}); - $payment_id = $form->{payment_id} if ($form->{payment_id}); - $language_id = $form->{language_id} if ($form->{language_id}); - $taxzone_id = $form->{taxzone_id} if ($form->{taxzone_id}); - $salesman_id = $form->{salesman_id} if ($editing); + $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes)); + $form->{shipto} = 1 if $form->{id}; + # get customer / vendor + if ($form->{vc} eq 'vendor') { + IR->get_vendor(\%myconfig, \%$form); + } else { + IS->get_customer(\%myconfig, \%$form); + } - $taxincluded = $form->{taxincluded}; - $form->{shipto} = 1 if $form->{id}; + $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id)); + $form->restore_vars(qw(taxincluded)) if $form->{id}; + $form->restore_vars(qw(salesman_id)) if $editing; if ($form->{"all_$form->{vc}"}) { unless ($form->{"$form->{vc}_id"}) { @@ -174,16 +179,6 @@ sub order_links { } } - $cp_id = $form->{cp_id}; - $intnotes = $form->{intnotes}; - - $form->{cp_id} = $cp_id; - - $form->{payment_id} = $payment_id if ($payment_id); - $form->{language_id} = $language_id if ($language_id); - $form->{taxzone_id} = $taxzone_id if ($taxzone_id); - $form->{intnotes} = $intnotes if ($intnotes); - ($form->{ $form->{vc} }) = split /--/, $form->{ $form->{vc} }; $form->{"old$form->{vc}"} = qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;