X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6df2a3e3cccf01db1c3590c91f9b3fefb85f5dfd..7db43b70c4f9d19cd07f0159e1ac1b454630623f:/SL/IR.pm diff --git a/SL/IR.pm b/SL/IR.pm index 5533a2775..9ddc48634 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -996,10 +996,11 @@ sub get_vendor { my $query = qq|SELECT v.name AS vendor, v.creditlimit, v.terms, v.email, v.cc, v.bcc, v.language_id, v.payment_id, v.street, v.zipcode, v.city, v.country, v.taxzone_id, - $duedate + v.terms AS duedate, + $duedate + COALESCE(pt.terms_netto, 0) AS duedate, b.description AS business FROM vendor v LEFT JOIN business b ON b.id = v.business_id + LEFT JOIN payment_terms pt ON v.payment_id = pt.id WHERE v.id = $form->{vendor_id}|; my $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query);