1 package FS::part_pkg::currency_fixed;
3 #use base qw( FS::part_pkg::discount_Mixin FS::part_pkg::recur_Common );
4 use base qw( FS::part_pkg::recur_Common );
8 #use FS::Record qw(qsearch qsearchs);
11 'name' => 'Per-currency pricing from package definitions',
12 'shortname' => 'Per-currency pricing',
13 'inherit_fields' => [ 'prorate_Mixin', 'global_Mixin' ],
15 'cutoff_day' => { 'name' => 'Billing Day (1 - 28) for prorating or '.
20 'recur_method' => { 'name' => 'Recurring fee method',
22 #'options' => \%recur_method,
24 'select_options' => \%FS::part_pkg::recur_Common::recur_method,
27 'fieldorder' => [qw( recur_method cutoff_day ),
28 FS::part_pkg::prorate_Mixin::fieldorder,
35 my $str = $self->SUPER::price_info;
36 $str .= " (or local currency pricing)" if $str;
40 #some false laziness w/recur_Common, could have been better about it.. pry when
43 my($self, $cust_pkg, $sdate, $details, $param) = @_;
45 return 0 if $self->prorate_setup($cust_pkg, $sdate);
47 sprintf('%.2f', $cust_pkg->part_pkg_currency_option('setup_fee') );
51 my( $self, $cust_pkg ) = @_;
52 sprintf('%.2f', $cust_pkg->part_pkg_currency_option('recur_fee') );
55 sub can_discount { 0; } #can't discount yet (percentage would work, but amount?)
58 #my($cust_pkg, $sdate, $details, $param ) = @_;
59 #$self->calc_recur_Common($cust_pkg,$sdate,$details,$param);
60 $self->calc_recur_Common(@_);
65 sub can_currency_exchange { 1; }