projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Weitere Unterfunktion zu Form::get_lists() zum Auslesen von Kunden-/Lieferantentypen.
[kivitendo-erp.git]
/
SL
/
IR.pm
diff --git
a/SL/IR.pm
b/SL/IR.pm
index
e99a108
..
9a6ca9d
100644
(file)
--- a/
SL/IR.pm
+++ b/
SL/IR.pm
@@
-1013,13
+1013,15
@@
sub get_vendor {
$query = qq|SELECT o.amount,
(SELECT e.sell FROM exchangerate e
$query = qq|SELECT o.amount,
(SELECT e.sell FROM exchangerate e
- WHERE e.curr = o.curr AND e.transdate = o.transdate)
+ WHERE e.curr = o.curr AND e.transdate = o.transdate)
AS exch
FROM oe o WHERE o.vendor_id = ?
AND o.quotation = '0' AND o.closed = '0'|;
FROM oe o WHERE o.vendor_id = ?
AND o.quotation = '0' AND o.closed = '0'|;
- while (my ($amount, $exch) = selectfirst_array_query($form, $dbh, $query, $form->{vendor_id})) {
+ my $sth = prepare_execute_query($form, $dbh, $query, $form->{vendor_id});
+ while (my ($amount, $exch) = $sth->fetchrow_array()) {
$exch = 1 unless $exch;
$form->{creditremaining} -= $amount * $exch;
}
$exch = 1 unless $exch;
$form->{creditremaining} -= $amount * $exch;
}
+ $sth->finish();
# get shipto if we do not convert an order or invoice
if (!$form->{shipto}) {
# get shipto if we do not convert an order or invoice
if (!$form->{shipto}) {