projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 78356 - added ability to remove service thru api when service is unprovisioned.
[freeside.git]
/
bin
/
sales2agent
diff --git
a/bin/sales2agent
b/bin/sales2agent
index
e3e122a
..
0be6b43
100644
(file)
--- a/
bin/sales2agent
+++ b/
bin/sales2agent
@@
-2,12
+2,17
@@
use FS::UID qw(adminsuidsetup dbh);
use FS::Record qw(qsearch);
use FS::UID qw(adminsuidsetup dbh);
use FS::Record qw(qsearch);
+use Getopt::Std;
+use vars qw($opt_t);
use FS::sales;
use FS::agent;
use FS::access_group;
use FS::access_groupagent;
use FS::cust_main;
use FS::sales;
use FS::agent;
use FS::access_group;
use FS::access_groupagent;
use FS::cust_main;
+# -t passes through the typenum in agent_type
+getopts('t:');
+
adminsuidsetup shift or die &usage;
$FS::UID::AutoCommit = 0;
adminsuidsetup shift or die &usage;
$FS::UID::AutoCommit = 0;
@@
-19,6
+24,7
@@
foreach my $sales (@sales) {
my $agent = new FS::agent {
'agent' => $sales->salesperson,
'agent_custnum' => $sales->sales_custnum,
my $agent = new FS::agent {
'agent' => $sales->salesperson,
'agent_custnum' => $sales->sales_custnum,
+ 'typenum' => $opt_t,
};
my $error = $agent->insert;
if ( $error ) {
};
my $error = $agent->insert;
if ( $error ) {