X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=00ddc828ef0c1e4bf6371e2f0f7320eaf5d65d33;hb=08cc56589e213542a72060234bdad49fbfeb67c2;hp=4a254e06ccf0e996993a77cb1ad21e8cf054d825;hpb=15f65a0c56cbce6951d9cb4f71119725a2009f79;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 4a254e06c..00ddc828e 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -191,15 +191,17 @@ but until then, here's an example: use Tie::RefHash; tie %hash, 'Tie::RefHash'; #this part is important - %hash = { + %hash = ( $cust_pkg => [ $svc_acct ], - }; + ... + ); $cust_main->insert( \%hash ); =cut sub insert { my $self = shift; + my @param = @_; local $SIG{HUP} = 'IGNORE'; local $SIG{INT} = 'IGNORE'; @@ -239,8 +241,8 @@ sub insert { return $error; } - if ( @_ ) { - my $cust_pkgs = shift; + if ( @param ) { + my $cust_pkgs = shift @param; foreach my $cust_pkg ( keys %$cust_pkgs ) { $cust_pkg->custnum( $self->custnum ); $error = $cust_pkg->insert; @@ -391,6 +393,9 @@ sub check { || $self->ut_textn('county') || $self->ut_textn('state') ; + #barf. need message catalogs. i18n. etc. + $error .= "Please select a referral." + if $error =~ /^Illegal or empty \(numeric\) refnum: /; return $error if $error; return "Unknown agent" @@ -1114,7 +1119,7 @@ sub check_invoicing_list { =head1 VERSION -$Id: cust_main.pm,v 1.11 2001-04-09 23:05:15 ivan Exp $ +$Id: cust_main.pm,v 1.13 2001-05-07 02:07:38 ivan Exp $ =head1 BUGS