diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-08-03 08:47:59 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-08-03 08:47:59 -0700 |
commit | c5bafe5c81eed4223adad4b313d060fc14d88bc2 (patch) | |
tree | a7134c7522906d2a4a5978088a83e7e48b81150c /httemplate | |
parent | 4ef0cb4a8729c07a7257cd924b6c778e17329d28 (diff) |
fix agent-specific invoice_default_terms on new customer add, RT#76862
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index d84679d4e..fbd292ffb 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -320,8 +320,13 @@ if ( $cgi->param('error') ) { $custnum=''; $cust_main = new FS::cust_main ( {} ); + + my @agentnums = $curuser->agentnums; + $cust_main->agentnum( $agentnums[0] ) + if scalar(@agentnums) == 1; $cust_main->agentnum( $conf->config('default_agentnum') ) if $conf->exists('default_agentnum'); + $cust_main->otaker( &getotaker ); $cust_main->referral_custnum( $cgi->param('referral_custnum') ); @invoicing_list = (); |