summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2009-03-23 17:03:03 +0000
committerivan <ivan>2009-03-23 17:03:03 +0000
commit12af08e945ac5c1f593d2bf9cf2d6df09f35228c (patch)
tree893f99dadc2dcb533fd0724a0885f2c80decd804 /FS/FS
parent8089deb0915306ba481def7118deb27fe51735ab (diff)
add name (svc_acct.finger) to bulk billing detail, RT#3519
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/part_pkg/bulk.pm2
-rw-r--r--FS/FS/svc_Common.pm5
-rw-r--r--FS/FS/svc_acct.pm17
3 files changed, 22 insertions, 2 deletions
diff --git a/FS/FS/part_pkg/bulk.pm b/FS/FS/part_pkg/bulk.pm
index 63d344d..8095595 100644
--- a/FS/FS/part_pkg/bulk.pm
+++ b/FS/FS/part_pkg/bulk.pm
@@ -54,7 +54,7 @@ sub calc_recur {
# END START
foreach my $h_svc ( $cust_pkg->h_cust_svc( $$sdate, $last_bill ) ) {
- my @label = $h_svc->label( $$sdate, $last_bill );
+ my @label = $h_svc->label_long( $$sdate, $last_bill );
die "fatal: no historical label found, wtf?" unless scalar(@label); #?
#my $svc_details = $label[0].': '. $label[1]. ': ';
my $svc_details = $label[1]. ': ';
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm
index da1cfe1..869ab58 100644
--- a/FS/FS/svc_Common.pm
+++ b/FS/FS/svc_Common.pm
@@ -151,6 +151,11 @@ sub label {
$self->svcnum;
}
+sub label_long {
+ my $self = shift;
+ $self->label(@_);
+}
+
=item check
Checks the validity of fields in this record.
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 57ef615..fcd73ac 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -256,7 +256,7 @@ sub table_info {
disable_inventory => 1,
disable_select => 1,
},
- 'finger' => 'Real name (GECOS)',
+ 'finger' => 'Real name', # (GECOS)',
'domsvc' => {
label => 'Domain',
#def_label => 'svcnum from svc_domain',
@@ -446,8 +446,23 @@ sub label {
$self->email(@_);
}
+=item label_long [ END_TIMESTAMP [ START_TIMESTAMP ] ]
+
+Returns a longer string label for this acccount ("Real Name <username@domain>"
+if available, or "username@domain").
+
+END_TIMESTAMP and START_TIMESTAMP can optionally be passed when dealing with
+history records.
+
=cut
+sub label_long {
+ my $self = shift;
+ ( $self->finger =~ /\S/ )
+ ? $self->finger. ' <'.$self->label(@_).'>'
+ : $self->label(@_);
+}
+
=item insert [ , OPTION => VALUE ... ]
Adds this account to the database. If there is an error, returns the error,