X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction.pm;fp=FS%2FFS%2Fpart_event%2FAction.pm;h=c0c70b1c3d1f72bb81346a162953ee0530cc19a1;hb=53ea5a72067a9b0ebcd3417692c3884d6f91f74a;hp=094cf7d3a2502fe50f10ec99f6eae0c0fb7d2003;hpb=81d973916db8389df760f4055b3eb3825b3ed262;p=freeside.git diff --git a/FS/FS/part_event/Action.pm b/FS/FS/part_event/Action.pm index 094cf7d3a..c0c70b1c3 100644 --- a/FS/FS/part_event/Action.pm +++ b/FS/FS/part_event/Action.pm @@ -192,6 +192,21 @@ sub cust_main { } +=item cust_pkg OBJECT + +Return the package object (L) associated with the provided +object. The object must be either a service (L) or a +package. + +=cut + +sub cust_pkg { + my( $self, $object ) = @_; + $object->isa('FS::cust_pkg') ? $object : + $object->isa('FS::svc_Common') ? $object->cust_svc->cust_pkg : + undef; +} + =item option_label OPTIONNAME Returns the label for the specified option name.