[freeside-commits] branch FREESIDE_3_BRANCH updated. 359a6c266813ba42ae534a900da36c5885984207
Ivan
ivan at 420.am
Fri Dec 12 17:09:25 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 359a6c266813ba42ae534a900da36c5885984207 (commit)
from e4278a4de86f87a4a25c6cbdd93fd9f650bbccf0 (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 359a6c266813ba42ae534a900da36c5885984207
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Dec 12 17:09:24 2014 -0800
option to separate customer and package display, RT#32301
diff --git a/FS/FS/part_pkg/agent.pm b/FS/FS/part_pkg/agent.pm
index 99b7749..bb8a26d 100644
--- a/FS/FS/part_pkg/agent.pm
+++ b/FS/FS/part_pkg/agent.pm
@@ -39,6 +39,10 @@ $me = '[FS::part_pkg::agent]';
'type' => 'checkbox',
},
+ 'display_separate_cust'=> { 'name' => 'Separate customer from package display on invoices',
+ 'type' => 'checkbox',
+ },
+
},
'fieldorder' => [qw( cutoff_day add_full_period no_pkg_prorate ) ],
@@ -100,12 +104,14 @@ sub calc_recur {
}
$cust_main->all_pkgs;
+ my $cust_details = 0;
+
foreach my $cust_pkg ( @cust_pkg ) {
warn "$me billing agent charges for pkgnum ". $cust_pkg->pkgnum. "\n"
if $DEBUG;
- my $pkg_details = $cust_main->name_short. ': '; #name?
+ my $pkg_details = '';
my $cust_location = $cust_pkg->cust_location;
$pkg_details .= $cust_location->locationname. ': '
@@ -162,12 +168,21 @@ sub calc_recur {
$pkg_charge += $quantity * $recur_charge;
- push @$details, $pkg_details
- if $pkg_charge;
+ if ( $pkg_charge ) {
+ if ( $self->option('display_separate_cust') ) {
+ push @$details, $cust_main->name.':' unless $cust_details++;
+ push @$details, ' '.$pkg_details;
+ } else {
+ push @$details, $cust_main->name_short.': '. $pkg_details;
+ }
+ };
+
$total_agent_charge += $pkg_charge;
} #foreach $cust_pkg
+ push @$details, ' ' if $cust_details;
+
} #foreach $cust_main
} #foreach $agent;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/agent.pm | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list