summaryrefslogtreecommitdiff
path: root/site_perl
diff options
context:
space:
mode:
authorivan <ivan>1998-11-18 09:01:44 +0000
committerivan <ivan>1998-11-18 09:01:44 +0000
commitef834d58bfd2ce38c8bea73262c8091a5d88388f (patch)
treea6eb07abbaa8bb18a92643df707ae9b98a679682 /site_perl
parent69eff6e55baea5f6d99f8f797fa2eac6f761838b (diff)
i18n! i18n!
Diffstat (limited to 'site_perl')
-rw-r--r--site_perl/cust_main.pm32
-rw-r--r--site_perl/cust_main_county.pm15
-rw-r--r--site_perl/cust_pay_batch.pm15
3 files changed, 38 insertions, 24 deletions
diff --git a/site_perl/cust_main.pm b/site_perl/cust_main.pm
index 51c9519c5..57e76ba42 100644
--- a/site_perl/cust_main.pm
+++ b/site_perl/cust_main.pm
@@ -283,21 +283,24 @@ sub check {
$self->ss("$1-$2-$3");
}
- return "Unknown state/county/country, state ".
- "\"". $self->state. "\" county \"". $self->county. "\""
- unless qsearchs('cust_main_county',{
- 'state' => $self->state,
- 'county' => $self->county,
- } );
+ $self->country =~ /^(\w\w)$/ or return "Illegal country";
+ $self->country($1);
+ unless ( qsearchs('cust_main_county', {
+ 'country' => $self->country,
+ 'state' => '',
+ } ) ) {
+ return "Unknown state/county/country"
+ #" state ". $self->state. " county ". $self->county. " country ". $self->country
+ unless qsearchs('cust_main_county',{
+ 'state' => $self->state,
+ 'county' => $self->county,
+ 'country' => $self->country,
+ } );
+ }
- #int'l zips?
- $self->zip =~ /^(\d{5}(-\d{4})?)$/ or return "Illegal zip";
+ $self->zip =~ /^([\w\-]{10})$/ or return "Illegal zip";
$self->zip($1);
- #int'l countries!
- $self->country =~ /^(US)$/ or return "Illegal country";
- $self->country($1);
-
$self->payby =~ /^(CARD|BILL|COMP)$/ or return "Illegal payby";
$self->payby($1);
@@ -873,7 +876,10 @@ 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.5 1998-11-15 11:23:14 ivan
+Revision 1.6 1998-11-18 09:01:42 ivan
+i18n! i18n!
+
+Revision 1.5 1998/11/15 11:23:14 ivan
use FS::table_name for all searches to eliminate warnings,
emit state/county when they don't match
diff --git a/site_perl/cust_main_county.pm b/site_perl/cust_main_county.pm
index f4b4595ae..9c81406ae 100644
--- a/site_perl/cust_main_county.pm
+++ b/site_perl/cust_main_county.pm
@@ -41,6 +41,8 @@ currently supported:
=item county
+=item country
+
=item tax - percentage
=back
@@ -126,7 +128,7 @@ sub check {
my($recref) = $self->hashref;
$self->ut_numbern('taxnum')
- or $self->ut_text('state')
+ or $self->ut_textn('state')
or $self->ut_textn('county')
or $self->ut_float('tax')
;
@@ -135,12 +137,14 @@ sub check {
=back
+=head1 VERSION
+
+$Id: cust_main_county.pm,v 1.2 1998-11-18 09:01:43 ivan Exp $
+
=head1 BUGS
It doesn't properly override FS::Record yet.
-A country field (and possibly a currency field) should be added.
-
=head1 SEE ALSO
L<FS::Record>, L<FS::cust_main>, L<FS::cust_bill>, schema.html from the base
@@ -155,6 +159,11 @@ Changed check for 'tax' to use the new ut_float subroutine
pod ivan@sisd.com 98-sep-21
+$Log: cust_main_county.pm,v $
+Revision 1.2 1998-11-18 09:01:43 ivan
+i18n! i18n!
+
+
=cut
1;
diff --git a/site_perl/cust_pay_batch.pm b/site_perl/cust_pay_batch.pm
index 186b4c154..f40a04970 100644
--- a/site_perl/cust_pay_batch.pm
+++ b/site_perl/cust_pay_batch.pm
@@ -216,12 +216,10 @@ sub check {
$self->payname($1);
}
- #int'l zips?
- $self->zip =~ /^(\d{5}(-\d{4})?)$/ or return "Illegal zip";
+ $self->zip =~ /^([\w\-]{10})$/ or return "Illegal zip";
$self->zip($1);
- #int'l countries!
- $self->country =~ /^(US)$/ or return "Illegal country";
+ $self->country =~ /^(\w\w)$/ or return "Illegal \w\wy";
$self->country($1);
#check invnum, custnum, ?
@@ -233,12 +231,10 @@ sub check {
=head1 VERSION
-$Id: cust_pay_batch.pm,v 1.1 1998-11-15 05:19:58 ivan Exp $
+$Id: cust_pay_batch.pm,v 1.2 1998-11-18 09:01:44 ivan Exp $
=head1 BUGS
-The author forgot to customize this manpage.
-
=head1 SEE ALSO
L<FS::cust_main>, L<FS::Record>
@@ -251,7 +247,10 @@ added hfields
ivan@sisd.com 97-nov-13
$Log: cust_pay_batch.pm,v $
-Revision 1.1 1998-11-15 05:19:58 ivan
+Revision 1.2 1998-11-18 09:01:44 ivan
+i18n! i18n!
+
+Revision 1.1 1998/11/15 05:19:58 ivan
long overdue
Revision 1.3 1998/11/15 04:33:00 ivan