Revision 7743b3ab
Von Philip Reetz vor fast 18 Jahren hinzugefügt
SL/DN.pm | ||
---|---|---|
274 | 274 |
|
275 | 275 |
$paymentdate = ($form->{paymentuntil}) ? "'$form->{paymentuntil}'" : current_date; |
276 | 276 |
|
277 |
$query = qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.customer_id, a.duedate,da.fee AS old_fee, dnn.fee as fee, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate, a.duedate + dnn.terms - current_date AS nextlevel, $paymentdate - a.duedate AS pastdue, dn.dunning_level, current_date + dnn.payment_terms AS next_duedate, dnn.dunning_description AS next_dunning_description, dnn.id AS next_dunning_id, dnn.interest AS interest_rate, dnn.terms |
|
277 |
$query = qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.customer_id, a.duedate,da.fee AS old_fee,dnn.active,dnn.email, dnn.fee as fee, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate, a.duedate + dnn.terms - current_date AS nextlevel, $paymentdate - a.duedate AS pastdue, dn.dunning_level, current_date + dnn.payment_terms AS next_duedate, dnn.dunning_description AS next_dunning_description, dnn.id AS next_dunning_id, dnn.interest AS interest_rate, dnn.terms
|
|
278 | 278 |
FROM dunning_config dnn, ar a |
279 | 279 |
JOIN customer ct ON (a.customer_id = ct.id) |
280 | 280 |
LEFT JOIN dunning_config dn ON (dn.id = a.dunning_id) |
281 |
LEFT JOIN dunning da ON (da.trans_id=a.id AND dunning_config.dunning_level=da.dunning_level)
|
|
281 |
LEFT JOIN dunning da ON (da.trans_id=a.id AND dn.dunning_level=da.dunning_level)
|
|
282 | 282 |
$where|; |
283 | 283 |
|
284 | 284 |
my $sth = $dbh->prepare($query); |
bin/mozilla/dn.pl | ||
---|---|---|
475 | 475 |
|
476 | 476 |
|
477 | 477 |
$column_data{dunning_description} = qq|<td><input type=hidden name=inv_id_$i size=2 value="$ref->{id}"><input type=hidden name=customer_id_$i size=2 value="$ref->{customer_id}">$ref->{dunning_level}: $dunning</td>|; |
478 |
my $active = "checked";
|
|
478 |
my $active = ($ref->{active}) ? "checked" : "";
|
|
479 | 479 |
$column_data{active} = |
480 | 480 |
qq|<td><input type=checkbox name=active_$i value=1 $active></td>|; |
481 |
my $email = "checked";
|
|
481 |
my $email = ($ref->{email}) ? "checked" : "";
|
|
482 | 482 |
$column_data{email} = |
483 | 483 |
qq|<td><input type=checkbox name=email_$i value=1 $email></td>|; |
484 | 484 |
$column_data{next_duedate} = qq|<td><input type=hidden name=next_duedate_$i size=6 value="$ref->{next_duedate}">$ref->{next_duedate}</td>|; |
Auch abrufbar als: Unified diff
eMail wird nur angekreuzt wenn email in der Konfiguration gesetzt ist