Zahlungsbedingungen nicht unter Angebot/Auftrag überschreiben.
authorThomas Heck <theck@linet-services.de>
Wed, 10 Oct 2012 13:43:57 +0000 (15:43 +0200)
committerThomas Heck <theck@linet-services.de>
Wed, 10 Oct 2012 13:43:57 +0000 (15:43 +0200)
fixt #2015

bin/mozilla/is.pl
bin/mozilla/oe.pl

index 56162d5..b08e5db 100644 (file)
@@ -407,7 +407,9 @@ sub form_footer {
   my ($tax, $subtotal);
   $form->{taxaccounts_array} = [ split / /, $form->{taxaccounts} ];
 
+  my $paymet_id = $::form->{payment_id};
   IS->get_customer(\%myconfig, \%$form) if $form->{type} =~ /sales_(order|quotation)/;
+  $::form->{payment_id} = $paymet_id;
 
   if ( $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) {
     $form->{taxincluded} = defined($form->{taxincluded_checked}) ? $form->{taxincluded_checked} : $myconfig{taxincluded_checked};
@@ -519,7 +521,7 @@ sub update {
     map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate);
     if (!$form->{"forex_$i"}) {   #read exchangerate from input field (not hidden)
       $form->{exchangerate} = $form->{"exchangerate_$i"};
-    } 
+    }
     $form->{"forex_$i"}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'buy');
     $form->{"exchangerate_$i"} = $form->{"forex_$i"} if $form->{"forex_$i"};
   }
index 51b3c77..9508f73 100644 (file)
@@ -477,7 +477,9 @@ sub form_footer {
   $TMPL_VAR{notes}    = qq|<textarea name=notes rows="$rows" cols="25">| . H($form->{notes}) . qq|</textarea>|;
   $TMPL_VAR{intnotes} = qq|<textarea name=intnotes rows="$introws" cols="35">| . H($form->{intnotes}) . qq|</textarea>|;
 
-  IS->get_customer(\%myconfig, \%$form) if $form->{type} =~ /sales_(order|quotation)/;
+  my $paymet_id = $::form->{payment_id};
+  IS->get_customer(\%myconfig, $::form) if $form->{type} =~ /sales_(order|quotation)/;
+  $::form->{payment_id} = $paymet_id;
 
   if ( $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) {
     $form->{taxincluded} = defined($form->{taxincluded_checked}) ? $form->{taxincluded_checked} : $myconfig{taxincluded_checked};
@@ -779,7 +781,7 @@ sub orders {
   my @columns = (
     "transdate",               "reqdate",
     "id",                      $ordnumber,
-    "customernumber", 
+    "customernumber",
     "name",                    "netamount",
     "tax",                     "amount",
     "curr",                    "employee",