Revision 7db43b70
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
996 | 996 |
my $query = qq|SELECT v.name AS vendor, v.creditlimit, v.terms, |
997 | 997 |
v.email, v.cc, v.bcc, v.language_id, v.payment_id, |
998 | 998 |
v.street, v.zipcode, v.city, v.country, v.taxzone_id, |
999 |
$duedate + v.terms AS duedate,
|
|
999 |
$duedate + COALESCE(pt.terms_netto, 0) AS duedate,
|
|
1000 | 1000 |
b.description AS business |
1001 | 1001 |
FROM vendor v |
1002 | 1002 |
LEFT JOIN business b ON b.id = v.business_id |
1003 |
LEFT JOIN payment_terms pt ON v.payment_id = pt.id |
|
1003 | 1004 |
WHERE v.id = $form->{vendor_id}|; |
1004 | 1005 |
my $sth = $dbh->prepare($query); |
1005 | 1006 |
$sth->execute || $form->dberror($query); |
SL/IS.pm | ||
---|---|---|
1681 | 1681 |
my $query = qq|SELECT c.name AS customer, c.discount, c.creditlimit, c.terms, |
1682 | 1682 |
c.email, c.cc, c.bcc, c.language_id, c.payment_id AS customer_payment_id, |
1683 | 1683 |
c.street, c.zipcode, c.city, c.country, |
1684 |
$duedate + c.terms AS duedate, c.notes AS intnotes,
|
|
1684 |
$duedate + COALESCE(pt.terms_netto, 0) AS duedate, c.notes AS intnotes,
|
|
1685 | 1685 |
b.discount AS tradediscount, b.description AS business, c.klass as customer_klass, c.taxzone_id |
1686 | 1686 |
FROM customer c |
1687 | 1687 |
LEFT JOIN business b ON (b.id = c.business_id) |
1688 |
LEFT JOIN payment_terms pt ON c.payment_id = pt.id |
|
1688 | 1689 |
WHERE c.id = $form->{customer_id}|; |
1690 |
$query =~ s/[\n\t]/ /g; |
|
1691 |
$query =~ s/ +/ /g; |
|
1692 |
$main::lxdebug->message(1, "qq $query"); |
|
1689 | 1693 |
my $sth = $dbh->prepare($query); |
1690 | 1694 |
$sth->execute || $form->dberror($query); |
1691 | 1695 |
|
Auch abrufbar als: Unified diff
Einkaufs-/Verkaufsmasken: Da es das Zahlungsziel in den Masken nicht mehr gibt, müssen zur Berechnung des voreingestellten Fälligkeitsdatums die beim Kunden/Lieferanten eingestellten Zahlungskonditionen benutzt werden.