[freeside-commits] branch master updated. f2ca904433495eff9e00802aa37da902b6518546
Ivan
ivan at 420.am
Mon May 15 11:23:49 PDT 2017
The branch, master has been updated
via f2ca904433495eff9e00802aa37da902b6518546 (commit)
from 1c93564d54f0aef24b094d5550aa9e0e276a244f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f2ca904433495eff9e00802aa37da902b6518546
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon May 15 11:23:48 2017 -0700
better filename with quotation # for PDF quotation attachments, RT#76003
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 080ab78..b5f7aaa 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -2367,7 +2367,7 @@ sub generate_email {
=item mimebuild_pdf
Returns a list suitable for passing to MIME::Entity->build(), representing
-this invoice as PDF attachment.
+this quotation or invoice as PDF attachment.
=cut
@@ -2378,7 +2378,7 @@ sub mimebuild_pdf {
'Encoding' => 'base64',
'Data' => [ $self->print_pdf(@_) ],
'Disposition' => 'attachment',
- 'Filename' => 'invoice-'. $self->invnum. '.pdf',
+ 'Filename' => $self->pdf_filename,
);
}
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 79dbbba..36ecbea 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1146,6 +1146,11 @@ sub email_subject {
eval qq("$subject");
}
+sub pdf_filename {
+ my $self = shift;
+ 'Invoice-'. $self->invnum. '.pdf';
+}
+
=item lpr_data HASHREF
Returns the postscript or plaintext for this invoice as an arrayref.
diff --git a/FS/FS/quotation.pm b/FS/FS/quotation.pm
index 520e11f..f4c68d5 100644
--- a/FS/FS/quotation.pm
+++ b/FS/FS/quotation.pm
@@ -226,6 +226,11 @@ sub email_subject {
eval qq("$subject");
}
+sub pdf_filename {
+ my $self = shift;
+ 'Quotation-'. $self->quotationnum. '.pdf';
+}
+
=item cust_or_prosect
=cut
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Template_Mixin.pm | 4 ++--
FS/FS/cust_bill.pm | 5 +++++
FS/FS/quotation.pm | 5 +++++
3 files changed, 12 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list