diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-06-25 00:51:02 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-07-03 20:54:02 -0500 |
commit | 196f6896e5da5151228ac6b923c52aa1dc90cd78 (patch) | |
tree | 2780c5db907ad1454a7ef38e4f0cbd49472810e5 /FS/FS/cust_main.pm | |
parent | 4fe1fa31dffa6689d9cb88e2a0cda408b826b89d (diff) |
RT#34078: Payment History Report / Statement [refactor to not use msg_template]
Diffstat (limited to 'FS/FS/cust_main.pm')
-rw-r--r-- | FS/FS/cust_main.pm | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index b7efa18..f2c2b4a 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -4146,7 +4146,7 @@ I<conf> - optional already-loaded FS::Conf object. =cut # Caution: this gets used by FS::ClientAPI::MyAccount::billing_history, -# and also payment_history_text, which should both be kept customer-friendly. +# and also for sending customer statements, which should both be kept customer-friendly. # If you add anything that shouldn't be passed on through the API or exposed # to customers, add a new option to include it, don't include it by default sub payment_history { @@ -4268,31 +4268,6 @@ sub payment_history { return @out; } -=item payment_history_text - -Accepts the same options as L</payment_history> and returns those -results as a string table with fixed-width columns, max width 80 char. - -=cut - -sub payment_history_text { - my $self = shift; - my $opt = ref($_[0]) ? $_[0] : { @_ }; - my $out = sprintf("%-12s",'Date'); - $out .= sprintf("%11s",'Amount') . ' '; - $out .= sprintf("%11s",'Balance') . ' '; - $out .= 'Description'; #don't need to pad with spaces - $out .= "\n"; - foreach my $item ($self->payment_history($opt)) { - $out .= sprintf("%-10.10s",$$item{'date_pretty'}) . ' '; #12 width - $out .= sprintf("%11.11s",$$item{'amount_pretty'}) . ' '; #13 width - $out .= sprintf("%11.11s",$$item{'balance_pretty'}) . ' '; #13 width - $out .= sprintf("%.42s",$$item{'description'}); #max 42 width - $out .= "\n"; - } - return $out; -} - =back =head1 CLASS METHODS |