Kreditorenbuchungen: Beim Aufrufen aus dem Buchungsjournal das Gegenkonto richtig...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 1 Feb 2007 10:33:17 +0000 (10:33 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 1 Feb 2007 10:33:17 +0000 (10:33 +0000)
bin/mozilla/ap.pl

index 2f31a59..7b09f2f 100644 (file)
@@ -279,6 +279,8 @@ sub create_links {
     ($form->datetonum($form->{transdate}, \%myconfig) <=
      $form->datetonum($form->{closedto}, \%myconfig));
 
+  $form->{"APselected"} = $form->{"AP_1"};
+
   $lxdebug->leave_sub();
 }
 
@@ -321,6 +323,11 @@ sub form_header {
   }
   $readonly = ($form->{id}) ? "readonly" : "";
 
+  my $APselected_quoted = quotemeta($form->{"APselected"});
+  $form->{selectAP} = $form->{AP};
+  $form->{selectAP} =~
+    s/value=\"${APselected_quoted}\"/value=\"$form->{APselected}\" selected/;
+
   $form->{radier} =
     ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
   $readonly                 = ($form->{radier}) ? "" : $readonly;
@@ -776,10 +783,6 @@ sub update {
   #   $form->{selectAP_amount} =~
   #     s/value=\"$form->{AP_amountselected}\"/value=\"$form->{AP_amountselected}\" selected/;
 
-  $form->{selectAP} = $form->{AP};
-  $form->{selectAP} =~
-    s/value=\"$form->{APselected}\"/value=\"$form->{APselected}\" selected/;
-
   ($AP_amountaccno, $AP_amounttaxkey) =
     split(/--/, $form->{AP_amountselected});
   $form->{selecttaxchart} = $form->{taxchart};