use FS::cust_pkg_discount;
use FS::discount;
use FS::UI::Web;
+use Data::Dumper;
# need to 'use' these instead of 'require' in sub { cancel, suspend, unsuspend,
# setup }
Previous locationnum
+=item waive_setup
+
=back
Note: setup, last_bill, bill, adjourn, susp, expire, cancel and change_date
|| $self->ut_numbern('cancel')
|| $self->ut_numbern('adjourn')
|| $self->ut_numbern('expire')
+ || $self->ut_numbern('dundate')
|| $self->ut_enum('no_auto', [ '', 'Y' ])
+ || $self->ut_enum('waive_setup', [ '', 'Y' ])
+ || $self->ut_numbern('agent_pkgid')
;
return $error if $error;
+ return "A package with both start date (future start) and setup date (already started) will never bill"
+ if $self->start_date && $self->setup;
+
$self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum;
if ( $self->dbdef_table->column('manual_flag') ) {
map { [ $_, $_->svc_x->table_info->{'cancel_weight'} ]; }
qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum } )
) {
+ my $part_svc = $cust_svc->part_svc;
+ next if ( defined($part_svc) and $part_svc->preserve );
my $error = $cust_svc->cancel( %svc_cancel_opt );
if ( $error ) {
}
-use Data::Dumper;
use Storable 'thaw';
use MIME::Base64;
sub process_bulk_cust_pkg {
'amount' => $self->discountnum_amount,
'percent' => $self->discountnum_percent,
'months' => $self->discountnum_months,
+ 'setup' => $self->discountnum_setup,
#'disabled' => $self->discountnum_disabled,
};