From 985d84813a195f343abaf7e33f08057efcb5cb10 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 12 Oct 1998 23:40:28 +0000 Subject: added Pg-specific behaviour in sub line --- site_perl/dbdef_column.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'site_perl') diff --git a/site_perl/dbdef_column.pm b/site_perl/dbdef_column.pm index 023b57d1f..06388c691 100644 --- a/site_perl/dbdef_column.pm +++ b/site_perl/dbdef_column.pm @@ -143,7 +143,13 @@ supported in the future. 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 +165,10 @@ sub line { L, L, L +=head1 VERSION + +$Id: dbdef_column.pm,v 1.2 1998-10-12 23:40:28 ivan Exp $ + =head1 HISTORY class for dealing with column definitions @@ -169,6 +179,11 @@ 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.2 1998-10-12 23:40:28 ivan +added Pg-specific behaviour in sub line + + =cut 1; -- cgit v1.2.1 From 3232d3f822612b1c78db57a9fd1494cc6bc7494c Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 13 Oct 1998 13:04:17 +0000 Subject: fixed doc to indicate Pg specific syntax too --- site_perl/dbdef_column.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'site_perl') diff --git a/site_perl/dbdef_column.pm b/site_perl/dbdef_column.pm index 06388c691..dc07305b8 100644 --- a/site_perl/dbdef_column.pm +++ b/site_perl/dbdef_column.pm @@ -134,9 +134,8 @@ sub length { Returns an SQL column definition. -If passed a DBI $datasrc specifying L, 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 or L, will use +engine-specific syntax. =cut @@ -167,7 +166,7 @@ L, L, L =head1 VERSION -$Id: dbdef_column.pm,v 1.2 1998-10-12 23:40:28 ivan Exp $ +$Id: dbdef_column.pm,v 1.3 1998-10-13 13:04:17 ivan Exp $ =head1 HISTORY @@ -180,7 +179,10 @@ 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.2 1998-10-12 23:40:28 ivan +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 -- cgit v1.2.1 From d914c9c9f2e73f58c3bd9b70738747d2c7e6c05b Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 14 Oct 1998 07:05:06 +0000 Subject: 1.1.4 release, fix postgresql --- site_perl/dbdef_table.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'site_perl') 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, L, L, L, L +=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; -- cgit v1.2.1 From 4ff8b54af3e5e5a1713873cc21d5bb095d16a554 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 14 Oct 1998 08:18:21 +0000 Subject: More informative error messages and better doc for admin contact email stuff --- site_perl/svc_domain.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'site_perl') 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 can be used to manually set the admin contact +email address on this email. Otherwise, the svc_acct records for this package +(see L) 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, L, L, L, L, L, L, L, 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; -- cgit v1.2.1 From f408cf19344c7d128bf98ffd9667810ca9bebc1b Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 7 Nov 1998 05:17:18 +0000 Subject: In sub new, Pg wrapper for money fields from dbdef (FS::Record::fields $table), not keys of supplied hashref. --- site_perl/Record.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'site_perl') 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; -- cgit v1.2.1 From 4c9347994ca4e1aefdb622d9f51ac8687e6a177b Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 7 Nov 1998 10:24:25 +0000 Subject: don't use depriciated FS::Bill and FS::Invoice, other miscellania --- site_perl/CGI.pm | 16 ++++++++++------ site_perl/cust_bill.pm | 5 +++++ site_perl/cust_main.pm | 11 +++++++++-- 3 files changed, 24 insertions(+), 8 deletions(-) (limited to 'site_perl') 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 -

+ +

$menubar -
-
+

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/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; -- cgit v1.2.1