X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fflat_comission_cust.pm;h=5acf73d7ab39637a302fdd05e4b43d63b8500d7b;hp=82e5111e84ad2ad50255e873954716a4edbdc7d6;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=5e05724a635a22776f1b973f5d7e77989da4e048 diff --git a/FS/FS/part_pkg/flat_comission_cust.pm b/FS/FS/part_pkg/flat_comission_cust.pm index 82e5111e8..5acf73d7a 100644 --- a/FS/FS/part_pkg/flat_comission_cust.pm +++ b/FS/FS/part_pkg/flat_comission_cust.pm @@ -9,32 +9,10 @@ use FS::part_pkg::flat; %info = ( 'name' => 'Flat rate with recurring commission per active customer', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - 'unused_credit' => { 'name' => 'Credit the customer for the unused portion'. - ' of service at cancellation', - 'type' => 'checkbox', - }, - 'comission_amount' => { 'name' => 'Commission amount per month (per active customer)', - 'default' => 0, - }, - 'comission_depth' => { 'name' => 'Number of layers', - 'default' => 1, - }, - 'reason_type' => { 'name' => 'Reason type for commission credits', - 'type' => 'select_table', - 'select_table' => 'reason_type', - 'select_hash' => { 'class' => 'R' }, - 'select_key' => 'typenum', - 'select_label' => 'type', - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee', 'unused_credit', 'comission_depth', 'comission_amount', 'reason_type' ], + 'shortname' => 'Commission per active customer', + 'inherit_fields' => [ 'flat_comission', 'global_Mixin' ], + 'fields' => { }, + 'fieldorder' => [ ], #'setup' => 'what.setup_fee.value', #'recur' => '\'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar($cust_pkg->cust_main->referral_cust_main_ncancelled(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'', 'weight' => '60', @@ -61,4 +39,6 @@ sub calc_recur { $self->option('recur_fee'); } +sub can_discount { 0; } + 1;