summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorlevinse <levinse>2011-04-11 23:00:03 +0000
committerlevinse <levinse>2011-04-11 23:00:03 +0000
commit2579dce95f2a41d7a162404f193545e9601c374d (patch)
tree9a1b64a95cc9ce828719269ce83f04493c5ca1ac /FS/FS
parent6e3e6b1051bf8bc603a437a72d5272f61330af18 (diff)
improvements to bulk DID orders, RT11291
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/Schema.pm2
-rw-r--r--FS/FS/did_order.pm11
2 files changed, 12 insertions, 1 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 803cb47..f1814b3 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -3141,7 +3141,7 @@ sub tables_hashref {
'msa', 'varchar', 'NULL', $char_d, '', '',
'npa', 'int', 'NULL', '', '', '',
'latanum', 'int', 'NULL', '', '', '',
- 'rate_center', 'varchar', 'NULL', $char_d, '', '',
+ 'ratecenter', 'varchar', 'NULL', $char_d, '', '',
'state', 'char', 'NULL', 2, '', '',
'quantity', 'int', '', '', '', '',
],
diff --git a/FS/FS/did_order.pm b/FS/FS/did_order.pm
index f46d72b..adc965f 100644
--- a/FS/FS/did_order.pm
+++ b/FS/FS/did_order.pm
@@ -138,6 +138,17 @@ sub did_order_item {
qsearch( 'did_order_item', { 'ordernum' => $self->ordernum } );
}
+=item cust_main
+
+Returns the cust_main (see L<FS::cust_main>), if any, associated with this bulk DID order.
+
+=cut
+
+sub cust_main {
+ my $self = shift;
+ return '' unless $self->custnum;
+ qsearchs('cust_main', { 'custnum' => $self->custnum } );
+}
=back