[freeside-commits] branch FREESIDE_3_BRANCH updated. 8731ef01707d23cc5c17ae1e5364ff2c8e4ab261
Jeremy Davis
jeremyd at 420.am
Wed Sep 3 07:58:30 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 8731ef01707d23cc5c17ae1e5364ff2c8e4ab261 (commit)
from 9c551cae067199cf05bfd84857b3d09ba3337126 (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 8731ef01707d23cc5c17ae1e5364ff2c8e4ab261
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Wed Sep 3 10:58:03 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