X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fglobal_Mixin.pm;h=2dad511acaf46875f44a35751c96919ca8eb70f0;hb=0692ff47a2eac65616bf24104a51e558506f1b8f;hp=56f160247aaa392433486ec6c26a14e907bd97a9;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/FS/FS/part_pkg/global_Mixin.pm b/FS/FS/part_pkg/global_Mixin.pm index 56f160247..2dad511ac 100644 --- a/FS/FS/part_pkg/global_Mixin.pm +++ b/FS/FS/part_pkg/global_Mixin.pm @@ -1,9 +1,13 @@ package FS::part_pkg::global_Mixin; use strict; -use vars qw(@ISA %info); -use FS::part_pkg; -@ISA = qw(FS::part_pkg); +use vars qw(%info); + +use Tie::IxHash; +tie my %a2billing_types, 'Tie::IxHash', ( + 0 => 'Prepaid', + 1 => 'Postpaid', +); %info = ( 'disabled' => 1, @@ -21,17 +25,44 @@ use FS::part_pkg; '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', }, + + # 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, + }, + }, 'fieldorder' => [ qw( setup_fee recur_fee unused_credit_cancel + unused_credit_suspend unused_credit_change + + a2billing_tariff + a2billing_type )], );