X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=b7b9be51b4ac01e3c051dab4611c1a87ded7566b;hp=c6e4c39505c40b5412800492a1650b78a9edec80;hb=9d96031e79187a549c2c150e96363d421e59efc5;hpb=32834b6e8a92ca3ec0bbf58075956a7d0edca79a diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index c6e4c3950..b7b9be51b 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -120,6 +120,10 @@ part_pkg, will be equal to pkgpart. =item delay_start - Number of days to delay package start, by default +=item start_on_hold - 'Y' to suspend this package immediately when it is +ordered. The package will not start billing or have a setup fee charged +until it is manually unsuspended. + =back =head1 METHODS @@ -601,14 +605,15 @@ sub check { || $self->ut_textn('comment') || $self->ut_textn('promo_code') || $self->ut_alphan('plan') - || $self->ut_enum('setuptax', [ '', 'Y' ] ) - || $self->ut_enum('recurtax', [ '', 'Y' ] ) + || $self->ut_flag('setuptax') + || $self->ut_flag('recurtax') || $self->ut_textn('taxclass') - || $self->ut_enum('disabled', [ '', 'Y' ] ) - || $self->ut_enum('custom', [ '', 'Y' ] ) - || $self->ut_enum('no_auto', [ '', 'Y' ]) - || $self->ut_enum('recur_show_zero', [ '', 'Y' ]) - || $self->ut_enum('setup_show_zero', [ '', 'Y' ]) + || $self->ut_flag('disabled') + || $self->ut_flag('custom') + || $self->ut_flag('no_auto') + || $self->ut_flag('recur_show_zero') + || $self->ut_flag('setup_show_zero') + || $self->ut_flag('start_on_hold') #|| $self->ut_moneyn('setup_cost') #|| $self->ut_moneyn('recur_cost') || $self->ut_floatn('setup_cost') @@ -1082,7 +1087,10 @@ sub is_free { sub can_discount { 0; } # whether the plan allows changing the start date -sub can_start_date { 1; } +sub can_start_date { + my $self = shift; + $self->start_on_hold ? 0 : 1; +} # the delay start date if present sub delay_start_date {