X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fsesmon_minute.pm;h=b86cffd76683bf8e59ffb3a7764fc2652abef9a5;hb=b79a8cb932946c849328a3c117c35821d9d21e66;hp=7386df675abb1d7ea3254a764895c532a7104434;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/FS/FS/part_pkg/sesmon_minute.pm b/FS/FS/part_pkg/sesmon_minute.pm index 7386df675..b86cffd76 100644 --- a/FS/FS/part_pkg/sesmon_minute.pm +++ b/FS/FS/part_pkg/sesmon_minute.pm @@ -8,19 +8,11 @@ use FS::part_pkg::flat; @ISA = qw(FS::part_pkg::flat); %info = ( + 'disabled' => 1, #internal session db deprecated (or at least on hold) 'name' => 'Base charge plus charge per-minute from the session monitor', 'shortname' => 'Session monitor (per-minute)', + 'inherit_fields' => [ 'global_Mixin' ], 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Base recurring fee for this package', - 'default' => 0, - }, - 'unused_credit' => { 'name' => 'Credit the customer for the unused portion'. - ' of service at cancellation', - 'type' => 'checkbox', - }, 'recur_included_min' => { 'name' => 'Minutes included', 'default' => 0, }, @@ -28,12 +20,18 @@ use FS::part_pkg::flat; 'default' => 0, }, }, - 'fieldorder' => [ 'setup_fee', 'recur_fee', 'unused_credit', 'recur_included_min', 'recur_minly_charge' ], + 'fieldorder' => [ 'recur_included_min', 'recur_minly_charge' ], #'setup' => 'what.setup_fee.value', #'recur' => '\'my $min = $cust_pkg->seconds_since($cust_pkg->bill || 0) / 60 - \' + what.recur_included_min.value + \'; $min = 0 if $min < 0; \' + what.recur_fee.value + \' + \' + what.recur_minly_charge.value + \' * $min;\'', 'weight' => 80, ); +sub price_info { + my $self = shift; + my $str = $self->SUPER::price_info; + $str .= " plus usage" if $str; + $str; +} sub calc_recur { my( $self, $cust_pkg ) = @); @@ -44,6 +42,8 @@ sub calc_recur { $self->option('recur_fee') + $min * $self->option('recur_minly_charge'); } +sub can_discount { 0; } + sub is_free_options { qw( setup_fee recur_fee recur_minly_charge ); }