From f576e065fb741448cc4834cdb9b09b718ca4ece2 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 3 Feb 2014 18:44:22 -0800 Subject: [PATCH] added part_pkg.agent_pkgpartid, RT#27214 --- FS/FS/Schema.pm | 3 ++- FS/FS/part_pkg.pm | 1 + httemplate/edit/part_pkg.cgi | 19 ++++++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index fbeeb0d4b..9aa865607 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -2134,11 +2134,12 @@ sub tables_hashref { 'successor', 'int', 'NULL', '', '', '', 'family_pkgpart','int', 'NULL', '', '', '', 'delay_start', 'int', 'NULL', '', '', '', + 'agent_pkgpartid', 'varchar', 'NULL', 20, '', '', ], 'primary_key' => 'pkgpart', 'unique' => [], 'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'classnum' ], - [ 'agentnum' ], ['no_auto'], + [ 'agentnum' ], ['no_auto'], ['agent_pkgpartid'], ], }, diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index a679cf3aa..d1ec0fb55 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -636,6 +636,7 @@ sub check { || $self->ut_numbern('delay_start') || $self->ut_foreign_keyn('successor', 'part_pkg', 'pkgpart') || $self->ut_foreign_keyn('family_pkgpart', 'part_pkg', 'pkgpart') + || $self->ut_alphan('agent_pkgpartid') || $self->SUPER::check ; return $error if $error; diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 17c45b8a0..aa27fddeb 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -208,13 +208,18 @@ }, }, - { type => 'tablebreak-tr-title', - value => 'Line-item revenue recogition', #better name? - }, - { field=>'pay_weight', type=>'text', size=>6 }, - { field=>'credit_weight', type=>'text', size=>6 }, - - ( $conf->exists('cust_pkg-show_fcc_voice_grade_equivalent') + { type => 'tablebreak-tr-title', + value => 'External Links', #better name? + }, + { field=>'agent_pkgpartid', type=>'text', size=>21 }, + + { type => 'tablebreak-tr-title', + value => 'Line-item revenue recogition', #better name? + }, + { field=>'pay_weight', type=>'text', size=>6 }, + { field=>'credit_weight', type=>'text', size=>6 }, + + ( $conf->exists('cust_pkg-show_fcc_voice_grade_equivalent') ? ( { type => 'tablebreak-tr-title', value => 'FCC Form 477 information', -- 2.11.0