diff options
author | ivan <ivan> | 2005-01-19 21:25:43 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-01-19 21:25:43 +0000 |
commit | e4ae5122522f2d45c68a38eaef337a82029f2fc1 (patch) | |
tree | be86fc045972868f626731e25f5eb3f66e4cf0c2 /FS/FS/part_pkg/sesmon_minute.pm | |
parent | fcc0d3d4015c5aae07d853b3b9f928ab9f2b12ef (diff) |
credit for unused portion at cancellation, patch from pbowen
Diffstat (limited to 'FS/FS/part_pkg/sesmon_minute.pm')
-rw-r--r-- | FS/FS/part_pkg/sesmon_minute.pm | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/FS/FS/part_pkg/sesmon_minute.pm b/FS/FS/part_pkg/sesmon_minute.pm index 86affa7..fd90235 100644 --- a/FS/FS/part_pkg/sesmon_minute.pm +++ b/FS/FS/part_pkg/sesmon_minute.pm @@ -8,25 +8,29 @@ use FS::part_pkg; @ISA = qw(FS::part_pkg::flat); %info = ( - 'name' => 'Base charge plus charge per-minute from the session monitor', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_flat' => { 'name' => 'Base monthly charge for this package', - 'default' => 0, - }, - 'recur_included_min' => { 'name' => 'Minutes included', - 'default' => 0, - }, - 'recur_minly_charge' => { 'name' => 'Additional charge per minute', - 'default' => 0, + 'name' => 'Base charge plus charge per-minute from the session monitor', + 'fields' => { + 'setup_fee' => { 'name' => 'Setup fee for this package', + 'default' => 0, + }, + 'recur_flat' => { 'name' => 'Base monthly charge 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, }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_flat', '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_flat.value + \' + \' + what.recur_minly_charge.value + \' * $min;\'', - 'weight' => 80, + 'recur_minly_charge' => { 'name' => 'Additional charge per minute', + 'default' => 0, + }, + }, + 'fieldorder' => [ 'setup_fee', 'recur_flat', 'unused_credit', '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_flat.value + \' + \' + what.recur_minly_charge.value + \' * $min;\'', + 'weight' => 80, ); |