[freeside-commits] freeside/FS/FS cust_main.pm,1.472,1.473

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


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

Modified Files:
	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.472
retrieving revision 1.473
diff -u -d -r1.472 -r1.473
--- cust_main.pm	5 Nov 2009 00:48:28 -0000	1.472
+++ cust_main.pm	6 Nov 2009 00:25:13 -0000	1.473
@@ -8259,6 +8259,10 @@
 
 listref
 
+=item paydate_year
+
+=item paydate_month
+
 =item current_balance
 
 listref (list returned by FS::UI::Web::parse_lt_gt($cgi, 'current_balance'))
@@ -8360,6 +8364,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