=item quantity
+=item custnum - foreign key to cust_main table, optional
+
=back
=head1 METHODS
|| $self->ut_foreign_keyn('ratecenternum', 'rate_center', 'ratecenternum')
|| $self->ut_textn('state')
|| $self->ut_number('quantity')
+ || $self->ut_foreign_keyn('custnum', 'cust_main', 'custnum')
;
return $error if $error;
$self->SUPER::check;
}
+=item rate_center
+
+Returns the rate_center for this order item.
+
+=cut
+
+sub rate_center {
+ my $self = shift;
+ return '' unless $self->ratecenternum;
+ qsearchs('rate_center', { 'ratecenternum' => $self->ratecenternum });
+}
+
=back
=head1 SEE ALSO
-L<FS::Record>, schema.html from the base documentation.
+L<FS::did_order>, <FS::Record>, schema.html from the base documentation.
=cut