summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Record.pm2
-rw-r--r--FS/FS/part_pkg.pm7
-rw-r--r--FS/FS/part_svc.pm14
-rwxr-xr-xFS/bin/freeside-overdue10
4 files changed, 22 insertions, 11 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 38f4390db..6c0f5f819 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -211,7 +211,7 @@ sub qsearch {
$statement .= ' WHERE '. join(' AND ', map {
if ( ! defined( $record->{$_} ) || $record->{$_} eq '' ) {
if ( driver_name =~ /^Pg$/i ) {
- "$_ IS NULL";
+ qq-( $_ IS NULL OR $_ = '' )-;
} else {
qq-( $_ IS NULL OR $_ = "" )-;
}
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index ceb2a0128..be2ad935f 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -60,6 +60,8 @@ inherits from FS::Record. The following fields are currently supported:
=item plandata - Price plan data
+=item disabled - Disabled flag, empty or `Y'
+
=back
setup and recur are evaluated as Safe perl expressions. You can use numbers
@@ -147,6 +149,9 @@ sub check {
$self->recurtax =~ /^(Y?)$/ or return "Illegal recrutax: ". $self->recurtax;
$self->recurtax($1);
+ $self->disabled =~ /^(Y?)$/ or return "Illegal disabled: ". $self->disabled;
+ $self->disabled($1);
+
'';
}
@@ -185,7 +190,7 @@ sub svcpart {
=head1 VERSION
-$Id: part_pkg.pm,v 1.4 2001-10-20 12:17:59 ivan Exp $
+$Id: part_pkg.pm,v 1.5 2001-12-27 09:26:13 ivan Exp $
=head1 BUGS
diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm
index 2b3f3f309..18760c39a 100644
--- a/FS/FS/part_svc.pm
+++ b/FS/FS/part_svc.pm
@@ -40,6 +40,8 @@ FS::Record. The following fields are currently supported:
=item svcdb - table used for this service. See L<FS::svc_acct>,
L<FS::svc_domain>, and L<FS::svc_forward>, among others.
+=item disabled - Disabled flag, empty or `Y'
+
=back
=head1 METHODS
@@ -235,6 +237,7 @@ sub check {
my @fields = eval { fields( $recref->{svcdb} ) }; #might die
return "Unknown svcdb!" unless @fields;
+##REPLACED BY part_svc_column
# my $svcdb;
# foreach $svcdb ( qw(
# svc_acct svc_acct_sm svc_domain
@@ -259,6 +262,9 @@ sub check {
# }
# }
+ $self->disabled =~ /^(Y?)$/ or return "Illegal disabled: ". $self->disabled;
+ $self->disabled($1);
+
''; #no error
}
@@ -295,7 +301,7 @@ sub all_part_svc_column {
=head1 VERSION
-$Id: part_svc.pm,v 1.6 2001-09-12 15:45:01 ivan Exp $
+$Id: part_svc.pm,v 1.7 2001-12-27 09:26:13 ivan Exp $
=head1 BUGS
@@ -306,9 +312,9 @@ should be fixed.
=head1 SEE ALSO
-L<FS::Record>, L<FS::part_pkg>, L<FS::pkg_svc>, L<FS::cust_svc>,
-L<FS::svc_acct>, L<FS::svc_forward>, L<FS::svc_domain>, schema.html from the
-base documentation.
+L<FS::Record>, L<FS::part_svc_column, L<FS::part_pkg>, L<FS::pkg_svc>,
+L<FS::cust_svc>, L<FS::svc_acct>, L<FS::svc_forward>, L<FS::svc_domain>,
+schema.html from the base documentation.
=cut
diff --git a/FS/bin/freeside-overdue b/FS/bin/freeside-overdue
index 65941ce95..0c62b99c1 100755
--- a/FS/bin/freeside-overdue
+++ b/FS/bin/freeside-overdue
@@ -48,10 +48,10 @@ foreach $cust_main ( qsearch('cust_main',{} ) ) {
$cust_main->balance_date(time-$opt{d} * 86400);
}
- if ( $opt{l} ) {
- print "\n\tCharging late fee of \$$opt{l}" unless $opt{q};
-
- }
+# if ( $opt{l} ) {
+# print "\n\tCharging late fee of \$$opt{l}" unless $opt{q};
+#
+# }
foreach $cust_pkg ( qsearch( 'cust_pkg',
{ 'custnum' => $cust_main->custnum } ) ) {
@@ -83,7 +83,7 @@ foreach $cust_main ( qsearch('cust_main',{} ) ) {
sub untaint_argv {
foreach $_ ( $[ .. $#ARGV ) {
- $ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
+ $ARGV[$_] =~ /^([\w\-\/\.]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
$ARGV[$_]=$1;
}
}