]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Eine Aenderung zuviel in den Abfragen: Lieferdatum wurde nicht mehr berucksichtigt
authorPhilip Reetz <p.reetz@linet-services.de>
Mon, 26 Feb 2007 15:03:24 +0000 (15:03 +0000)
committerPhilip Reetz <p.reetz@linet-services.de>
Mon, 26 Feb 2007 15:03:24 +0000 (15:03 +0000)
SL/USTVA.pm

index d7e2e428e870020f64b41a5129897aebd5d22221..f69cd2dd3f20ff22b2c2eed4be66bae5c37542c9 100644 (file)
@@ -739,7 +739,7 @@ sub get_accounts_ustva {
            SELECT id FROM taxkeys 
            WHERE chart_id   = ac.chart_id 
              -- AND taxkey_id  = ac.taxkey 
-             AND startdate <= COALESCE(ar.transdate)
+             AND startdate <= COALESCE(ar.deliverydate,ar.transdate)
            ORDER BY startdate DESC LIMIT 1
          )
        )
@@ -777,7 +777,7 @@ sub get_accounts_ustva {
          tk.id = (
            SELECT id FROM taxkeys 
            WHERE chart_id   = ac.chart_id 
-             AND startdate <= COALESCE(ar.transdate)
+             AND startdate <= COALESCE(ar.deliverydate,ar.transdate)
            ORDER BY startdate DESC LIMIT 1
          )
        )