[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.113.2.8, 1.113.2.9

Erik Levinson levinse at wavetail.420.am
Tue Dec 21 15:44:59 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv18287/FS/FS/ClientAPI

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	MyAccount.pm 
Log Message:
self-service improvements: DIDs, RT10885; re-do all of my changes which were undone by Mark

Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.113.2.8
retrieving revision 1.113.2.9
diff -u -w -d -r1.113.2.8 -r1.113.2.9
--- MyAccount.pm	21 Dec 2010 09:13:03 -0000	1.113.2.8
+++ MyAccount.pm	21 Dec 2010 23:44:57 -0000	1.113.2.9
@@ -1561,7 +1561,25 @@
 		  @_
 		);
  }
-#XXX: finish bulk orders
+
+# bulk case
+  my $error;
+  foreach my $did ( @bulkdid ) {
+    $did =~ s/[^0-9]//g;
+    $error = _provision( 'FS::svc_phone',
+	      [qw(phonenum countrycode)],
+	      [qw(phonenum countrycode)],
+	      {
+		'pkgnum' => $p->{'pkgnum'},
+		'svcpart' => $p->{'svcpart'},
+		'phonenum' => $did,
+		'countrycode' => $p->{'countrycode'},
+		'session_id' => $p->{'session_id'},
+	      }
+	    );
+    return $error if ($error->{'error'} && length($error->{'error'}) > 1);
+  }
+  { 'bulkdid' => [ @bulkdid ], 'svc' => $error->{'svc'} }
 }
 
 sub provision_acct {



More information about the freeside-commits mailing list