summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg_usageprice.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-08 17:23:05 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-08 17:23:05 -0800
commit8861d46820af163c7de7839178b6120c9b32ab2c (patch)
treeebd723b2d1ea70f57bc52f94c80d991b5f50094a /FS/FS/part_pkg_usageprice.pm
parent49809d3653e7ac4951d36716dce3cd25ba9c3728 (diff)
time/data/etc. unit pricing add-ons, RT#24392
Diffstat (limited to 'FS/FS/part_pkg_usageprice.pm')
-rw-r--r--FS/FS/part_pkg_usageprice.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/FS/FS/part_pkg_usageprice.pm b/FS/FS/part_pkg_usageprice.pm
index 88e3870..9c3b1be 100644
--- a/FS/FS/part_pkg_usageprice.pm
+++ b/FS/FS/part_pkg_usageprice.pm
@@ -121,8 +121,21 @@ sub check {
$self->SUPER::check;
}
+=item target_info
+
+Returns a hash reference of information about the target of this object.
+Keys are "label" and "multiplier".
+
+=cut
+
+sub target_info {
+ my $self = shift;
+ $self->targets->{$self->target};
+}
+
=item targets
+(Class method)
Returns a hash reference. Keys are possible values for the "target" field.
Values are hash references with "label" and "multiplier" keys.