Revision a5f409be
Von Philip Reetz vor etwa 17 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
1513 | 1513 |
} |
1514 | 1514 |
|
1515 | 1515 |
my $cid = conv_i($form->{customer_id}); |
1516 |
|
|
1516 |
my $payment_id = ($form->{payment_id}) ? "($form->{payment_id} = pt.id) OR" : ""; |
|
1517 | 1517 |
# get customer |
1518 | 1518 |
$query = |
1519 | 1519 |
qq|SELECT |
... | ... | |
1525 | 1525 |
b.discount AS tradediscount, b.description AS business |
1526 | 1526 |
FROM customer c |
1527 | 1527 |
LEFT JOIN business b ON (b.id = c.business_id) |
1528 |
LEFT JOIN payment_terms pt ON (($form->{payment_id} = pt.id) OR (c.payment_id = pt.id))
|
|
1528 |
LEFT JOIN payment_terms pt ON ($payment_id (c.payment_id = pt.id))
|
|
1529 | 1529 |
WHERE c.id = ?|; |
1530 | 1530 |
push @values, $cid; |
1531 | 1531 |
$ref = selectfirst_hashref_query($form, $dbh, $query, @values); |
Auch abrufbar als: Unified diff
Fehler bei neuen Rechnungen ohne Umwandlung