[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.58, 1.59
Jeff Finucane,420,,
jeff at wavetail.420.am
Thu Aug 16 06:40:48 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail:/tmp/cvs-serv28263/FS/FS/ClientAPI
Modified Files:
MyAccount.pm
Log Message:
support hours 'usage' tracking for our own internal use (#1733)
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- MyAccount.pm 5 Aug 2007 17:32:49 -0000 1.58
+++ MyAccount.pm 16 Aug 2007 13:40:46 -0000 1.59
@@ -120,6 +120,12 @@
$return{balance} = $cust_main->balance;
+ $return{tickets} = [ ($cust_main->tickets) ];
+ use Data::Dumper;
+ open(MYFILE, ">>/tmp/debugger");
+ print MYFILE Dumper($return{tickets});
+ close MYFILE;
+
my @open = map {
{
invnum => $_->invnum,
@@ -149,6 +155,14 @@
$return{'postal_invoicing'} =
0 < ( grep { $_ eq 'POST' } $cust_main->invoicing_list );
+ if (scalar($conf->config('support_packages'))) {
+ my $support = 0;
+ foreach ($cust_main->support_services) {
+ $support += $_->svc_x->seconds;
+ }
+ $return{support_time} = (($support < 0) ? '-' : '' ). int(abs($support)/3600)."h".sprintf("%02d",(abs($support)%3600)/60)."m";
+ }
+
} elsif ( $session->{'svcnum'} ) { #no customer record
my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $session->{'svcnum'} } )
More information about the freeside-commits
mailing list