late notices on those invoices. The default is now. It is specified as a UNIX timestamp; see L<perlfunc/"time">). Also see L<Time::Local> and L<Date::Parse>
for conversion functions.
-batch_card - Set this true to batch cards (see L<cust_pay_batch>). By
+batch_card - Set this true to batch cards (see L<FS::cust_pay_batch>). By
default, cards are processed immediately, which will generate an error if
CyberCash is not installed.
$payname = "$payfirst $paylast";
}
+ my @invoicing_list = grep { $_ ne 'POST' } $self->invoicing_list;
+ if ( $conf->exists('emailinvoiceonly') ) {
+ @invoicing_list = $self->default_invoicing_list
+ unless @invoicing_list;
+ }
+ my $email = $invoicing_list[0];
+
my( $action1, $action2 ) = split(/\s*\,\s*/, $bop_action );
my $transaction =
'card_number' => $self->payinfo,
'expiration' => $exp,
'referer' => 'http://cleanwhisker.420.am/',
+ 'email' => $email,
);
$transaction->submit();
'';
}
+=item default_invoicing_list
+
+=cut
+
+sub default_invoicing_list {
+ my $self = shift;
+ my @list = ();
+ foreach my $cust_pkg ( $self->all_pkgs ) {
+ my @cust_svc = qsearch('cust_svc', { 'pkgnum' => $cust_pkg->pkgnum } );
+ my @svc_acct =
+ map { qsearchs('svc_acct', { 'svcnum' => $_->svcnum } ) }
+ grep { qsearchs('svc_acct', { 'svcnum' => $_->svcnum } ) }
+ @cust_svc;
+ push @list, map { $_->email } @svc_acct;
+ }
+ $self->invoicing_list(\@list);
+}
+
=item referral_cust_main [ DEPTH [ EXCLUDE_HASHREF ] ]
Returns an array of customers referred by this customer (referral_custnum set
=head1 VERSION
-$Id: cust_main.pm,v 1.35 2001-09-25 15:55:48 ivan Exp $
+$Id: cust_main.pm,v 1.38 2001-09-26 09:17:06 ivan Exp $
=head1 BUGS