[freeside-commits] freeside/httemplate/search cust_bill_pkg.cgi, 1.2, 1.3

Ivan,,, ivan at wavetail.420.am
Sat Dec 24 19:07:34 PST 2005


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv17082

Modified Files:
	cust_bill_pkg.cgi 
Log Message:
correct "out of taxable region" flag on new line item report - NULLs need to be compared explicitly.  apparantly NULL != NULL.  bah SQL

Index: cust_bill_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_bill_pkg.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cust_bill_pkg.cgi	25 Dec 2005 02:31:09 -0000	1.2
+++ cust_bill_pkg.cgi	25 Dec 2005 03:07:32 -0000	1.3
@@ -20,18 +20,21 @@
 if ( $cgi->param('out') ) {
 
   $where .= "
-    AND 0 = ( SELECT COUNT(*) FROM cust_main_county
-               WHERE (    cust_main_county.county  = cust_main.county
-                       OR cust_main_county.county IS NULL AND cust_main.county  =  ''
-                       OR cust_main_county.county  =  ''  AND cust_main.county IS NULL
-                     )
-                 AND (    cust_main_county.state   = cust_main.state
-                       OR cust_main_county.state  IS NULL AND cust_main.state  =  ''
-                       OR cust_main_county.state   =  ''  AND cust_main.state IS NULL
-                     )
-                 AND cust_main_county.country = cust_main.country
-                 AND cust_main_county.tax > 0
+    AND 0 = (
+      SELECT COUNT(*) FROM cust_main_county
+      WHERE (    cust_main_county.county  = cust_main.county
+              OR ( cust_main_county.county IS NULL AND cust_main.county  =  '' )
+              OR ( cust_main_county.county  =  ''  AND cust_main.county IS NULL)
+              OR ( cust_main_county.county IS NULL AND cust_main.county IS NULL)
+            )
+        AND (    cust_main_county.state   = cust_main.state
+              OR ( cust_main_county.state  IS NULL AND cust_main.state  =  ''  )
+              OR ( cust_main_county.state   =  ''  AND cust_main.state IS NULL )
+              OR ( cust_main_county.state  IS NULL AND cust_main.state IS NULL )
             )
+        AND cust_main_county.country = cust_main.country
+        AND cust_main_county.tax > 0
+    )
   ";
 
 } elsif ( $cgi->param('country' ) ) {



More information about the freeside-commits mailing list