[freeside-commits] branch FREESIDE_4_BRANCH updated. 52fa547a8b67fded19578e7cb4c98c958439489a

Ivan ivan at 420.am
Mon May 15 11:23:51 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  52fa547a8b67fded19578e7cb4c98c958439489a (commit)
      from  7a1f42e9228119053e90d3683b94c3d9bc48a825 (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 52fa547a8b67fded19578e7cb4c98c958439489a
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon May 15 11:23:50 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 e465155..eee85cc 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 600b0db..d6d2d97 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1143,6 +1143,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