342 |
342 |
|
343 |
343 |
my $q_insert_dunning =
|
344 |
344 |
qq|INSERT INTO dunning (id, dunning_id, dunning_config_id, dunning_level, trans_id,
|
345 |
|
fee, interest, transdate, duedate)
|
|
345 |
fee, interest, transdate, duedate, original_invoice_printed)
|
346 |
346 |
VALUES (?, ?, ?,
|
347 |
347 |
(SELECT dunning_level FROM dunning_config WHERE id = ?),
|
348 |
348 |
?,
|
... | ... | |
353 |
353 |
* (SELECT interest_rate FROM dunning_config WHERE id = ?)
|
354 |
354 |
/ 360,
|
355 |
355 |
current_date,
|
356 |
|
current_date + (SELECT payment_terms FROM dunning_config WHERE id = ?))|;
|
|
356 |
current_date + (SELECT payment_terms FROM dunning_config WHERE id = ?),
|
|
357 |
?)|;
|
357 |
358 |
my $h_insert_dunning = prepare_query($form, $dbh, $q_insert_dunning);
|
358 |
359 |
|
359 |
360 |
my @invoice_ids;
|
... | ... | |
387 |
388 |
|
388 |
389 |
@values = ($row_id, $dunning_id, $next_config_id,
|
389 |
390 |
$next_config_id, $invoice_id, $next_config_id,
|
390 |
|
$invoice_id, $next_config_id, $next_config_id);
|
|
391 |
$invoice_id, $next_config_id, $next_config_id,
|
|
392 |
$print_invoice);
|
391 |
393 |
do_statement($form, $h_insert_dunning, $q_insert_dunning, @values);
|
392 |
394 |
|
393 |
395 |
RecordLinks->create_links(
|
Mahnungen: beim erneuten Drucken ggf. auch originale Rechnung mit drucken, …
… sofern diese beim Mahnlauf mit gedruckt wurde.