[freeside-commits] freeside/FS/FS cust_main.pm,1.211,1.212
Ivan,,,
ivan at wavetail.420.am
Wed Apr 12 05:36:41 PDT 2006
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv2564/FS/FS
Modified Files:
cust_main.pm
Log Message:
zip code report
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- cust_main.pm 2 Apr 2006 22:13:34 -0000 1.211
+++ cust_main.pm 12 Apr 2006 12:36:39 -0000 1.212
@@ -3711,6 +3711,27 @@
)
"; }
+=item uncancel_sql
+=item uncancelled_sql
+
+Returns an SQL expression identifying un-cancelled cust_main records.
+
+=cut
+
+sub uncancelled_sql { uncancel_sql(@_); }
+sub uncancel_sql { "
+ ( 0 < ( SELECT COUNT(*) FROM cust_pkg
+ WHERE cust_pkg.custnum = cust_main.custnum
+ AND ( cust_pkg.cancel IS NULL
+ OR cust_pkg.cancel = 0
+ )
+ )
+ OR 0 = ( SELECT COUNT(*) FROM cust_pkg
+ WHERE cust_pkg.custnum = cust_main.custnum
+ )
+ )
+"; }
+
=item fuzzy_search FUZZY_HASHREF [ HASHREF, SELECT, EXTRA_SQL, CACHE_OBJ ]
Performs a fuzzy (approximate) search and returns the matching FS::cust_main
@@ -3860,6 +3881,7 @@
use Fcntl qw(:flock);
my $dir = $FS::UID::conf_dir. "cache.". $FS::UID::datasrc;
+ mkdir $dir, 0700 unless -d $dir;
#last
More information about the freeside-commits
mailing list