X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=2d937a8277d6bd14be5d2946bb4c4fc084f628e5;hb=f17c3f4acb20b02308c280347586737f21de74c5;hp=7727e07a5a7e26a6f0faa142a80df66e6704887a;hpb=51766e3b6bb6188c121d3829614738a927c23a2c;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 7727e07a5..2d937a827 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -487,7 +487,13 @@ Returns the line items (see L) for this invoice. sub cust_bill_pkg { my $self = shift; qsearch( - { 'table' => 'cust_bill_pkg', + { + 'select' => 'cust_bill_pkg.*, pkg_category.categoryname', + 'table' => 'cust_bill_pkg', + 'addl_from' => ' LEFT JOIN cust_pkg USING ( pkgnum ) '. + ' LEFT JOIN part_pkg USING ( pkgpart ) '. + ' LEFT JOIN pkg_class USING ( classnum ) '. + ' LEFT JOIN pkg_category USING ( categorynum ) ', 'hashref' => { 'invnum' => $self->invnum }, 'order_by' => 'ORDER BY billpkgnum', } @@ -1160,6 +1166,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. @@ -2914,15 +2925,11 @@ sub _items_total { } } - - if ( $conf->exists('invoice_show_prior_due_date') ) { + if ( $conf->exists('invoice_show_prior_due_date') && !$conf->exists('invoice_omit_due_date') ) { # then the due date should be shown with Total New Charges, # and should NOT be shown with the Balance Due message. if ( $self->due_date ) { - # localize the "Please pay by" message and the date itself - # (grammar issues with this, yeah) - $new_charges_desc .= ' - ' . $self->mt('Please pay by') . ' ' . - $self->due_date2str('short'); + $new_charges_desc .= $self->invoice_pay_by_msg; } elsif ( $self->terms ) { # phrases like "due on receipt" should be localized $new_charges_desc .= ' - ' . $self->mt($self->terms);