From 821c540a2d41f633b1a4e1cd8bda82b8b2ff60de Mon Sep 17 00:00:00 2001 From: khoff Date: Thu, 17 Mar 2005 21:41:36 +0000 Subject: Added options invoice_email_pdf and invoice_email_pdf_note. invoice_email_pdf - Attach PDF invoice to emailed plain text invoices. invoice_email_pdf_note - Replace plain text invoice with this note, when attaching a PDF. --- httemplate/misc/email-invoice.cgi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'httemplate/misc/email-invoice.cgi') diff --git a/httemplate/misc/email-invoice.cgi b/httemplate/misc/email-invoice.cgi index a560a1838..a3130c79f 100755 --- a/httemplate/misc/email-invoice.cgi +++ b/httemplate/misc/email-invoice.cgi @@ -10,10 +10,9 @@ my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Can't find invoice!\n" unless $cust_bill; my $error = send_email( - 'from' => $cust_bill->_agent_invoice_from || $conf->config('invoice_from'), - 'to' => [ grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ], - 'subject' => 'Invoice', - 'body' => [ $cust_bill->print_text ], + $cust_bill->generate_email( + 'from' => $cust_bill->_agent_invoice_from || $conf->config('invoice_from'), + ) ); eidiot($error) if $error; -- cgit v1.2.1