summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2009-10-22 12:50:05 +0000
committerivan <ivan>2009-10-22 12:50:05 +0000
commit09d3b99715ac707d64b1a06d8a2432b76ddb173d (patch)
treefb30940e8e62851814f1795dcfa98cabc2c4f56b /httemplate
parent11e7e902c43e46585ccf43e67b11ed040f6655f7 (diff)
restrict additinal package order option, RT#6029
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/browse/part_pkg.cgi6
-rwxr-xr-xhttemplate/edit/part_pkg.cgi8
2 files changed, 14 insertions, 0 deletions
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index c6cbb81a3..e226ce13e 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -177,6 +177,12 @@ unless ( 0 ) { #already showing only one class or something?
$align .= 'l';
}
+if ( $conf->exists('pkg-addon_classnum') ) {
+ push @header, "Add'l order class";
+ push @fields, sub { shift->addon_classname || '(none)'; };
+ $align .= 'l';
+}
+
tie my %plans, 'Tie::IxHash', %{ FS::part_pkg::plan_info() };
tie my %plan_labels, 'Tie::IxHash',
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 690e884db..fcde22bf6 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -29,6 +29,7 @@
'pkg' => 'Package (customer-visible)',
'comment' => 'Comment (customer-hidden)',
'classnum' => 'Package class',
+ 'addon_classnum' => 'Restrict additional orders to package class',
'promo_code' => 'Promotional code',
'freq' => 'Recurring fee frequency',
'setuptax' => 'Setup fee tax exempt',
@@ -76,6 +77,13 @@
onchange => 'agent_changed',
},
{field=>'classnum', type=>'select-pkg_class' },
+ ( $conf->exists('pkg-addon_classnum')
+ ? ( { field=>'addon_classnum',
+ type =>'select-pkg_class',
+ }
+ )
+ : ()
+ ),
{field=>'disabled', type=>$disabled_type, value=>'Y'},
{ type => 'tablebreak-tr-title',