From 3578314fb94f63b04ee3bf34e91f1bed898fc434 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 29 Jan 2007 15:34:25 +0000 Subject: [PATCH] Das vorbelegte Rechnungsdatum bei den Debitoren- und den Kreditorenbuchungen mit den letzten Daten aus den richtigen Tabellen vorbelegen und nicht immer nur gl nehmen. --- SL/AP.pm | 4 ++-- SL/AR.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index 6925c20d1..072c66529 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -480,8 +480,8 @@ sub get_transdate { my $query = "SELECT COALESCE(" . - " (SELECT transdate FROM gl WHERE id = " . - " (SELECT MAX(id) FROM gl) LIMIT 1), " . + " (SELECT transdate FROM ap WHERE id = " . + " (SELECT MAX(id) FROM ap) LIMIT 1), " . " current_date)"; ($form->{transdate}) = $dbh->selectrow_array($query); diff --git a/SL/AR.pm b/SL/AR.pm index 5c588f37d..5edd4161a 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -485,8 +485,8 @@ sub get_transdate { my $query = "SELECT COALESCE(" . - " (SELECT transdate FROM gl WHERE id = " . - " (SELECT MAX(id) FROM gl) LIMIT 1), " . + " (SELECT transdate FROM ar WHERE id = " . + " (SELECT MAX(id) FROM ar) LIMIT 1), " . " current_date)"; ($form->{transdate}) = $dbh->selectrow_array($query); -- 2.20.1