projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79c995c
)
fix agent-specific invoice_default_terms on new customer add, RT#76862
author
Ivan Kohler
<ivan@freeside.biz>
Thu, 3 Aug 2017 15:47:45 +0000
(08:47 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Thu, 3 Aug 2017 15:47:45 +0000
(08:47 -0700)
httemplate/edit/cust_main.cgi
patch
|
blob
|
history
diff --git
a/httemplate/edit/cust_main.cgi
b/httemplate/edit/cust_main.cgi
index
e58441d
..
05bf437
100755
(executable)
--- a/
httemplate/edit/cust_main.cgi
+++ b/
httemplate/edit/cust_main.cgi
@@
-296,8
+296,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->referral_custnum( $cgi->param('referral_custnum') );
$cust_main->set('postal_invoice', 'Y')
unless $conf->exists('disablepostalinvoicedefault');