[freeside-commits] branch FREESIDE_4_BRANCH updated. 47d5b84429c2872b2f2fafb261c75f2f40500e86
Ivan
ivan at 420.am
Thu Aug 3 08:47:53 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via 47d5b84429c2872b2f2fafb261c75f2f40500e86 (commit)
from d731b1490d3a58a46c4201c0bb4871230a4c9a6f (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 47d5b84429c2872b2f2fafb261c75f2f40500e86
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu Aug 3 08:47:50 2017 -0700
fix agent-specific invoice_default_terms on new customer add, RT#76862
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index e58441d..05bf437 100755
--- 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');
-----------------------------------------------------------------------
Summary of changes:
httemplate/edit/cust_main.cgi | 5 +++++
1 file changed, 5 insertions(+)
More information about the freeside-commits
mailing list