[freeside-commits] branch master updated. 77aa74141762ca5628b399dadab07bdd63120948
Jeremy Davis
jeremyd at 420.am
Wed Sep 3 07:57:11 PDT 2014
The branch, master has been updated
via 77aa74141762ca5628b399dadab07bdd63120948 (commit)
from 8898636630e25444096c4bcef012c5a31701756d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 77aa74141762ca5628b399dadab07bdd63120948
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Wed Sep 3 10:56:25 2014 -0400
#30315 Fixing sales2agent
diff --git a/bin/sales2agent b/bin/sales2agent
index e3e122a..0be6b43 100644
--- a/bin/sales2agent
+++ b/bin/sales2agent
@@ -2,12 +2,17 @@
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;
+# -t passes through the typenum in agent_type
+getopts('t:');
+
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,
+ 'typenum' => $opt_t,
};
my $error = $agent->insert;
if ( $error ) {
-----------------------------------------------------------------------
Summary of changes:
bin/sales2agent | 6 ++++++
1 file changed, 6 insertions(+)
More information about the freeside-commits
mailing list