From 7db43b70c4f9d19cd07f0159e1ac1b454630623f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 16 Mar 2007 13:50:40 +0000 Subject: [PATCH] =?utf8?q?Einkaufs-/Verkaufsmasken:=20Da=20es=20das=20Zahl?= =?utf8?q?ungsziel=20in=20den=20Masken=20nicht=20mehr=20gibt,=20m=C3=BCsse?= =?utf8?q?n=20zur=20Berechnung=20des=20voreingestellten=20F=C3=A4lligkeits?= =?utf8?q?datums=20die=20beim=20Kunden/Lieferanten=20eingestellten=20Zahlu?= =?utf8?q?ngskonditionen=20benutzt=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IR.pm | 3 ++- SL/IS.pm | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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); diff --git a/SL/IS.pm b/SL/IS.pm index 3ccda5675..dd3eaf428 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1681,11 +1681,15 @@ sub get_customer { my $query = qq|SELECT c.name AS customer, c.discount, c.creditlimit, c.terms, c.email, c.cc, c.bcc, c.language_id, c.payment_id AS customer_payment_id, c.street, c.zipcode, c.city, c.country, - $duedate + c.terms AS duedate, c.notes AS intnotes, + $duedate + COALESCE(pt.terms_netto, 0) AS duedate, c.notes AS intnotes, b.discount AS tradediscount, b.description AS business, c.klass as customer_klass, c.taxzone_id FROM customer c LEFT JOIN business b ON (b.id = c.business_id) + LEFT JOIN payment_terms pt ON c.payment_id = pt.id WHERE c.id = $form->{customer_id}|; + $query =~ s/[\n\t]/ /g; + $query =~ s/ +/ /g; + $main::lxdebug->message(1, "qq $query"); my $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); -- 2.20.1