Revision afe7df8b
Von Bernd Bleßmann vor mehr als 9 Jahren hinzugefügt
SL/DN.pm | ||
---|---|---|
211 | 211 |
$query = |
212 | 212 |
qq|INSERT INTO ar (id, invnumber, transdate, gldate, customer_id, |
213 | 213 |
taxincluded, amount, netamount, paid, duedate, |
214 |
invoice, currency_id, notes, |
|
214 |
invoice, currency_id, taxzone_id, notes,
|
|
215 | 215 |
employee_id) |
216 | 216 |
VALUES ( |
217 | 217 |
?, -- id |
... | ... | |
232 | 232 |
(SELECT duedate FROM dunning WHERE dunning_id = ? LIMIT 1), |
233 | 233 |
'f', -- invoice |
234 | 234 |
(SELECT id FROM currencies WHERE name = ?), -- curr |
235 |
--taxzone_id: |
|
236 |
(SELECT taxzone_id FROM customer WHERE id = |
|
237 |
(SELECT ar.customer_id |
|
238 |
FROM dunning dn |
|
239 |
LEFT JOIN ar ON (dn.trans_id = ar.id) |
|
240 |
WHERE dn.dunning_id = ? |
|
241 |
LIMIT 1) |
|
242 |
), |
|
235 | 243 |
?, -- notes |
236 | 244 |
-- employee_id: |
237 | 245 |
(SELECT id FROM employee WHERE login = ?) |
... | ... | |
243 | 251 |
$amount, |
244 | 252 |
$dunning_id, # duedate |
245 | 253 |
$curr, # default currency |
254 |
$dunning_id, # taxzone_id |
|
246 | 255 |
sprintf($main::locale->text('Automatically created invoice for fee and interest for dunning %s'), $dunning_id), # notes |
247 | 256 |
$::myconfig{login}); # employee_id |
248 | 257 |
do_query($form, $dbh, $query, @values); |
Auch abrufbar als: Unified diff
Beim Erzeugen einer Rechnung für Mahngebühren taxzone_id des Kunden eintragen.
Ist notwendig geworden, da das Feld taxzone_id inzwischen not null ist.
Behebt #54 (redmine).