[freeside-commits] freeside/FS/FS cust_bill.pm, 1.163.2.8, 1.163.2.9

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


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

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	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.163.2.8
retrieving revision 1.163.2.9
diff -u -d -r1.163.2.8 -r1.163.2.9
--- cust_bill.pm	13 Jul 2007 23:52:31 -0000	1.163.2.8
+++ cust_bill.pm	19 Sep 2007 00:12:08 -0000	1.163.2.9
@@ -2600,6 +2600,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";
   }
@@ -2623,7 +2629,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