]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/IS.pm
Beim Umwandeln von Auftrag in Rechnung wurden die Zahlungsbedingungen des Kunden...
[kivitendo-erp.git] / SL / IS.pm
index 55203db2af4de17838d9e072f382fe3ae43f8b42..a244686525c630c9f13b6cf4756254c62718ddca 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1525,7 +1525,7 @@ sub get_customer {
          b.discount AS tradediscount, b.description AS business
        FROM customer c
        LEFT JOIN business b ON (b.id = c.business_id)
-       LEFT JOIN payment_terms pt ON (c.payment_id = pt.id)
+       LEFT JOIN payment_terms pt ON (($form->{payment_id} = pt.id) OR (c.payment_id = pt.id))
        WHERE c.id = ?|;
   push @values, $cid;
   $ref = selectfirst_hashref_query($form, $dbh, $query, @values);