#!/usr/bin/perl -Tw
#
-# $Id: cust_bill.cgi,v 1.6 1999-01-19 05:14:18 ivan Exp $
+# $Id: cust_bill.cgi,v 1.7 1999-01-25 12:26:03 ivan Exp $
#
# Note: Should be run setuid freeside as user nobody.
#
# also print 'printed' field ivan@sisd.com 98-jul-10
#
# $Log: cust_bill.cgi,v $
-# Revision 1.6 1999-01-19 05:14:18 ivan
+# Revision 1.7 1999-01-25 12:26:03 ivan
+# yet more mod_perl stuff
+#
+# Revision 1.6 1999/01/19 05:14:18 ivan
# for mod_perl: no more top-level my() variables; use vars instead
# also the last s/create/new/;
#
<A HREF="${p}edit/cust_pay.cgi?$invnum">Enter payments (check/cash) against this invoice</A>
<BR><A HREF="${p}misc/print-invoice.cgi?$invnum">Reprint this invoice</A>
<BR><BR>(Printed $printed times)
- <FONT SIZE=-1><PRE>
+ <PRE>
END
print $cust_bill->print_text;
#!/usr/bin/perl -Tw
#
-# $Id: cust_main.cgi,v 1.10 1999-01-19 05:14:19 ivan Exp $
+# $Id: cust_main.cgi,v 1.11 1999-01-25 12:26:04 ivan Exp $
#
# Usage: cust_main.cgi custnum
# http://server.name/path/cust_main.cgi?custnum
# lose background, FS::CGI ivan@sisd.com 98-sep-2
#
# $Log: cust_main.cgi,v $
-# Revision 1.10 1999-01-19 05:14:19 ivan
+# Revision 1.11 1999-01-25 12:26:04 ivan
+# yet more mod_perl stuff
+#
+# Revision 1.10 1999/01/19 05:14:19 ivan
# for mod_perl: no more top-level my() variables; use vars instead
# also the last s/create/new/;
#
use strict;
use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral
@packages $package @history @bills $bill @credits $credit
- $balance $item );
+ $balance $item @agents @referrals @invoicing_list $n1 );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use Date::Format;
use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearchs qsearch);
-use FS::CGI qw(header menubar popurl table);
+use FS::CGI qw(header menubar popurl table itable ntable);
use FS::cust_credit;
use FS::cust_pay;
use FS::cust_bill;
print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar(
'Main Menu' => popurl(2)
-)),<<END;
- <BASEFONT SIZE=3>
-END
+));
die "No customer specified (bad URL)!" unless $cgi->keywords;
($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
die "Customer not found!" unless $cust_main;
$hashref = $cust_main->hashref;
-#custnum
-print "<FONT SIZE=+1><CENTER>Customer #<B>$custnum</B></CENTER></FONT>",
- qq!<CENTER><A HREF="#cust_main">Customer Information</A> | !,
- qq!<A HREF="#cust_comments">Comments</A> | !,
- qq!<A HREF="#cust_pkg">Packages</A> | !,
- qq!<A HREF="#history">Payment History</A> </CENTER>!;
+print itable(), '<TR><TD><A NAME="cust_main"></A>';
-#bill now linke
-print qq!<HR><CENTER><A HREF="!, popurl(2), qq!/misc/bill.cgi?$custnum">!,
- qq!Bill this customer now</A></CENTER>!;
+print qq!<A HREF="!, popurl(2),
+ qq!edit/cust_main.cgi?$custnum">Edit this customer</A>!,
+ ntable("#c0c0c0"), "<TR><TD>", ntable("#c0c0c0",2),
+ '<TR><TD ALIGN="right">Customer number</TD><TD BGCOLOR="#ffffff">',
+ $custnum, '</TD></TR>',
+;
-#formatting
-print qq!<HR><A NAME="cust_main"><CENTER><FONT SIZE=+1>Customer Information!,
- qq!</FONT>!,
- qq!<BR><A HREF="!, popurl(2), qq!edit/cust_main.cgi?$custnum!,
- qq!">Edit this information</A></CENTER><FONT SIZE=-1>!;
-
-#agentnum
-$agent = qsearchs('agent',{
- 'agentnum' => $cust_main->getfield('agentnum')
-} );
-die "Agent not found!" unless $agent;
-print "<BR>Agent #<B>" , $agent->getfield('agentnum') , ": " ,
- $agent->getfield('agent') , "</B>";
-
-#refnum
-$referral = qsearchs('part_referral',{'refnum' => $cust_main->refnum});
-die "Referral not found!" unless $referral;
-print "<BR>Referral #<B>", $referral->refnum, ": ",
- $referral->referral, "<\B>";
-
-#last, first
-print "<P><B>", $hashref->{'last'}, ", ", $hashref->{first}, "</B>";
-
-#ss
-print " (SS# <B>", $hashref->{ss}, "</B>)" if $hashref->{ss};
-
-#company
-print "<BR><B>", $hashref->{company}, "</B>" if $hashref->{company};
-
-#address1
-print "<BR><B>", $hashref->{address1}, "</B>";
-
-#address2
-print "<BR><B>", $hashref->{address2}, "</B>" if $hashref->{address2};
-
-#city
-print "<BR><B>", $hashref->{city}, "</B>";
-
-#county
-print " (<B>", $hashref->{county}, "</B> county)" if $hashref->{county};
-
-#state
-print ",<B>", $hashref->{state}, "</B>";
-
-#zip
-print " <B>", $hashref->{zip}, "</B>";
-
-#country
-print "<BR><B>", $hashref->{country}, "</B>"
- unless $hashref->{country} eq "US";
-
-#daytime
-print "<P><B>", $hashref->{daytime}, "</B>" if $hashref->{daytime};
-print " (Day)" if $hashref->{daytime} && $hashref->{night};
-
-#night
-print "<BR><B>", $hashref->{night}, "</B>" if $hashref->{night};
-print " (Night)" if $hashref->{daytime} && $hashref->{night};
-
-#fax
-print "<BR><B>", $hashref->{fax}, "</B> (Fax)" if $hashref->{fax};
-
-#payby/payinfo/paydate/payname
-if ($hashref->{payby} eq "CARD") {
- print "<P>Card #<B>", $hashref->{payinfo}, "</B> Exp. <B>",
- $hashref->{paydate}, "</B>";
- print " (<B>", $hashref->{payname}, "</B>)" if $hashref->{payname};
-} elsif ($hashref->{payby} eq "BILL") {
- print "<P>Bill";
- print " on P.O. #<B>", $hashref->{payinfo}, "</B>"
- if $hashref->{payinfo};
- print " until <B>", $hashref->{paydate}, "</B>"
- if $hashref->{paydate};
- print " to <B>", $hashref->{payname}, "</B> at above address"
- if $hashref->{payname};
-} elsif ($hashref->{payby} eq "COMP") {
- print "<P>Access complimentary";
- print " courtesy of <B>", $hashref->{payinfo}, "</B>"
- if $hashref->{payinfo};
- print " until <B>", $hashref->{paydate}, "</B>"
- if $hashref->{paydate};
-} else {
- print "Unknown payment type ", $hashref->{payby}, "!";
+@agents = qsearch( 'agent', {} );
+unless ( scalar(@agents) == 1 ) {
+ $agent = qsearchs('agent',{
+ 'agentnum' => $cust_main->agentnum
+ } );
+ print '<TR><TD ALIGN="right">Agent</TD><TD BGCOLOR="#ffffff">',
+ $agent->agentnum, ": ", $agent->agent, '</TD></TR>';
+}
+@referrals = qsearch( 'part_referral', {} );
+unless ( scalar(@referrals) == 1 ) {
+ my $referral = qsearchs('part_referral', {
+ 'refnum' => $cust_main->refnum
+ } );
+ print '<TR><TD ALIGN="right">Referral</TD><TD BGCOLOR="#ffffff">',
+ $referral->refnum, ": ", $referral->referral, '</TD></TR>';
+}
+print '<TR><TD ALIGN="right">Order taker</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->otaker, '</TD></TR>';
+
+print '</TABLE></TD></TR></TABLE>';
+
+print '</TD><TD ROWSPAN=2>';
+
+print "Contact information", ntable("#c0c0c0"), "<TR><TD>",
+ ntable("#c0c0c0",2),
+ '<TR><TD ALIGN="right">Contact name<BR>(last, first)</TD>',
+ '<TD COLSPAN=3 BGCOLOR="#ffffff">',
+ $cust_main->last, ', ', $cust_main->first,
+ '</TD><TD ALIGN="right">SS#</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->ss || ' ', '</TD></TR>',
+ '<TR><TD ALIGN="right">Company</TD><TD COLSPAN=5 BGCOLOR="#ffffff">',
+ $cust_main->company,
+ '</TD></TR>',
+ '<TR><TD ALIGN="right">Address</TD><TD COLSPAN=5 BGCOLOR="#ffffff">',
+ $cust_main->address1,
+ '</TD></TR>',
+;
+print '<TR><TD ALIGN="right"> </TD><TD COLSPAN=5 BGCOLOR="#ffffff">',
+ $cust_main->address2, '</TD></TR>'
+ if $cust_main->address2;
+print '<TR><TD ALIGN="right">City</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->city,
+ '</TD><TD ALIGN="right">State</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->state,
+ '</TD><TD ALIGN="right">Zip</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->zip, '</TD></TR>',
+ '<TR><TD ALIGN="right">Country</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->country,
+ '</TD></TR>',
+;
+print '<TR><TD ALIGN="right">Day Phone</TD><TD COLSPAN=5 BGCOLOR="#ffffff">',
+ $cust_main->daytime || ' ', '</TD></TR>',
+ '<TR><TD ALIGN="right">Night Phone</TD><TD COLSPAN=5 BGCOLOR="#ffffff">',
+ $cust_main->night || ' ', '</TD></TR>',
+ '<TR><TD ALIGN="right">Fax</TD><TD COLSPAN=5 BGCOLOR="#ffffff">',
+ $cust_main->fax || ' ', '</TD></TR>',
+ '</TABLE>', "</TD></TR></TABLE>"
+;
+
+print '</TD></TR><TR><TD>';
+
+@invoicing_list = $cust_main->invoicing_list;
+print "Billing information (",
+ qq!<A HREF="!, popurl(2), qq!/misc/bill.cgi?$custnum">!, "Bill now</A>)",
+ ntable("#c0c0c0"), "<TR><TD>", ntable("#c0c0c0",2),
+ '<TR><TD ALIGN="right">Tax exempt</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->tax ? 'yes' : 'no',
+ '</TD></TR>',
+ '<TR><TD ALIGN="right">Postal invoices</TD><TD BGCOLOR="#ffffff">',
+ ( grep { $_ eq 'POST' } @invoicing_list ) ? 'yes' : 'no',
+ '</TD></TR>',
+ '<TR><TD ALIGN="right">Email invoices</TD><TD BGCOLOR="#ffffff">',
+ join(', ', grep { $_ ne 'POST' } @invoicing_list ),
+ '</TD></TR>',
+ '<TR><TD ALIGN="right">Billing type</TD><TD BGCOLOR="#ffffff">',
+;
+
+if ( $cust_main->payby eq 'CARD' ) {
+ print 'Credit card</TD></TR>',
+ '<TR><TD ALIGN="right">Card number</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->payinfo, '</TD></TR>',
+ '<TR><TD ALIGN="right">Expiration</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->paydate, '</TD></TR>',
+ '<TR><TD ALIGN="right">Name on card</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->payname, '</TD></TR>'
+ ;
+} elsif ( $cust_main->payby eq 'BILL' ) {
+ print 'Billing</TD></TR>';
+ print '<TR><TD ALIGN="right">P.O. </TD><TD BGCOLOR="#ffffff">',
+ $cust_main->payinfo, '</TD></TR>',
+ if $cust_main->payinfo;
+ print '<TR><TD ALIGN="right">Expiration</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->paydate, '</TD></TR>',
+ '<TR><TD ALIGN="right">Attention</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->payname, '</TD></TR>',
+ ;
+} elsif ( $cust_main->payby eq 'COMP' ) {
+ print 'Complimentary</TD></TR>',
+ '<TR><TD ALIGN="right">Authorized by</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->payinfo, '</TD></TR>',
+ '<TR><TD ALIGN="right">Expiration</TD><TD BGCOLOR="#ffffff">',
+ $cust_main->paydate, '</TD></TR>',
+ ;
}
-#tax
-print "<BR>(Tax exempt)" if $hashref->{tax};
-
-#otaker
-print "<P>Order taken by <B>", $hashref->{otaker}, "</B>";
+print "</TABLE></TD></TR></TABLE></TD></TR></TABLE>";
-#formatting
-print qq!<HR><FONT SIZE=+1><A NAME="cust_pkg"><CENTER>Packages</A></FONT>!,
- qq!<BR>Click on package number to view/edit package.!,
- qq!<BR><A HREF="!, popurl(2), qq!/edit/cust_pkg.cgi?$custnum">Add/Edit packages</A>!,
- qq!</CENTER><BR>!;
+print qq!<BR><BR><A NAME="cust_pkg">Packages</A> !,
+# qq!<BR>Click on package number to view/edit package.!,
+ qq!( <A HREF="!, popurl(2), qq!/edit/cust_pkg.cgi?$custnum">Order and cancel packages</A> )!,
+;
#display packages
#formatting
-print qq!<CENTER>!, table, "\n",
- qq!<TR><TH ROWSPAN=2>#</TH><TH ROWSPAN=2>Package</TH><TH COLSPAN=5>!,
- qq!Dates</TH></TR>\n!,
+print qq!!, table, "\n",
+ qq!<TR><TH COLSPAN=2 ROWSPAN=2>Package</TH><TH COLSPAN=5>!,
+ qq!Dates</TH><TH COLSPAN=2 ROWSPAN=2>Services</TH></TR>\n!,
qq!<TR><TH><FONT SIZE=-1>Setup</FONT></TH><TH>!,
qq!<FONT SIZE=-1>Next bill</FONT>!,
qq!</TH><TH><FONT SIZE=-1>Susp.</FONT></TH><TH><FONT SIZE=-1>Expire!,
qq!</TR>\n!;
#get package info
-@packages = qsearch('cust_pkg',{'custnum'=>$custnum});
+@packages = $cust_main->all_pkgs;
+#@packages = $cust_main->ncancelled_pkgs;
+
+$n1 = '';
foreach $package (@packages) {
- my($pref)=$package->hashref;
- my($part_pkg)=qsearchs('part_pkg',{
- 'pkgpart' => $pref->{pkgpart}
- } );
- print qq!<TR><TD><FONT SIZE=-1><A HREF="!, popurl(2), qq!view/cust_pkg.cgi?!,
- $pref->{pkgnum}, qq!">!,
- $pref->{pkgnum}, qq!</A></FONT></TD>!,
- "<TD><FONT SIZE=-1>", $part_pkg->getfield('pkg'), " - ",
- $part_pkg->getfield('comment'),
- qq!<FORM ACTION="!, popurl(2), qq!edit/part_pkg.cgi" METHOD=POST>!,
- qq!<INPUT TYPE="hidden" NAME="clone" VALUE="!, $part_pkg->pkgpart, qq!">!,
- qq!<INPUT TYPE="hidden" NAME="pkgnum" VALUE="!, $package->pkgnum, qq!">!,
- qq!<INPUT TYPE="submit" VALUE="Customize Pricing">!,
- "</FORM></FONT></TD>",
- "<TD><FONT SIZE=-1>",
- $pref->{setup} ? time2str("%D",$pref->{setup} ) : "" ,
- "</FONT></TD>",
- "<TD><FONT SIZE=-1>",
- $pref->{bill} ? time2str("%D",$pref->{bill} ) : "" ,
- "</FONT></TD>",
- "<TD><FONT SIZE=-1>",
- $pref->{susp} ? time2str("%D",$pref->{susp} ) : "" ,
- "</FONT></TD>",
- "<TD><FONT SIZE=-1>",
- $pref->{expire} ? time2str("%D",$pref->{expire} ) : "" ,
- "</FONT></TD>",
- "<TD><FONT SIZE=-1>",
- $pref->{cancel} ? time2str("%D",$pref->{cancel} ) : "" ,
- "</FONT></TD>",
- "</TR>";
-}
+ my $pkgnum = $package->pkgnum;
+ my $pkg = $package->part_pkg->pkg;
+ my $comment = $package->part_pkg->comment;
+ my $pkgview = popurl(2). "view/cust_pkg.cgi?$pkgnum";
+ my @cust_svc = qsearch( 'cust_svc', { 'pkgnum' => $pkgnum } );
+ my $rowspan = scalar(@cust_svc) || 1;
+
+ my $button_cgi = new CGI;
+ $button_cgi->param('clone', $package->part_pkg->pkgpart);
+ $button_cgi->param('pkgnum', $package->pkgnum);
+ my $button_url = popurl(2). "edit/part_pkg.cgi?". $button_cgi->query_string;
+
+ #print $n1, qq!<TD ROWSPAN=$rowspan><A HREF="$pkgview">$pkgnum</A></TD>!,
+ print $n1, qq!<TD ROWSPAN=$rowspan>$pkgnum</TD>!,
+ qq!<TD ROWSPAN=$rowspan><FONT SIZE=-1>!,
+ #qq!<A HREF="$pkgview">$pkg - $comment</A>!,
+ qq!$pkg - $comment!,
+ qq! ( <A HREF="$pkgview">Edit</A> | <A HREF="$button_url">Customize pricing</A>)</FONT></TD>!,
+ ;
+ for ( qw( setup bill susp expire cancel ) ) {
+ print "<TD ROWSPAN=$rowspan><FONT SIZE=-1>", ( $package->getfield($_)
+ ? time2str("%D", $package->getfield($_) )
+ : ' '
+ ), '</FONT></TD>',
+ ;
+ }
+
+ my $n2 = '';
+ foreach my $cust_svc ( @cust_svc ) {
+ my($label, $value, $svcdb) = $cust_svc->label;
+ my($svcnum) = $cust_svc->svcnum;
+ my($sview) = popurl(2). "/view";
+ print $n2,qq!<TD><A HREF="$sview/$svcdb.cgi?$svcnum"><FONT SIZE=-1>$label</FONT></A></TD>!,
+ qq!<TD><A HREF="$sview/$svcdb.cgi?$svcnum"><FONT SIZE=-1>$value</FONT></A></TD>!;
+ $n2="</TR><TR>";
+ }
+ $n1="</TR><TR>";
+}
+print "</TR>";
#formatting
-print "</TABLE></CENTER>";
+print "</TABLE>";
#formatting
-print qq!<CENTER><HR><A NAME="history"><FONT SIZE=+1>Payment History!,
- qq!</FONT></A><BR>!,
- qq!Click on invoice to view invoice/enter payment.<BR>!,
+print qq!<BR><BR><A NAME="history">Payment History!,
+ qq!</A>!,
+ qq! ( Click on invoice to view invoice/enter payment. | !,
qq!<A HREF="!, popurl(2), qq!edit/cust_credit.cgi?$custnum">!,
- qq!Post Credit / Refund</A></CENTER><BR>!;
+ qq!Post credit / refund</A> )!;
#get payment history
#
# major problem: this whole thing is way too sloppy.
# minor problem: the description lines need better formatting.
+@history = (); #needed for mod_perl :)
+
@bills = qsearch('cust_bill',{'custnum'=>$custnum});
foreach $bill (@bills) {
my($bref)=$bill->hashref;
my(@payments)=qsearch('cust_pay',{'invnum'=> $bref->{invnum} } );
my($payment);
foreach $payment (@payments) {
-# my($pref)=$payment->hashref;
my($date,$invnum,$payby,$payinfo,$paid)=($payment->getfield('_date'),
$payment->getfield('invnum'),
$payment->getfield('payby'),
}
#formatting
- print "<CENTER>", table, <<END;
+ print table(), <<END;
<TR>
<TH>Date</TH>
<TH>Description</TH>
}
#formatting
-print "</TABLE></CENTER>";
+print "</TABLE>";
#end
use FS::UID;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(header menubar idiot eidiot popurl table itable);
+@EXPORT_OK = qw(header menubar idiot eidiot popurl table itable ntable);
=head1 NAME
</TITLE>
</HEAD>
<BODY BGCOLOR="#e8e8e8">
- <FONT COLOR="#FF0000" SIZE=7>
+ <FONT SIZE=7>
$title
</FONT>
<BR><BR>
=item idiot ERROR
+This is depriciated. Don't use it.
+
Sends headers and an HTML error message.
=cut
sub idiot {
+ #warn "idiot depriciated";
my($error)=@_;
my($cgi)=FS::UID::cgi;
if ( $cgi->isa('CGI::Base') ) {
</CENTER>
Your request could not be processed because of the following error:
<P><B>$error</B>
- <P>Hit the <I>Back</I> button in your web browser, correct this mistake, and try again.
</BODY>
</HTML>
END
=item eidiot ERROR
+This is depriciated. Don't use it.
+
Sends headers and an HTML error message, then exits.
=cut
sub eidiot {
+ #warn "eidiot depriciated";
idiot(@_);
exit;
}
sub table {
my $col = shift;
if ( $col ) {
- "<TABLE BGCOLOR=$col BORDER=1 WIDTH=\"100%\">";
+ qq!<TABLE BGCOLOR="$col" BORDER=1 WIDTH="100%">!;
} else {
"<TABLE BORDER=1>";
}
sub itable {
my $col = shift;
+ my $cellspacing = shift || 0;
+ if ( $col ) {
+ qq!<TABLE BGCOLOR="$col" BORDER=0 CELLSPACING=$cellspacing WIDTH="100%">!;
+ } else {
+ qq!<TABLE BORDER=0 $cellspacing=$cellspacing WIDTH="100%">!;
+ }
+}
+
+=item ntable
+
+This is getting silly.
+
+=cut
+
+sub ntable {
+ my $col = shift;
+ my $cellspacing = shift || 0;
if ( $col ) {
- qq!<TABLE BGCOLOR=$col BORDER=0 CELLSPACING=0 WIDTH=\"100%\">!;
+ qq!<TABLE BGCOLOR="$col" BORDER=0 CELLSPACING=$cellspacing>!;
} else {
- "<TABLE>";
+ "<TABLE BORDER>";
}
+
}
=back
pod ivan@sisd.com 98-sep-12
$Log: CGI.pm,v $
-Revision 1.15 1999-01-18 09:41:48 ivan
+Revision 1.16 1999-01-25 12:26:05 ivan
+yet more mod_perl stuff
+
+Revision 1.15 1999/01/18 09:41:48 ivan
all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
(good idea anyway)
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$sth->execute or return $sth->errstr;
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
my $rc = $sth->execute or return $sth->errstr;
#not portable #return "Record not found, statement:\n$statement" if $rc eq "0E0";
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
my $rc = $sth->execute or return $sth->errstr;
#not portable #return "Record not found (or records identical)." if $rc eq "0E0";
sub ut_money {
my($self,$field)=@_;
+ $self->setfield($field, 0) if $self->getfield($field) eq '';
$self->getfield($field) =~ /^(\-)? ?(\d*)(\.\d{2})?$/
or return "Illegal (money) $field!";
- $self->setfield($field,"$1$2$3" || 0);
+ $self->setfield($field, "$1$2$3" || 0);
'';
}
=head1 VERSION
-$Id: Record.pm,v 1.11 1999-01-18 09:22:38 ivan Exp $
+$Id: Record.pm,v 1.12 1999-01-25 12:26:06 ivan Exp $
=head1 BUGS
ut_phonen got ''; at the end ivan@sisd.com 98-sep-27
$Log: Record.pm,v $
-Revision 1.11 1999-01-18 09:22:38 ivan
+Revision 1.12 1999-01-25 12:26:06 ivan
+yet more mod_perl stuff
+
+Revision 1.11 1999/01/18 09:22:38 ivan
changes to track email addresses for email invoicing
Revision 1.10 1998/12/29 11:59:33 ivan
#ask FS::UID to run this stuff for us later
$FS::UID::callback{'FS::cust_bill'} = sub {
$conf = new FS::Conf;
- ( $add1, $add2, $add3, $add4 ) = $conf->config('address');
+ ( $add1, $add2, $add3, $add4 ) = ( $conf->config('address'), '', '', '', '' );
};
=head1 NAME
#printing bits here (yuck!)
- local($SIG{CHLD}) = sub { wait() };
- $|=1;
- my($pid)=open(CHILD,"-|");
- die "Can't fork: $!" unless defined($pid);
+ my @collect = ();
- if ($pid) { #parent
- my(@collect)=<CHILD>;
- close CHILD;
- return @collect;
- } else { #child
-
- my($description,$amount);
- my(@buf);
-
- #define format stuff
- $%=0;
- $= = 35;
- local($^L) = <<END;
-
-
-
-
-
-
-
-END
-
- #format address
- my($l,@address)=(0,'','','','','');
- $address[$l++]=$cust_main->company if $cust_main->company;
- $address[$l++]=$cust_main->address1;
- $address[$l++]=$cust_main->address2 if $cust_main->address2;
- $address[$l++]=$cust_main->city. ", ". $cust_main->state. " ".
- $cust_main->zip;
- $address[$l++]=$cust_main->country unless $cust_main->country eq 'US';
-
- #previous balance
- foreach ( @pr_cust_bill ) {
- push @buf, (
- "Previous Balance, Invoice #". $_->invnum.
- " (". time2str("%x",$_->_date). ")",
- '$'. sprintf("%10.2f",$_->owed)
- );
- }
- if (@pr_cust_bill) {
- push @buf,('','-----------');
- push @buf,('Total Previous Balance','$' . sprintf("%10.2f",$pr_total ) );
- push @buf,('','');
- }
-
- #new charges
- foreach ( $self->cust_bill_pkg ) {
-
- if ( $_->pkgnum ) {
-
- my($cust_pkg)=qsearchs('cust_pkg', { 'pkgnum', $_->pkgnum } );
- my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->pkgpart});
- my($pkg)=$part_pkg->pkg;
-
- push @buf, ( "$pkg Setup",'$' . sprintf("%10.2f",$_->setup) )
- if $_->setup != 0;
- push @buf, (
- "$pkg (" . time2str("%x",$_->sdate) . " - " .
- time2str("%x",$_->edate) . ")",
- '$' . sprintf("%10.2f",$_->recur)
- ) if $_->recur != 0;
-
- } else { #pkgnum Tax
- push @buf,("Tax",'$' . sprintf("%10.2f",$_->setup) )
- if $_->setup != 0;
- }
- }
+ my($description,$amount);
+ my(@buf);
+ #format address
+ my($l,@address)=(0,'','','','','','','');
+ $address[$l++] =
+ $cust_main->payname.
+ ( ( $cust_main->payby eq 'BILL' ) && $cust_main->payinfo
+ ? " (P.O. #". $cust_main->payinfo. ")"
+ : ''
+ )
+ ;
+ $address[$l++]=$cust_main->company if $cust_main->company;
+ $address[$l++]=$cust_main->address1;
+ $address[$l++]=$cust_main->address2 if $cust_main->address2;
+ $address[$l++]=$cust_main->city. ", ". $cust_main->state. " ".
+ $cust_main->zip;
+ $address[$l++]=$cust_main->country unless $cust_main->country eq 'US';
+
+ #previous balance
+ foreach ( @pr_cust_bill ) {
+ push @buf, (
+ "Previous Balance, Invoice #". $_->invnum.
+ " (". time2str("%x",$_->_date). ")",
+ '$'. sprintf("%10.2f",$_->owed)
+ );
+ }
+ if (@pr_cust_bill) {
push @buf,('','-----------');
- push @buf,('Total New Charges',
- '$' . sprintf("%10.2f",$self->charged) );
+ push @buf,('Total Previous Balance','$' . sprintf("%10.2f",$pr_total ) );
push @buf,('','');
+ }
- push @buf,('','-----------');
- push @buf,('Total Charges',
- '$' . sprintf("%10.2f",$self->charged + $pr_total) );
- push @buf,('','');
+ #new charges
+ foreach ( $self->cust_bill_pkg ) {
- #credits
- foreach ( @cr_cust_credit ) {
- push @buf,(
- "Credit #". $_->crednum. " (" . time2str("%x",$_->_date) .")",
- '$' . sprintf("%10.2f",$_->credited)
- );
- }
+ if ( $_->pkgnum ) {
- #get & print payments
- foreach ( $self->cust_pay ) {
- push @buf,(
- "Payment received ". time2str("%x",$_->_date ),
- '$' . sprintf("%10.2f",$_->paid )
- );
- }
-
- #balance due
- push @buf,('','-----------');
- push @buf,('Balance Due','$' .
- sprintf("%10.2f",$self->owed + $pr_total - $cr_total ) );
+ my($cust_pkg)=qsearchs('cust_pkg', { 'pkgnum', $_->pkgnum } );
+ my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->pkgpart});
+ my($pkg)=$part_pkg->pkg;
- #now print
-
- my($tot_pages)=int(scalar(@buf)/30); #15 lines, 2 values per line
- $tot_pages++ if scalar(@buf) % 30;
-
- while (@buf) {
+ push @buf, ( "$pkg Setup",'$' . sprintf("%10.2f",$_->setup) )
+ if $_->setup != 0;
+ push @buf, (
+ "$pkg (" . time2str("%x",$_->sdate) . " - " .
+ time2str("%x",$_->edate) . ")",
+ '$' . sprintf("%10.2f",$_->recur)
+ ) if $_->recur != 0;
+
+ } else { #pkgnum Tax
+ push @buf,("Tax",'$' . sprintf("%10.2f",$_->setup) )
+ if $_->setup != 0;
+ }
+ }
+
+ push @buf,('','-----------');
+ push @buf,('Total New Charges',
+ '$' . sprintf("%10.2f",$self->charged) );
+ push @buf,('','');
+
+ push @buf,('','-----------');
+ push @buf,('Total Charges',
+ '$' . sprintf("%10.2f",$self->charged + $pr_total) );
+ push @buf,('','');
+
+ #credits
+ foreach ( @cr_cust_credit ) {
+ push @buf,(
+ "Credit #". $_->crednum. " (" . time2str("%x",$_->_date) .")",
+ '$' . sprintf("%10.2f",$_->credited)
+ );
+ }
+
+ #get & print payments
+ foreach ( $self->cust_pay ) {
+ push @buf,(
+ "Payment received ". time2str("%x",$_->_date ),
+ '$' . sprintf("%10.2f",$_->paid )
+ );
+ }
+
+ #balance due
+ push @buf,('','-----------');
+ push @buf,('Balance Due','$' .
+ sprintf("%10.2f",$self->owed + $pr_total - $cr_total ) );
+
+ #now print
+
+ my $tot_lines = 50; #should be configurable
+ #header is 17 lines
+ my $tot_pages = int( scalar(@buf) / ( 2 * ( $tot_lines - 17 ) ) );
+ $tot_pages++ if scalar(@buf) % ( 2 * ( $tot_lines - 17 ) );
+
+ my $page = 1;
+ my $lines;
+ while (@buf) {
+ $lines = $tot_lines;
+ my @header = &header(
+ $page, $tot_pages, $self->_date, $self->invnum, @address
+ );
+ push @collect, @header;
+ $lines -= scalar(@header);
+
+ while ( $lines-- && @buf ) {
$description=shift(@buf);
$amount=shift(@buf);
- write;
+ push @collect, myswrite($description, $amount);
}
- ($description,$amount)=('','');
- write while ( $- );
- print $^L;
-
- exit; #kid
-
- format STDOUT_TOP =
-
- @|||||||||||||||||||
- "Invoice"
- @||||||||||||||||||| @<<<<<<< @<<<<<<<<<<<
-{
- ( $tot_pages != 1 ) ? "Page $% of $tot_pages" : '',
- time2str("%x",( $self->_date )), "FS-$invnum"
-}
-
-
-@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-$add1
-@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-$add2
-@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-$add3
-@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-$add4
-
- @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-{ $cust_main->payname,
- ( ( $cust_main->payby eq 'BILL' ) && $cust_main->payinfo )
- ? "P.O. #". $cust_main->payinfo : ''
-}
- @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-$address[0],''
- @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-$address[1],$overdue ? "* This invoice is now PAST DUE! *" : ''
- @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-$address[2],$overdue ? " Please forward payment promptly " : ''
- @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-$address[3],$overdue ? "to avoid interruption of service." : ''
- @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-$address[4],''
-
-
-
-.
-
- format STDOUT =
+ $page++;
+ }
+ while ( $lines-- ) {
+ push @collect, myswrite('', '');
+ }
+
+ return @collect;
+
+ sub header { #17 lines
+ my ( $page, $tot_pages, $date, $invnum, @address ) = @_ ;
+ push @address, '', '', '', '';
+
+ my @return = ();
+ my $i = ' 'x32;
+ push @return,
+ '',
+ $i. 'Invoice',
+ $i. substr("Page $page of $tot_pages".' 'x10, 0, 20).
+ time2str("%x", $date ). " FS-". $invnum,
+ '',
+ '',
+ $add1,
+ $add2,
+ $add3,
+ $add4,
+ '',
+ splice @address, 0, 7;
+ ;
+ return map $_. "\n", @return;
+ }
+
+ sub myswrite {
+ my $format = <<END;
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<
- $description,$amount
-.
-
- } #endchild
+END
+ $^A = '';
+ formline( $format, @_ );
+ return $^A;
+ }
}
=head1 VERSION
-$Id: cust_bill.pm,v 1.5 1999-01-18 21:58:03 ivan Exp $
+$Id: cust_bill.pm,v 1.6 1999-01-25 12:26:07 ivan Exp $
=head1 BUGS
The delete method.
-print_text formatting (and some logic :/) is in source as a format declaration,
-which needs to be slurped in from a file. the fork is rather kludgy as well.
-It could be cleaned with swrite from man perlform, and the picture could be
-put in a /var/spool/freeside/conf file. Also number of lines ($=).
+print_text formatting (and some logic :/) is in source, but needs to be
+slurped in from a file. Also number of lines ($=).
missing print_ps for a nice postscript copy (maybe HylaFAX-cover-page-style
or something similar so the look can be completely customized?)
-There is an off-by-one error in print_text which causes a visual error: "Page 1
-of 2" printed on some single-page invoices?
-
=head1 SEE ALSO
L<FS::Record>, L<FS::cust_main>, L<FS::cust_pay>, L<FS::cust_bill_pkg>,
pod, ingegrate with FS::Invoice ivan@sisd.com 98-sep-20
$Log: cust_bill.pm,v $
-Revision 1.5 1999-01-18 21:58:03 ivan
+Revision 1.6 1999-01-25 12:26:07 ivan
+yet more mod_perl stuff
+
+Revision 1.5 1999/01/18 21:58:03 ivan
esthetic: eq and ne were used in a few places instead of == and !=
Revision 1.4 1998/12/29 11:59:36 ivan
sub insert {
my $self = shift;
- $self->credited($self->amount) if $self->credited eq '';
+ my $error;
+ return $error if $error = $self->ut_money('credited')
+ || $self->ut_money('amount');
+
+ $self->credited($self->amount) if $self->credited == 0
+ || $self->credited eq '';
return "credited != amount!"
unless $self->credited == $self->amount;
=head1 VERSION
-$Id: cust_credit.pm,v 1.3 1999-01-18 21:58:04 ivan Exp $
+$Id: cust_credit.pm,v 1.4 1999-01-25 12:26:08 ivan Exp $
=head1 BUGS
pod, otaker from FS::UID ivan@sisd.com 98-sep-21
$Log: cust_credit.pm,v $
-Revision 1.3 1999-01-18 21:58:04 ivan
+Revision 1.4 1999-01-25 12:26:08 ivan
+yet more mod_perl stuff
+
+Revision 1.3 1999/01/18 21:58:04 ivan
esthetic: eq and ne were used in a few places instead of == and !=
Revision 1.2 1998/12/29 11:59:38 ivan
sub bill {
my( $self, %options ) = @_;
- my $time = $options{'time'} || $^T;
+ my $time = $options{'time'} || time;
my $error;
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
# find the packages which are due for billing, find out how much they are
# & generate invoice database.
sub collect {
my( $self, %options ) = @_;
- my $invoice_time = $options{'invoice_time'} || $^T;
+ my $invoice_time = $options{'invoice_time'} || time;
my $total_owed = $self->balance;
return '' unless $total_owed > 0; #redundant?????
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
foreach my $cust_bill (
qsearch('cust_bill', { 'custnum' => $self->custnum, } )
'custnum' => $self->custnum,
'dest' => $address,
} );
- my $error = $cust_main_invoice->check;
+ my $error = $self->custnum
+ ? $cust_main_invoice->check
+ : $cust_main_invoice->checkdest
+ ;
return $error if $error;
}
'';
=head1 VERSION
-$Id: cust_main.pm,v 1.9 1999-01-18 09:22:41 ivan Exp $
+$Id: cust_main.pm,v 1.10 1999-01-25 12:26:09 ivan Exp $
=head1 BUGS
FS::UID::{datasrc,checkruid} ivan@sisd.com 98-sep-19-21
$Log: cust_main.pm,v $
-Revision 1.9 1999-01-18 09:22:41 ivan
+Revision 1.10 1999-01-25 12:26:09 ivan
+yet more mod_perl stuff
+
+Revision 1.9 1999/01/18 09:22:41 ivan
changes to track email addresses for email invoicing
Revision 1.8 1998/12/29 11:59:39 ivan
my $error = $self->ut_numbern('destnum')
|| $self->ut_number('custnum')
- || $self->ut_text('dest')
+ || $self->checkdest;
;
return $error if $error;
return "Unknown customer"
unless qsearchs('cust_main',{ 'custnum' => $self->custnum });
+ ''; #noerror
+}
+
+=item checkdest
+
+Checks the dest field only.
+
+=cut
+
+sub checkdest {
+ my $self = shift;
+
+ my $error = $self->ut_text('dest');
+ return $error if $error;
+
if ( $self->dest eq 'POST' ) {
#contemplate our navel
} elsif ( $self->dest =~ /^(\d+)$/ ) {
=head1 VERSION
-$Id: cust_main_invoice.pm,v 1.5 1999-01-18 21:58:05 ivan Exp $
+$Id: cust_main_invoice.pm,v 1.6 1999-01-25 12:26:10 ivan Exp $
=head1 BUGS
ivan@sisd.com 97-nov-13
$Log: cust_main_invoice.pm,v $
-Revision 1.5 1999-01-18 21:58:05 ivan
+Revision 1.6 1999-01-25 12:26:10 ivan
+yet more mod_perl stuff
+
+Revision 1.5 1999/01/18 21:58:05 ivan
esthetic: eq and ne were used in a few places instead of == and !=
Revision 1.4 1999/01/18 09:22:42 ivan
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error = $new_cust_bill->replace($old_cust_bill);
return "Error modifying cust_bill: $error" if $error;
=head1 VERSION
-$Id: cust_pay.pm,v 1.2 1998-12-29 11:59:43 ivan Exp $
+$Id: cust_pay.pm,v 1.3 1999-01-25 12:26:11 ivan Exp $
=head1 BUGS
pod ivan@sisd.com 98-sep-21
$Log: cust_pay.pm,v $
-Revision 1.2 1998-12-29 11:59:43 ivan
+Revision 1.3 1999-01-25 12:26:11 ivan
+yet more mod_perl stuff
+
+Revision 1.2 1998/12/29 11:59:43 ivan
mostly properly OO, some work still to be done with svc_ stuff
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
foreach my $cust_svc (
qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum } )
unless ( $self->getfield('cancel') ) {
my %hash = $self->hash;
- $hash{'cancel'} = $^T;
+ $hash{'cancel'} = time;
my $new = new FS::cust_pkg ( \%hash );
$error = $new->replace($self);
return $error if $error;
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
foreach my $cust_svc (
qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum } )
unless ( $self->getfield('susp') ) {
my %hash = $self->hash;
- $hash{'susp'} = $^T;
+ $hash{'susp'} = time;
my $new = new FS::cust_pkg ( \%hash );
$error = $new->replace($self);
return $error if $error;
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
foreach my $cust_svc (
qsearch('cust_svc',{'pkgnum'=> $self->pkgnum } )
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
#first cancel old packages
# my($pkgnum);
foreach $pkgnum ( @{$remove_pkgnums} ) {
my($old) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
- return "Package $pkgnum not found to remove!" unless $old;
+ die "Package $pkgnum not found to remove!" unless $old;
my(%hash) = $old->hash;
- $hash{'cancel'}=$^T;
- my($new) = create FS::cust_pkg ( \%hash );
+ $hash{'cancel'}=time;
+ my($new) = new FS::cust_pkg ( \%hash );
my($error)=$new->replace($old);
- return $error if $error;
+ die "Couldn't update package $pkgnum: $error" if $error;
}
#now add new packages, changing cust_svc records if necessary
# my($pkgpart);
while ($pkgpart=shift @{$pkgparts} ) {
- my($new) = create FS::cust_pkg ( {
+ my($new) = new FS::cust_pkg ( {
'custnum' => $custnum,
'pkgpart' => $pkgpart,
} );
my($error) = $new->insert;
- return $error if $error;
+ die "Couldn't insert new cust_pkg record: $error" if $error;
my($pkgnum)=$new->getfield('pkgnum');
my($cust_svc);
foreach $cust_svc ( @{ shift @cust_svc } ) {
my(%hash) = $cust_svc->hash;
$hash{'pkgnum'}=$pkgnum;
- my($new) = create FS::cust_svc ( \%hash );
+ my($new) = new FS::cust_svc ( \%hash );
my($error)=$new->replace($cust_svc);
- return $error if $error;
+ die "Couldn't link old service to new package: $error" if $error;
}
}
=head1 VERSION
-$Id: cust_pkg.pm,v 1.5 1999-01-18 21:58:07 ivan Exp $
+$Id: cust_pkg.pm,v 1.6 1999-01-25 12:26:12 ivan Exp $
=head1 BUGS
pod ivan@sisd.com 98-sep-21
$Log: cust_pkg.pm,v $
-Revision 1.5 1999-01-18 21:58:07 ivan
+Revision 1.6 1999-01-25 12:26:12 ivan
+yet more mod_perl stuff
+
+Revision 1.5 1999/01/18 21:58:07 ivan
esthetic: eq and ne were used in a few places instead of == and !=
Revision 1.4 1998/12/29 11:59:45 ivan
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error = $new_cust_credit->replace($old_cust_credit);
return "Error modifying cust_credit: $error" if $error;
=head1 VERSION
-$Id: cust_refund.pm,v 1.2 1998-12-29 11:59:46 ivan Exp $
+$Id: cust_refund.pm,v 1.3 1999-01-25 12:26:13 ivan Exp $
=head1 BUGS
pod and finish up ivan@sisd.com 98-sep-21
$Log: cust_refund.pm,v $
-Revision 1.2 1998-12-29 11:59:46 ivan
+Revision 1.3 1999-01-25 12:26:13 ivan
+yet more mod_perl stuff
+
+Revision 1.2 1998/12/29 11:59:46 ivan
mostly properly OO, some work still to be done with svc_ stuff
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error = $self->check;
return $error if $error;
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
my $svcnum = $self->svcnum;
=head1 VERSION
-$Id: svc_Common.pm,v 1.1 1998-12-30 00:30:45 ivan Exp $
+$Id: svc_Common.pm,v 1.2 1999-01-25 12:26:14 ivan Exp $
=head1 BUGS
=head1 HISTORY
$Log: svc_Common.pm,v $
-Revision 1.1 1998-12-30 00:30:45 ivan
+Revision 1.2 1999-01-25 12:26:14 ivan
+yet more mod_perl stuff
+
+Revision 1.1 1998/12/30 00:30:45 ivan
svc_ stuff is more properly OO - has a common superclass FS::svc_Common
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error = $self->check;
return $error if $error;
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error = $self->SUPER::delete;
return $error if $error;
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error = $new->SUPER::replace($old);
return $error if $error;
=head1 VERSION
-$Id: svc_acct.pm,v 1.5 1999-01-18 21:58:09 ivan Exp $
+$Id: svc_acct.pm,v 1.6 1999-01-25 12:26:15 ivan Exp $
=head1 BUGS
pod and FS::conf ivan@sisd.com 98-sep-22
$Log: svc_acct.pm,v $
-Revision 1.5 1999-01-18 21:58:09 ivan
+Revision 1.6 1999-01-25 12:26:15 ivan
+yet more mod_perl stuff
+
+Revision 1.5 1999/01/18 21:58:09 ivan
esthetic: eq and ne were used in a few places instead of == and !=
Revision 1.4 1998/12/30 00:30:45 ivan
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error=$self->check;
return $error if $error;
=head1 VERSION
-$Id: svc_acct_sm.pm,v 1.5 1999-01-18 21:58:10 ivan Exp $
+$Id: svc_acct_sm.pm,v 1.6 1999-01-25 12:26:16 ivan Exp $
=head1 BUGS
local $SIG{QUIT} = 'IGNORE';
local $SIG{TERM} = 'IGNORE';
local $SIG{TSTP} = 'IGNORE';
+ local $SIG{PIPE} = 'IGNORE';
$error = $self->check;
return $error if $error;
=head1 VERSION
-$Id: svc_domain.pm,v 1.5 1998-12-30 00:30:47 ivan Exp $
+$Id: svc_domain.pm,v 1.6 1999-01-25 12:26:17 ivan Exp $
=head1 BUGS
pod, some FS::Conf (not complete) ivan@sisd.com 98-sep-23
$Log: svc_domain.pm,v $
-Revision 1.5 1998-12-30 00:30:47 ivan
+Revision 1.6 1999-01-25 12:26:17 ivan
+yet more mod_perl stuff
+
+Revision 1.5 1998/12/30 00:30:47 ivan
svc_ stuff is more properly OO - has a common superclass FS::svc_Common
Revision 1.3 1998/11/13 09:56:57 ivan