X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fws_list.html;h=dcc62ec86fe3e6d3c5c8c3037463ae23b856d13f;hb=80f265ee8f2603f0e3f7f5ad6c6c0cf704f98cb8;hp=7b62db452f871f67e75d2c7640dde3f2fe48571d;hpb=aaace663fe7ff34479a707f3976c32010e4a1845;p=freeside.git diff --git a/fs_selfservice/FS-SelfService/cgi/ws_list.html b/fs_selfservice/FS-SelfService/cgi/ws_list.html index 7b62db452..dcc62ec86 100644 --- a/fs_selfservice/FS-SelfService/cgi/ws_list.html +++ b/fs_selfservice/FS-SelfService/cgi/ws_list.html @@ -19,19 +19,21 @@ sub ws_pkgstatus { sub pdate { my($field,$date_format) = (shift,shift); return "".Date::Format::time2str($date_format,$field)."" - if $field > 0; + if $field && $field > 0; ''; } + if ( $pkgpart ) { - $OUT .= qq! !; + $OUT .= qq!
PackageStatus
!; $OUT .= ""; $OUT .= ""; - $OUT .= ""; + $OUT .= ""; foreach my $pkg ( @cust_pkg ) { my $part_pkg = $pkg->{part_pkg}[0]; $status = ws_pkgstatus($pkg); - if($pkg->{pkgpart} == $pkgpart && ($filter eq $status || !$filter) ) { + if($pkg->{pkgpart} == $pkgpart && + ( ($filter && $filter eq $status) || !$filter) ) { $OUT .= ""; $OUT .= pdate($pkg->{setup},$date_format); $OUT .= pdate($pkg->{last_bill},$date_format); @@ -41,7 +43,30 @@ if ( $pkgpart ) { $OUT .= pdate($pkg->{expire},$date_format); $OUT .= pdate($pkg->{contract_end},$date_format); $OUT .= pdate($pkg->{cancel},$date_format); - $OUT .= ""; + + $OUT .= ""; } } $OUT .= "
PackageStatusSetupLast BillNext BillAdjournSuspendExpireContract EndCancel
CancelServices
$part_pkg->{pkg}$status
"; + my @cust_svc = @{$pkg->{cust_svc}}; + foreach my $cust_svc ( @cust_svc ) { + my @label = @{$cust_svc->{'label'}}; + $OUT .= qq!$label[0]: $label[1]

!; + } + my @part_svc = @{$pkg->{part_svc}}; + foreach my $part_svc ( @part_svc ) { + my $link = qq!Setup ! + . qq!$part_svc->{'svc'} ($part_svc->{'num_avail'}! + . qq! available)

!; + $OUT .= $link if $part_svc->{'can_get_dids'}; + + if($part_svc->{'svcdb'} eq 'svc_phone' && $lnp) { + $OUT .= qq!Port-In $part_svc->{'svc'}!; + } + } + + $OUT .= "
"; @@ -55,7 +80,9 @@ else { $pkgparts{$pkg->{pkgpart}}{pkg} = $part_pkg->{pkg}; } - $OUT .= qq! !; + $OUT .= "
PackageStatus
"; + + $OUT .= qq! !; my($pkgpart,$counts); while(($pkgpart,$count) = each %pkgparts){ my $link = "${url}provision;pkgpart=$pkgpart"; @@ -67,6 +94,58 @@ else { $OUT .= ""; } $OUT .= "
PackageStatus
"; -} + $OUT .= qq!
!; + + if ( @login_svcpart ) { + $OUT .= "Self-service accounts
"; + foreach my $pkg ( @cust_pkg ) { + @cust_svc = @{$pkg->{cust_svc}}; + @part_svc = @{$pkg->{part_svc}}; + + foreach my $cust_svc ( @cust_svc ) { + $svcpart = $cust_svc->{'svcpart'}; + next unless grep($_ eq $svcpart, @login_svcpart); + @label = @{$cust_svc->{'label'}}; + $OUT .= $label[1] . "   "; + unless ( $cust_svc->{'svcnum'} == $svcnum ) { + $OUT .= qq!!. + 'Delete'; + } + $OUT .= "
"; + } + + foreach my $part_svc ( @part_svc ) { + $svcpart = $part_svc->{'svcpart'}; + next unless grep($_ eq $svcpart, @login_svcpart); + $link = "${url}provision_svc;pkgnum=$pkg->{'pkgnum'};". + "svcpart=$part_svc->{'svcpart'}"; + $OUT .= qq!!. 'Setup '. $part_svc->{'svc'}. + ' ('. $part_svc->{'num_avail'}. ' available)' + if $part_svc->{'svcdb'} eq 'svc_acct'; + } + + } # foreach cust_pkg + } # login_svcpart + + my $hasPhone = 0; + foreach my $pkg ( @cust_pkg ) { + @cust_svc = @{$pkg->{cust_svc}}; + foreach my $cust_svc ( @cust_svc ) { + @label = @{$cust_svc->{'label'}}; + $hasPhone = 1 if $label[2] eq 'svc_phone'; + } + } + if ( $hasPhone ) { + $link = "${url}didreport;type="; + $OUT .= "


Download currently allocated DIDs:
"; + $OUT .= qq!   CSV | + Excel!; + $OUT .= "

Download recently allocated DIDs:
"; + $OUT .= qq!   CSV | + Excel!; + } + + $OUT .= "
"; +} %>