Debitorenbuchungen: Beim Aufrufen aus dem Buchungsjournal heraus das richtige Gegenko...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 1 Feb 2007 10:39:11 +0000 (10:39 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 1 Feb 2007 10:39:11 +0000 (10:39 +0000)
bin/mozilla/ar.pl

index bff54d0..5b0273e 100644 (file)
@@ -292,6 +292,8 @@ sub create_links {
     ($form->datetonum($form->{transdate}, \%myconfig) <=
      $form->datetonum($form->{closedto}, \%myconfig));
 
+  $form->{"ARselected"} = $form->{"AR_1"};
+
   $lxdebug->leave_sub();
 }
 
@@ -331,6 +333,11 @@ sub form_header {
     ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
   $readonly = ($form->{radier}) ? "" : $readonly;
 
+  my $ARselected_quoted = quotemeta($form->{"ARselected"});
+  $form->{selectAR} = $form->{AR};
+  $form->{selectAR} =~
+    s/value=\"${ARselected_quoted}\"/value=\"$form->{ARselected}\" selected/;
+
   # set option selected
   foreach $item (qw(customer currency department employee)) {
     $form->{"select$item"} =~ s/ selected//;
@@ -799,11 +806,6 @@ sub update {
   #   $form->{selectAR_amount} =~
   #     s/value=\"$form->{AR_amountselected}\"/value=\"$form->{AR_amountselected}\" selected/;
 
-  $form->{selectAR} = $form->{AR};
-
-  $form->{selectAR} =~
-    s/value=\"$form->{ARselected}\"/value=\"$form->{ARselected}\" selected/;
-
   ($AR_amountaccno, $AR_amounttaxkey) =
     split(/--/, $form->{AR_amountselected});
   $form->{selecttaxchart} = $form->{taxchart};