[freeside-commits] freeside/FS/FS cust_bill.pm,1.175,1.176

Ivan,,, ivan at wavetail.420.am
Tue Sep 18 17:12:07 PDT 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv29360/FS/FS

Modified Files:
	cust_bill.pm 
Log Message:
fix at least one small problem with reprint/email/fax functionality: now should understand the "most recent invoice per customer" and invoice # min/max options

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- cust_bill.pm	1 Aug 2007 22:24:36 -0000	1.175
+++ cust_bill.pm	19 Sep 2007 00:12:05 -0000	1.176
@@ -2693,6 +2693,12 @@
   if ( $param{'end'} =~ /^(\d+)$/ ) {
     push @where, "cust_bill._date < $1";
   }
+  if ( $param{'invnum_min'} =~ /^(\d+)$/ ) {
+    push @where, "cust_bill.invnum >= $1";
+  }
+  if ( $param{'invnum_max'} =~ /^(\d+)$/ ) {
+    push @where, "cust_bill.invnum <= $1";
+  }
   if ( $param{'agentnum'} =~ /^(\d+)$/ ) {
     push @where, "cust_main.agentnum = $1";
   }
@@ -2716,7 +2722,6 @@
   if ( $param{'newest_percust'} ) {
     $distinct = 'DISTINCT ON ( cust_bill.custnum )';
     $orderby = 'ORDER BY cust_bill.custnum ASC, cust_bill._date DESC';
-    #$count_query = "SELECT COUNT(DISTINCT cust_bill.custnum), 'N/A', 'N/A'";
   }
      
   my @cust_bill = qsearch( 'cust_bill',



More information about the freeside-commits mailing list