138 |
138 |
$dbh->do($query) || $form->dberror($query);
|
139 |
139 |
}
|
140 |
140 |
|
141 |
|
my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id) where ar.id IN $form->{inv_ids}|;
|
|
141 |
my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id AND dunning_config.dunning_level=da.dunning_level) where ar.id IN $form->{inv_ids}|;
|
142 |
142 |
my $sth = $dbh->prepare($query);
|
143 |
143 |
$sth->execute || $form->dberror($query);
|
144 |
144 |
my $first = 1;
|
... | ... | |
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)
|
|
281 |
LEFT JOIN dunning da ON (da.trans_id=a.id AND dunning_config.dunning_level=da.dunning_level)
|
282 |
282 |
$where|;
|
283 |
283 |
|
284 |
284 |
my $sth = $dbh->prepare($query);
|
... | ... | |
359 |
359 |
$where .= " ORDER by $sortorder";
|
360 |
360 |
|
361 |
361 |
|
362 |
|
$query = qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.duedate,da.fee ,da.interest, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate, da.dunning_id
|
|
362 |
$query = qq|SELECT a.id, a.ordnumber,a.invoice, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.duedate,da.fee ,da.interest, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate, da.dunning_id
|
363 |
363 |
FROM ar a
|
364 |
364 |
JOIN customer ct ON (a.customer_id = ct.id),
|
365 |
365 |
dunning da LEFT JOIN dunning_config dn ON (da.dunning_id=dn.id)
|
... | ... | |
502 |
502 |
my $dbh = $form->dbconnect_noauto($myconfig);
|
503 |
503 |
|
504 |
504 |
|
505 |
|
my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id) where ar.dunning_id=$dunning_id|;
|
|
505 |
my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id AND dunning_config.dunning_level=da.dunning_level) where ar.dunning_id=$dunning_id|;
|
506 |
506 |
my $sth = $dbh->prepare($query);
|
507 |
507 |
$sth->execute || $form->dberror($query);
|
508 |
508 |
my $first = 1;
|
Bei hoeheren Mahnstufen wurde die Rechnung mehrmals angezeigt. In der Uebersicht der Mahnungen
hat ein Klick auf die Rechnungsnummer nicht die Rechnungsmaske geoeffnet