projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unterstützung für strukturierte Variablennamen und Hash- und Arraystrukturen in ...
[kivitendo-erp.git]
/
SL
/
IS.pm
diff --git
a/SL/IS.pm
b/SL/IS.pm
index
a244686
..
8ecddff
100644
(file)
--- a/
SL/IS.pm
+++ b/
SL/IS.pm
@@
-1513,6
+1513,12
@@
sub get_customer {
}
my $cid = conv_i($form->{customer_id});
}
my $cid = conv_i($form->{customer_id});
+ my $payment_id;
+
+ if ($form->{payment_id}) {
+ $payment_id = "(pt.id = ?) OR";
+ push @values, conv_i($form->{payment_id});
+ }
# get customer
$query =
# get customer
$query =
@@
-1525,7
+1531,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)
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 (
($form->{payment_id} = pt.id) OR
(c.payment_id = pt.id))
+ LEFT JOIN payment_terms pt ON (
$payment_id
(c.payment_id = pt.id))
WHERE c.id = ?|;
push @values, $cid;
$ref = selectfirst_hashref_query($form, $dbh, $query, @values);
WHERE c.id = ?|;
push @values, $cid;
$ref = selectfirst_hashref_query($form, $dbh, $query, @values);