X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fglobal_Mixin.pm;h=2318c3e6168c71df0e78559ef50a2b4640f2fe2d;hb=4d0db1129018d2f598091edbbffeb09b23c64d99;hp=ec2eb4e2e46641a6a4a793b4d5971abbbcc4fe03;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/FS/FS/part_pkg/global_Mixin.pm b/FS/FS/part_pkg/global_Mixin.pm index ec2eb4e2e..2318c3e61 100644 --- a/FS/FS/part_pkg/global_Mixin.pm +++ b/FS/FS/part_pkg/global_Mixin.pm @@ -3,6 +3,17 @@ package FS::part_pkg::global_Mixin; use strict; use vars qw(%info); +use Tie::IxHash; +tie my %a2billing_types, 'Tie::IxHash', ( + 0 => 'Prepaid', + 1 => 'Postpaid', +); + +tie my %a2billing_simultaccess, 'Tie::IxHash', ( + 0 => 'Disabled', + 1 => 'Enabled', +); + %info = ( 'disabled' => 1, 'fields' => { @@ -19,17 +30,100 @@ use vars qw(%info); 'cancellation', 'type' => 'checkbox', }, + 'unused_credit_suspend' => { + 'name' => 'Credit the customer for the unused portion of service when '. + 'suspending', + 'type' => 'checkbox', + }, 'unused_credit_change' => { 'name' => 'Credit the customer for the unused portion of service when '. 'changing packages', 'type' => 'checkbox', }, - }, + 'delay_cancel' => { + 'name' => 'Automatically suspend for one day before cancelling', + 'type' => 'checkbox', + }, + + # miscellany--maybe put this in a separate module? + + 'a2billing_tariff' => { + 'name' => 'A2Billing tariff group ID', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + } + }, + 'a2billing_type' => { + 'name' => 'A2Billing card type', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + 'type' => 'select', + 'select_options' => \%a2billing_types, + }, + 'a2billing_simultaccess' => { + 'name' => 'A2Billing Simultaneous Access', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + 'type' => 'select', + 'select_options' => \%a2billing_simultaccess, + }, + 'a2billing_carrier_cost_min' => { + 'name' => 'A2Billing inbound carrier cost', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + }, + 'a2billing_carrer_initblock_offp' => { + 'name' => 'A2Billing inbound carrier min duration', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + }, + 'a2billing_carrier_increment_offp' => { + 'name' => 'A2Billing inbound carrier billing block', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + }, + 'a2billing_retail_cost_min_offp' => { + 'name' => 'A2Billing inbound retail cost', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + }, + 'a2billing_retail_initblock_offp' => { + 'name' => 'A2Billing inbound retail min duration', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + }, + 'a2billing_retail_increment_offp' => { + 'name' => 'A2Billing inbound retail billing block', + 'display_if' => sub { + FS::part_export->count("exporttype = 'a2billing'") > 0; + }, + }, + + }, 'fieldorder' => [ qw( setup_fee recur_fee unused_credit_cancel + unused_credit_suspend unused_credit_change + delay_cancel + + a2billing_tariff + a2billing_type + a2billing_simultaccess + a2billing_carrier_cost_min + a2billing_carrer_initblock_offp + a2billing_carrier_increment_offp + a2billing_retail_cost_min_offp + a2billing_retail_initblock_offp + a2billing_retail_increment_offp )], );