X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=8357386046c9d41803edd9c063f164a491ad6f7e;hb=e497261817ee2cf3acb5ee3dda3c5906f1c13a4f;hp=65bfc80ae3578a549e9387f7a8fc7db5bfdb0df9;hpb=a2c63a59734369fdda2073349c164a2649af8e10;p=freeside.git diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 65bfc80ae..835738604 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -2343,6 +2343,24 @@ sub num_cust_event { $sth->fetchrow_arrayref->[0]; } +=item part_pkg_currency_option OPTIONNAME + +Returns the option value for the given name and the currency of this customer +(see L). If this customer has no currency, returns +the regular option value for the given name (see L). + +=cut + +sub part_pkg_currency_option { + my( $self, $optionname ) = @_; + my $part_pkg = $self->part_pkg; + if ( my $currency = $self->cust_main->currency ) { + $part_pkg->part_pkg_currency_option($currency, $optionname); + } else { + $part_pkg->option($optionname); + } +} + =item cust_svc [ SVCPART ] (old, deprecated usage) =item cust_svc [ OPTION => VALUE ... ] (current usage)