[freeside-commits] freeside/FS/FS msg_template.pm,1.14,1.14.2.1
Mark Wells
mark at wavetail.420.am
Mon Nov 8 13:46:15 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv14859/FS/FS
Modified Files:
Tag: FREESIDE_2_1_BRANCH
msg_template.pm
Log Message:
ticket export for svc_phone, domain, broadband, RT#10363
Index: msg_template.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/msg_template.pm,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -w -d -r1.14 -r1.14.2.1
--- msg_template.pm 27 Oct 2010 19:27:59 -0000 1.14
+++ msg_template.pm 8 Nov 2010 21:46:13 -0000 1.14.2.1
@@ -166,8 +166,9 @@
=item object
Additional context object (currently, can be a cust_main, cust_pkg,
-cust_bill, svc_acct, cust_pay, or cust_pay_pending). If the object
-is a svc_acct, its cust_pkg will be fetched and used for substitution.
+cust_bill, cust_pay, cust_pay_pending, or svc_(acct, phone, broadband,
+domain) ). If the object is a svc_*, its cust_pkg will be fetched and
+used for substitution.
As a special case, this may be an arrayref of two objects. Both
objects will be available for substitution, with their field names
@@ -281,9 +282,10 @@
###
my @to = ($opt{'to'}) || $cust_main->invoicing_list_emailonly;
- warn "prepared msg_template with no email destination (custnum ".
- $cust_main->custnum.")\n"
- if !@to;
+ #warn "prepared msg_template with no email destination (custnum ".
+ # $cust_main->custnum.")\n"
+ # if !@to;
+ # warning is not appropriate now that we use these for tickets
my $conf = new FS::Conf;
@@ -368,7 +370,7 @@
],
# next_bill_date
'cust_pkg' => [qw(
- pkgnum pkg pkg_label pkg_label_long
+ pkgnum pkg_label pkg_label_long
location_label
status statuscolor
@@ -376,6 +378,7 @@
adjourn susp expire
labels_short
),
+ [ pkg => sub { shift->part_pkg->pkg } ],
[ cancel => sub { shift->getfield('cancel') } ], # grrr...
[ start_ymd => sub { $ymd->(shift->getfield('start_date')) } ],
[ setup_ymd => sub { $ymd->(shift->getfield('setup')) } ],
@@ -400,6 +403,37 @@
),
[ password => sub { shift->getfield('_password') } ],
],
+ 'svc_domain' => [qw(
+ svcnum
+ domain
+ ),
+ [ registrar => sub {
+ my $registrar = qsearchs('registrar',
+ { registrarnum => shift->registrarnum} );
+ $registrar ? $registrar->registrarname : ''
+ }
+ ],
+ [ catchall => sub {
+ my $svc_acct = qsearchs('svc_acct', { svcnum => shift->catchall });
+ $svc_acct ? $svc_acct->email : ''
+ }
+ ],
+ ],
+ 'svc_phone' => [qw(
+ svcnum
+ phonenum
+ countrycode
+ domain
+ )
+ ],
+ 'svc_broadband' => [qw(
+ svcnum
+ speed_up
+ speed_down
+ ip_addr
+ mac_addr
+ )
+ ],
# for payment receipts
'cust_pay' => [qw(
paynum
More information about the freeside-commits
mailing list