freeside/httemplate/view cust_main.cgi,1.83,1.84
ivan
ivan at pouncequick.420.am
Thu Jul 15 15:40:06 PDT 2004
- Previous message: freeside/fs_selfservice/FS-SelfService SelfService.pm,1.13,1.14
- Next message: freeside/fs_selfservice/FS-SelfService/cgi myaccount_menu.html,NONE,1.1 logout.html,NONE,1.1 provision.html,NONE,1.1 provision_svc_acct.html,NONE,1.1 process_svc_acct.html,NONE,1.1 delete_svc.html,NONE,1.1 myaccount.html,1.4,1.5 view_invoice.html,1.2,1.3 payment_results.html,1.1,1.2 make_payment.html,1.10,1.11 selfservice.cgi,1.7,1.8 agent.cgi,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv27096/httemplate/view
Modified Files:
cust_main.cgi
Log Message:
big update for customer self-service: add provisioning/unprovisioning of purchased services, like fs_selfadmin
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main.cgi,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- cust_main.cgi 12 Jul 2004 13:51:11 -0000 1.83
+++ cust_main.cgi 15 Jul 2004 22:40:01 -0000 1.84
@@ -897,28 +897,14 @@
$pkg{expire} = $cust_pkg->getfield('expire');
$pkg{cancel} = $cust_pkg->getfield('cancel');
- my %svcparts = ();
-
- foreach my $pkg_svc (
- qsearch('pkg_svc', { 'pkgpart' => $part_pkg->pkgpart })
- ) {
-
- next if ($pkg_svc->quantity == 0);
-
- my $part_svc = qsearchs('part_svc', { 'svcpart' => $pkg_svc->svcpart });
-
- my $svcpart = {};
- $svcpart->{svcpart} = $part_svc->svcpart;
- $svcpart->{svc} = $part_svc->svc;
- $svcpart->{svcdb} = $part_svc->svcdb;
- $svcpart->{quantity} = $pkg_svc->quantity;
- $svcpart->{count} = 0;
-
- $svcpart->{services} = [];
-
- $svcparts{$svcpart->{svcpart}} = $svcpart;
-
- }
+ my %svcparts = map {
+ $_->svcpart => {
+ $_->part_svc->hash,
+ 'quantity' => $_->quantity,
+ 'count' => $cust_pkg->num_cust_svc($_->svcpart),
+ #'services' => [],
+ };
+ } $part_pkg->pkg_svc;
foreach my $cust_svc ( $cust_pkg->cust_svc ) {
#warn "svcnum ". $cust_svc->svcnum. " / svcpart ". $cust_svc->svcpart. "\n";
@@ -930,17 +916,13 @@
#false laziness with above, to catch extraneous services. whole
#damn thing should be OO...
my $svcpart = ( $svcparts{$cust_svc->svcpart} ||= {
- 'svcpart' => $cust_svc->svcpart,
- 'svc' => $cust_svc->part_svc->svc,
- 'svcdb' => $cust_svc->part_svc->svcdb,
+ $cust_svc->part_svc->hash,
'quantity' => 0,
- 'count' => 0,
- 'services' => [],
+ 'count' => $cust_pkg->num_cust_svc($cust_svc->svcpart),
+ #'services' => [],
} );
push @{$svcpart->{services}}, $svc;
-
- $svcpart->{count}++;
}
- Previous message: freeside/fs_selfservice/FS-SelfService SelfService.pm,1.13,1.14
- Next message: freeside/fs_selfservice/FS-SelfService/cgi myaccount_menu.html,NONE,1.1 logout.html,NONE,1.1 provision.html,NONE,1.1 provision_svc_acct.html,NONE,1.1 process_svc_acct.html,NONE,1.1 delete_svc.html,NONE,1.1 myaccount.html,1.4,1.5 view_invoice.html,1.2,1.3 payment_results.html,1.1,1.2 make_payment.html,1.10,1.11 selfservice.cgi,1.7,1.8 agent.cgi,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list