diff options
author | ivan <ivan> | 2010-08-12 17:43:21 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-08-12 17:43:21 +0000 |
commit | d1c3bdca8b00a5accace9121edabc675698af001 (patch) | |
tree | 63568d4a1f4170a1a804cc218b53bfafdc3318a1 | |
parent | 930618349ad4478a6fd537685e61f17e1b3af5b1 (diff) |
referraldefault dropdown in config, RT#9599
-rw-r--r-- | FS/FS/Conf.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index fdb6e9a38..8f6a70ca5 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1361,7 +1361,20 @@ and customer address. Include units.', 'key' => 'referraldefault', 'section' => 'UI', 'description' => 'Default referral, specified by refnum', - 'type' => 'text', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::part_referral; + map { $_->refnum => $_->referral } + FS::Record::qsearch( 'part_referral', + { 'disabled' => '' } + ); + }, + 'option_sub' => sub { require FS::Record; + require FS::part_referral; + my $part_referral = FS::Record::qsearchs( + 'part_referral', { 'refnum'=>shift } ); + $part_referral ? $part_referral->referral : ''; + }, }, # { |