Revision 3578314f
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
480 | 480 |
|
481 | 481 |
my $query = |
482 | 482 |
"SELECT COALESCE(" . |
483 |
" (SELECT transdate FROM gl WHERE id = " .
|
|
484 |
" (SELECT MAX(id) FROM gl) LIMIT 1), " .
|
|
483 |
" (SELECT transdate FROM ap WHERE id = " .
|
|
484 |
" (SELECT MAX(id) FROM ap) LIMIT 1), " .
|
|
485 | 485 |
" current_date)"; |
486 | 486 |
($form->{transdate}) = $dbh->selectrow_array($query); |
487 | 487 |
|
SL/AR.pm | ||
---|---|---|
485 | 485 |
|
486 | 486 |
my $query = |
487 | 487 |
"SELECT COALESCE(" . |
488 |
" (SELECT transdate FROM gl WHERE id = " .
|
|
489 |
" (SELECT MAX(id) FROM gl) LIMIT 1), " .
|
|
488 |
" (SELECT transdate FROM ar WHERE id = " .
|
|
489 |
" (SELECT MAX(id) FROM ar) LIMIT 1), " .
|
|
490 | 490 |
" current_date)"; |
491 | 491 |
($form->{transdate}) = $dbh->selectrow_array($query); |
492 | 492 |
|
Auch abrufbar als: Unified diff
Das vorbelegte Rechnungsdatum bei den Debitoren- und den Kreditorenbuchungen mit den letzten Daten aus den richtigen Tabellen vorbelegen und nicht immer nur gl nehmen.