$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();
letter => 'letter',
purchase_delivery_order => 'delivery_orders',
sales_delivery_order => 'delivery_orders',
+ dunning => 'dunning',
);
sub new {
If $self->{journalentry} and either $self->{record_id} or $::form->{id} (checked in
this order) exist a record link from record to email journal is created.
+ It is possible to provide an array reference with more than one id in
+ $self->{record_id} or $::form->{id}. In this case all records are linked to
+ the mail.
Will fail silently if record_link creation wasn't successful (same behaviour as
_store_in_journal).