X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/62ac28eecd116eb0a806c2b354f216423ea43821..008b51c43d064b8172168aee7fdff393c5d4b13a:/SL/DN.pm diff --git a/SL/DN.pm b/SL/DN.pm index 1a615011f..8224172bf 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -505,6 +505,11 @@ sub send_email { $mail->{attachments} = $form->{DUNNING_PDFS_EMAIL}; } + $query = qq|SELECT id FROM dunning WHERE dunning_id = ?|; + my @ids = selectall_array_query($form, $dbh, $query, $dunning_id); + $mail->{record_id} = \@ids; + $mail->{record_type} = 'dunning'; + $mail->send(); $main::lxdebug->leave_sub(); @@ -815,6 +820,7 @@ sub get_dunning { ct.name AS customername, ct.id AS customer_id, a.duedate, da.fee, da.interest, dn.dunning_description, dn.dunning_level, da.transdate AS dunning_date, da.duedate AS dunning_duedate, da.dunning_id, da.dunning_config_id, + da.id AS dunning_table_id, e2.name AS salesman FROM ar a JOIN customer ct ON (a.customer_id = ct.id)