[freeside-commits] freeside/FS/FS cust_main.pm, 1.464.2.2, 1.464.2.3

Ivan,,, ivan at wavetail.420.am
Thu Nov 5 16:25:23 PST 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv23926/FS/FS

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	cust_main.pm 
Log Message:
add "payment expiration before" to customer report, RT#6447

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.464.2.2
retrieving revision 1.464.2.3
diff -u -d -r1.464.2.2 -r1.464.2.3
--- cust_main.pm	27 Oct 2009 18:11:44 -0000	1.464.2.2
+++ cust_main.pm	6 Nov 2009 00:25:21 -0000	1.464.2.3
@@ -8148,6 +8148,10 @@
 
 listref
 
+=item paydate_year
+
+=item paydate_month
+
 =item current_balance
 
 listref (list returned by FS::UI::Web::parse_lt_gt($cgi, 'current_balance'))
@@ -8234,6 +8238,23 @@
     push @where, '( '. join(' OR ', map "cust_main.payby = '$_'", @payby). ' )';
   }
 
+  ###
+  # paydate_year / paydate_month
+  ###
+
+  if ( $params->{'paydate_year'} =~ /^(\d{4})$/ ) {
+    my $year = $1;
+    $params->{'paydate_month'} =~ /^(\d\d?)$/
+      or die "paydate_year without paydate_month?";
+    my $month = $1;
+
+    push @where,
+      'paydate IS NOT NULL',
+      "paydate != ''",
+      "CAST(paydate AS timestamp) < CAST('$year-$month-01' AS timestamp )"
+;
+  }
+
   ##
   # amounts
   ##



More information about the freeside-commits mailing list