Revision e33a252f
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
1013 | 1013 |
|
1014 | 1014 |
$query = qq|SELECT o.amount, |
1015 | 1015 |
(SELECT e.sell FROM exchangerate e |
1016 |
WHERE e.curr = o.curr AND e.transdate = o.transdate) |
|
1016 |
WHERE e.curr = o.curr AND e.transdate = o.transdate) AS exch
|
|
1017 | 1017 |
FROM oe o WHERE o.vendor_id = ? |
1018 | 1018 |
AND o.quotation = '0' AND o.closed = '0'|; |
1019 |
while (my ($amount, $exch) = selectfirst_array_query($form, $dbh, $query, $form->{vendor_id})) { |
|
1019 |
my $sth = prepare_execute_query($form, $dbh, $query, $form->{vendor_id}); |
|
1020 |
while (my ($amount, $exch) = $sth->fetchrow_array()) { |
|
1020 | 1021 |
$exch = 1 unless $exch; |
1021 | 1022 |
$form->{creditremaining} -= $amount * $exch; |
1022 | 1023 |
} |
1024 |
$sth->finish(); |
|
1023 | 1025 |
|
1024 | 1026 |
# get shipto if we do not convert an order or invoice |
1025 | 1027 |
if (!$form->{shipto}) { |
Auch abrufbar als: Unified diff
Falsche Verwendung einer neu eingeführten Datenbankhilfsfunktion, die zu einer Endlosschleife geführt hat.