[freeside-commits] branch master updated. 711a25573ac5eace7e26f757b7157c558c873eb8
Mark Wells
mark at 420.am
Fri May 9 12:32:19 PDT 2014
The branch, master has been updated
via 711a25573ac5eace7e26f757b7157c558c873eb8 (commit)
from 1155faa2bb6e4b4b9fe4f37ff43b7d7fc5bb1fa1 (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 711a25573ac5eace7e26f757b7157c558c873eb8
Author: Mark Wells <mark at freeside.biz>
Date: Fri May 9 12:32:05 2014 -0700
improve late fee descriptions, #25899
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 2781748..e0ea6ab 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -2291,12 +2291,28 @@ sub _items_fee {
}
} # otherwise include them all in the main section
# XXX what to do when sectioning by location?
+
+ my @ext_desc;
+ my %base_invnums; # invnum => invoice date
+ foreach ($cust_bill_pkg->cust_bill_pkg_fee) {
+ if ($_->base_invnum) {
+ my $base_bill = FS::cust_bill->by_key($_->base_invnum);
+ my $base_date = $self->time2str_local('short', $base_bill->_date)
+ if $base_bill;
+ $base_invnums{$_->base_invnum} = $base_date || '';
+ }
+ }
+ foreach (sort keys(%base_invnums)) {
+ next if $_ == $self->invnum;
+ push @ext_desc,
+ $self->mt('from invoice \\#[_1] on [_2]', $_, $base_invnums{$_});
+ }
push @items,
{ feepart => $cust_bill_pkg->feepart,
amount => sprintf('%.2f', $cust_bill_pkg->setup + $cust_bill_pkg->recur),
description => $part_fee->itemdesc_locale($self->cust_main->locale),
+ ext_description => \@ext_desc
# sdate/edate?
- # ext_description referencing the base_invnum?
};
}
@items;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Template_Mixin.pm | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list