'cust_pkg' => 1,
'cust_pay_batch' => 1,
'cust_statement' => 1,
+ 'svc_acct' => 1,
};
}
}
+=item cust_pkg OBJECT
+
+Return the package object (L<FS::cust_pkg>) associated with the provided
+object. The object must be either a service (L<FS::svc_Common>) 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.
my $integer = ($driver_name =~ /^mysql/) ? 'UNSIGNED INTEGER' : 'INTEGER';
- 'CAST ('. $class->condition_sql_option($option). " AS $integer )";
+ 'CAST(
+ COALESCE('. $class->condition_sql_option($option).
+ " ,'0') ".
+ " AS $integer )";
}
=head1 NEW CONDITION CLASSES