Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2387a1fc

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID 2387a1fccb259789836aa1a9da44528be4d63bec
  • Vorgänger 92e42ded
  • Nachfolger 70a063c3

Beim Aufrufen der Masken für Dialogbuchen, Debitoren- und Kreditorenrechnungen wird das zuletzt bebuchte Datum als Datum für die neue Maske ausgewählt.

Unterschiede anzeigen:

SL/AP.pm
470 470
  $main::lxdebug->leave_sub();
471 471
}
472 472

  
473
sub get_transdate {
474
  $main::lxdebug->enter_sub();
475

  
476
  my ($self, $myconfig, $form) = @_;
477

  
478
  # connect to database
479
  my $dbh = $form->dbconnect($myconfig);
480

  
481
  my $query =
482
    "SELECT COALESCE(" .
483
    "  (SELECT transdate FROM gl WHERE id = " .
484
    "    (SELECT MAX(id) FROM gl) LIMIT 1), " .
485
    "  current_date)";
486
  ($form->{transdate}) = $dbh->selectrow_array($query);
487

  
488
  $dbh->disconnect;
489

  
490
  $main::lxdebug->leave_sub();
491
}
492

  
473 493
1;
474 494

  
SL/AR.pm
475 475
  $main::lxdebug->leave_sub();
476 476
}
477 477

  
478
sub get_transdate {
479
  $main::lxdebug->enter_sub();
480

  
481
  my ($self, $myconfig, $form) = @_;
482

  
483
  # connect to database
484
  my $dbh = $form->dbconnect($myconfig);
485

  
486
  my $query =
487
    "SELECT COALESCE(" .
488
    "  (SELECT transdate FROM gl WHERE id = " .
489
    "    (SELECT MAX(id) FROM gl) LIMIT 1), " .
490
    "  current_date)";
491
  ($form->{transdate}) = $dbh->selectrow_array($query);
492

  
493
  $dbh->disconnect;
494

  
495
  $main::lxdebug->leave_sub();
496
}
497

  
478 498
1;
479 499

  
SL/GL.pm
646 646

  
647 647
    $sth->finish;
648 648
  } else {
649
    $query = "SELECT current_date AS transdate, closedto, revtrans
650
              FROM defaults";
651
    $sth = $dbh->prepare($query);
652
    $sth->execute || $form->dberror($query);
653

  
654
    ($form->{transdate}, $form->{closedto}, $form->{revtrans}) =
655
      $sth->fetchrow_array;
649
    $query = "SELECT closedto, revtrans FROM defaults";
650
    ($form->{closedto}, $form->{revtrans}) = $dbh->selectrow_array($query);
651
    $query =
652
      "SELECT COALESCE(" .
653
      "  (SELECT transdate FROM gl WHERE id = " .
654
      "    (SELECT MAX(id) FROM gl) LIMIT 1), " .
655
      "  current_date)";
656
    ($form->{transdate}) = $dbh->selectrow_array($query);
656 657

  
657 658
    # get tax description
658 659
    $query = qq| SELECT * FROM tax t order by t.taxkey|;
bin/mozilla/ap.pl
79 79
    unless $form->{callback};
80 80

  
81 81
  &create_links;
82
  AP->get_transdate(\%myconfig, $form);
82 83
  &display_form;
83 84

  
84 85
  $lxdebug->leave_sub();
bin/mozilla/ar.pl
79 79
    unless $form->{callback};
80 80

  
81 81
  &create_links;
82
  AR->get_transdate(\%myconfig, $form);
82 83
  &display_form;
83 84

  
84 85
  $lxdebug->leave_sub();

Auch abrufbar als: Unified diff