Revision 0e523230
Von Jan Büren vor mehr als 11 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
170 | 170 |
$uid = substr($uid, 2, 75); |
171 | 171 |
|
172 | 172 |
$query = |
173 |
qq|INSERT INTO ap (invnumber, employee_id) | . |
|
174 |
qq|VALUES (?, (SELECT e.id FROM employee e WHERE e.login = ?))|; |
|
175 |
do_query($form, $dbh, $query, $uid, $form->{login}); |
|
173 |
qq|INSERT INTO ap (invnumber, employee_id,currency_id) | . |
|
174 |
qq|VALUES (?, (SELECT e.id FROM employee e WHERE e.login = ?), |
|
175 |
(SELECT id FROM currencies WHERE name = ?) )|; |
|
176 |
do_query($form, $dbh, $query, $uid, $form->{login}, $form->{currency}); |
|
176 | 177 |
|
177 | 178 |
$query = qq|SELECT a.id FROM ap a |
178 | 179 |
WHERE a.invnumber = ?|; |
Auch abrufbar als: Unified diff
SQL-Fix für vergessene currency_id bei AP
currency_id auch in der if-bedingung schreiben, nicht nur im else-Zweig