Revision aea2a093
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1970 | 1970 |
$reference_date = $reference_date ? conv_dateq($reference_date) . '::DATE' : 'current_date'; |
1971 | 1971 |
|
1972 | 1972 |
my $dbh = $self->get_standard_dbh($myconfig); |
1973 |
my $payment_id;
|
|
1973 |
my ($payment_id, $duedate);
|
|
1974 | 1974 |
|
1975 | 1975 |
if($self->{payment_id}) { |
1976 | 1976 |
$payment_id = $self->{payment_id}; |
... | ... | |
1979 | 1979 |
($payment_id) = selectrow_query($self, $dbh, $query, $self->{vendor_id}); |
1980 | 1980 |
} |
1981 | 1981 |
|
1982 |
my $query = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|; |
|
1983 |
my ($duedate) = selectrow_query($self, $dbh, $query, $payment_id); |
|
1982 |
if ($payment_id) { |
|
1983 |
my $query = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|; |
|
1984 |
($duedate) = selectrow_query($self, $dbh, $query, $payment_id); |
|
1985 |
} |
|
1984 | 1986 |
|
1985 | 1987 |
$main::lxdebug->leave_sub(); |
1986 | 1988 |
|
Auch abrufbar als: Unified diff
Überflüssiges Query vermeiden, wenn keine Zahlungsbedingungen ausgewählt sind