diff options
Diffstat (limited to 'site_perl')
-rw-r--r-- | site_perl/CGI.pm | 16 | ||||
-rw-r--r-- | site_perl/Record.pm | 8 | ||||
-rw-r--r-- | site_perl/cust_bill.pm | 5 | ||||
-rw-r--r-- | site_perl/cust_main.pm | 11 | ||||
-rw-r--r-- | site_perl/dbdef_column.pm | 25 | ||||
-rw-r--r-- | site_perl/dbdef_table.pm | 13 | ||||
-rw-r--r-- | site_perl/svc_domain.pm | 16 |
7 files changed, 78 insertions, 16 deletions
diff --git a/site_perl/CGI.pm b/site_perl/CGI.pm index d2ed52122..b72a09a6b 100644 --- a/site_perl/CGI.pm +++ b/site_perl/CGI.pm @@ -47,14 +47,13 @@ sub header { $title </TITLE> </HEAD> - <BODY> - <CENTER> - <H1> + <BODY BGCOLOR="#ffffff"> + <FONT COLOR="#FF0000" SIZE=7> $title - </H1> + </FONT> + <BR><BR> $menubar - </CENTER> - <HR> + <BR><BR> END } @@ -136,6 +135,11 @@ lose the background, eidiot ivan@sisd.com 98-sep-2 pod ivan@sisd.com 98-sep-12 +$Log: CGI.pm,v $ +Revision 1.2 1998-11-07 10:24:23 ivan +don't use depriciated FS::Bill and FS::Invoice, other miscellania + + =cut 1; diff --git a/site_perl/Record.pm b/site_perl/Record.pm index 9b308508a..87de48cc4 100644 --- a/site_perl/Record.pm +++ b/site_perl/Record.pm @@ -127,7 +127,7 @@ sub new { # } #} - foreach my $column (keys %{$hashref}) { + foreach my $column ( FS::Record::fields $table ) { #trim the '$' from money fields for Pg (beong HERE?) #(what about Pg i18n?) if ( datasrc =~ m/Pg/ @@ -862,6 +862,12 @@ added pod documentation ivan@sisd.com 98-sep-6 ut_phonen got ''; at the end ivan@sisd.com 98-sep-27 +$Log: Record.pm,v $ +Revision 1.2 1998-11-07 05:17:18 ivan +In sub new, Pg wrapper for money fields from dbdef (FS::Record::fields $table), +not keys of supplied hashref. + + =cut 1; diff --git a/site_perl/cust_bill.pm b/site_perl/cust_bill.pm index 00234519a..bc9424233 100644 --- a/site_perl/cust_bill.pm +++ b/site_perl/cust_bill.pm @@ -489,6 +489,11 @@ charges can be negative ivan@sisd.com 98-jul-13 pod, ingegrate with FS::Invoice ivan@sisd.com 98-sep-20 +$Log: cust_bill.pm,v $ +Revision 1.2 1998-11-07 10:24:24 ivan +don't use depriciated FS::Bill and FS::Invoice, other miscellania + + =cut 1; diff --git a/site_perl/cust_main.pm b/site_perl/cust_main.pm index ec282731e..0ef69cba4 100644 --- a/site_perl/cust_main.pm +++ b/site_perl/cust_main.pm @@ -600,6 +600,8 @@ sub collect { 'custnum' => $self->getfield('custnum'), } ) ) { + bless($cust_bill,"FS::cust_bill"); + #this has to be before next's my($amount) = sprintf("%.2f", $total_owed < $cust_bill->owed ? $total_owed @@ -624,7 +626,7 @@ sub collect { && ( $cust_bill->printed * 2592000 ) <= $since ) { - open(LPR,$lpr) or die "Can't open $lpr: $!"; + open(LPR,"|$lpr") or die "Can't open $lpr: $!"; print LPR $cust_bill->print_text; #( date ) close LPR or die $! ? "Error closing $lpr: $!" @@ -807,7 +809,7 @@ Returns the balance for this customer (total owed minus total credited). sub balance { my($self) = @_; - sprintf("%.2f",$self->total_bill - $self->total_credit); + sprintf("%.2f",$self->total_owed - $self->total_credited); } =back @@ -861,6 +863,11 @@ methods, cleaned collect method, source modifications no longer necessary to enable cybercash, cybercash v3 support, don't need to import FS::UID::{datasrc,checkruid} ivan@sisd.com 98-sep-19-21 +$Log: cust_main.pm,v $ +Revision 1.2 1998-11-07 10:24:25 ivan +don't use depriciated FS::Bill and FS::Invoice, other miscellania + + =cut 1; diff --git a/site_perl/dbdef_column.pm b/site_perl/dbdef_column.pm index 023b57d1f..dc07305b8 100644 --- a/site_perl/dbdef_column.pm +++ b/site_perl/dbdef_column.pm @@ -134,16 +134,21 @@ sub length { Returns an SQL column definition. -If passed a DBI $datasrc specifying L<DBD::mysql>, will use MySQL-specific -syntax. Non-standard syntax for other engines (if applicable) may also be -supported in the future. +If passed a DBI $datasrc specifying L<DBD::mysql> or L<DBD::Pg>, will use +engine-specific syntax. =cut sub line { my($self,$datasrc)=@_; my($null)=$self->null; - $null ||= "NOT NULL" if $datasrc =~ /mysql/; #yucky mysql hack + if ( $datasrc =~ /mysql/ ) { #yucky mysql hack + $null ||= "NOT NULL" + } + if ( $datasrc =~ /Pg/ ) { #yucky Pg hack + $null ||= "NOT NULL"; + $null =~ s/^NULL$//; + } join(' ', $self->name, $self->type. ( $self->length ? '('.$self->length.')' : '' ), @@ -159,6 +164,10 @@ sub line { L<FS::dbdef_table>, L<FS::dbdef>, L<DBI> +=head1 VERSION + +$Id: dbdef_column.pm,v 1.3 1998-10-13 13:04:17 ivan Exp $ + =head1 HISTORY class for dealing with column definitions @@ -169,6 +178,14 @@ now methods can be used to get or set data ivan@sisd.com 98-may-11 mySQL-specific hack for null (what should be default?) ivan@sisd.com 98-jun-2 +$Log: dbdef_column.pm,v $ +Revision 1.3 1998-10-13 13:04:17 ivan +fixed doc to indicate Pg specific syntax too + +Revision 1.2 1998/10/12 23:40:28 ivan +added Pg-specific behaviour in sub line + + =cut 1; diff --git a/site_perl/dbdef_table.pm b/site_perl/dbdef_table.pm index bc1454d9e..8c5bcfe77 100644 --- a/site_perl/dbdef_table.pm +++ b/site_perl/dbdef_table.pm @@ -202,12 +202,12 @@ sub sql_create_table { "CREATE TABLE ". $self->name. " ( ". join(", ", @columns). " )", ( map { - my($index) = $_ . "_index"; + my($index) = $self->name. "__". $_ . "_index"; $index =~ s/,\s*/_/g; "CREATE UNIQUE INDEX $index ON ". $self->name. " ($_)" } $self->unique->sql_list ), ( map { - my($index) = $_ . "_index"; + my($index) = $self->name. "__". $_ . "_index"; $index =~ s/,\s*/_/g; "CREATE INDEX $index ON ". $self->name. " ($_)" } $self->index->sql_list ), @@ -225,6 +225,10 @@ sub sql_create_table { L<FS::dbdef>, L<FS::dbdef_unique>, L<FS::dbdef_index>, L<FS::dbdef_unique>, L<DBI> +=head1 VERSION + +$Id: dbdef_table.pm,v 1.2 1998-10-14 07:05:06 ivan Exp $ + =head1 HISTORY class for dealing with table definitions @@ -243,6 +247,11 @@ ivan@sisd.com 98-jun-4 pod ivan@sisd.com 98-sep-24 +$Log: dbdef_table.pm,v $ +Revision 1.2 1998-10-14 07:05:06 ivan +1.1.4 release, fix postgresql + + =cut 1; diff --git a/site_perl/svc_domain.pm b/site_perl/svc_domain.pm index 1ddd5b290..c12819ec3 100644 --- a/site_perl/svc_domain.pm +++ b/site_perl/svc_domain.pm @@ -144,6 +144,11 @@ for transfers. A registration or transfer email will be submitted unless $FS::svc_domain::whois_hack is true. +The additional field I<email> can be used to manually set the admin contact +email address on this email. Otherwise, the svc_acct records for this package +(see L<FS::cust_pkg>) are searched. If there is exactly one svc_acct record +in the same package, it is automatically used. Otherwise an error is returned. + =cut sub insert { @@ -337,7 +342,7 @@ sub check { } if ( scalar(@svc_acct) == 0 ) { - return "Must order an account first"; + return "Must order an account in package ". $pkgnum. " first"; } elsif ( scalar(@svc_acct) > 1 ) { return "More than one account in package ". $pkgnum. ": specify admin contact email"; } else { @@ -516,6 +521,10 @@ L<FS::Record>, L<FS::Conf>, L<FS::cust_svc>, L<FS::part_svc>, L<FS::cust_pkg>, L<FS::SSH>, L<ssh>, L<dot-qmail>, schema.html from the base documentation, config.html from the base documentation. +=head1 VERSION + +$Id: svc_domain.pm,v 1.2 1998-10-14 08:18:21 ivan Exp $ + =head1 HISTORY ivan@voicenet.com 97-jul-21 @@ -532,6 +541,11 @@ ivan@sisd.com 98-jul-17-19 pod, some FS::Conf (not complete) ivan@sisd.com 98-sep-23 +$Log: svc_domain.pm,v $ +Revision 1.2 1998-10-14 08:18:21 ivan +More informative error messages and better doc for admin contact email stuff + + =cut 1; |