Revision ba6a1366
Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
458 | 458 |
my $query = |
459 | 459 |
qq|SELECT ct.*, cp.*, ct.notes as customernotes, |
460 | 460 |
ct.phone AS customerphone, ct.fax AS customerfax, ct.email AS customeremail, |
461 |
(SELECT cu.name FROM currencies cu WHERE cu.id=ct.currency_id) AS currency
|
|
461 |
cu.name AS currency
|
|
462 | 462 |
FROM customer ct |
463 | 463 |
LEFT JOIN contacts cp on ct.id = cp.cp_cv_id |
464 |
LEFT JOIN currencies cu ON (ct.currency_id = cu.id) |
|
464 | 465 |
WHERE (ct.id = ?) $where |
465 | 466 |
ORDER BY cp.cp_id |
466 | 467 |
LIMIT 1|; |
... | ... | |
1750 | 1751 |
c.id AS customer_id, c.name AS customer, c.discount as customer_discount, c.creditlimit, c.terms, |
1751 | 1752 |
c.email, c.cc, c.bcc, c.language_id, c.payment_id, |
1752 | 1753 |
c.street, c.zipcode, c.city, c.country, |
1753 |
c.notes AS intnotes, c.klass as customer_klass, c.taxzone_id, c.salesman_id, (SELECT cu.name FROM currencies cu WHERE cu.id=c.currency_id) AS curr,
|
|
1754 |
c.notes AS intnotes, c.klass as customer_klass, c.taxzone_id, c.salesman_id, cu.name AS curr,
|
|
1754 | 1755 |
c.taxincluded_checked, c.direct_debit, |
1755 | 1756 |
$duedate + COALESCE(pt.terms_netto, 0) AS duedate, |
1756 | 1757 |
b.discount AS tradediscount, b.description AS business |
1757 | 1758 |
FROM customer c |
1758 | 1759 |
LEFT JOIN business b ON (b.id = c.business_id) |
1759 | 1760 |
LEFT JOIN payment_terms pt ON ($payment_id (c.payment_id = pt.id)) |
1761 |
LEFT JOIN currencies cu ON (c.currency_id=cu.id) |
|
1760 | 1762 |
WHERE c.id = ?|; |
1761 | 1763 |
push @values, $cid; |
1762 | 1764 |
$ref = selectfirst_hashref_query($form, $dbh, $query, @values); |
Auch abrufbar als: Unified diff
Verbesserung Lesbarkeit von Code
Dieser Commit verbessert noch an Stellen, die Währungen betreffen,
die Lesbarkeit des Codes.