Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ba6a1366

Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt

  • ID ba6a136694f2e54e7bf21b1ecfabfcb872784ef4
  • Vorgänger d0c938cf
  • Nachfolger 26892ad4

Verbesserung Lesbarkeit von Code

Dieser Commit verbessert noch an Stellen, die Währungen betreffen,
die Lesbarkeit des Codes.

Unterschiede anzeigen:

SL/IR.pm
1087 1087
         v.id AS vendor_id, v.name AS vendor, v.discount as vendor_discount,
1088 1088
         v.creditlimit, v.terms, v.notes AS intnotes,
1089 1089
         v.email, v.cc, v.bcc, v.language_id, v.payment_id,
1090
         v.street, v.zipcode, v.city, v.country, v.taxzone_id, (SELECT cu.name FROM currencies cu WHERE cu.id=v.currency_id) AS curr, v.direct_debit,
1090
         v.street, v.zipcode, v.city, v.country, v.taxzone_id, cu.name AS curr, v.direct_debit,
1091 1091
         $duedate + COALESCE(pt.terms_netto, 0) AS duedate,
1092 1092
         b.description AS business
1093 1093
       FROM vendor v
1094 1094
       LEFT JOIN business b       ON (b.id = v.business_id)
1095 1095
       LEFT JOIN payment_terms pt ON (v.payment_id = pt.id)
1096
       LEFT JOIN currencies cu    ON (v.currency_id = cu.id)
1096 1097
       WHERE 1=1 $where|;
1097 1098
  my $ref = selectfirst_hashref_query($form, $dbh, $query, @values);
1098 1099
  map { $params->{$_} = $ref->{$_} } keys %$ref;
......
1384 1385
  # fax and phone and email as vendor*
1385 1386
  my $query =
1386 1387
    qq|SELECT ct.*, cp.*, ct.notes as vendornotes, phone as vendorphone, fax as vendorfax, email as vendoremail,
1387
         (SELECT cu.name FROM currencies cu WHERE cu.id=ct.currency_id) AS currency
1388
         cu.name AS currency
1388 1389
       FROM vendor ct
1389 1390
       LEFT JOIN contacts cp ON (ct.id = cp.cp_cv_id)
1391
       LEFT JOIN currencies cu ON (ct.currency_id = cu.id)
1390 1392
       WHERE (ct.id = ?) $contact
1391 1393
       ORDER BY cp.cp_id
1392 1394
       LIMIT 1|;

Auch abrufbar als: Unified diff