this should be a popup too, but, until then, it shouldn't be missing the standard...
[freeside.git] / httemplate / misc / download-batch.cgi
index 7e6750c..b6af849 100644 (file)
 %
 %  $cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
 %  my( $mon, $y ) = ( $2, $1 );
-%  $mon = "0$mon" if $mon < 10;
+%  if ( $conf->exists('batch-increment_expiration') ) {
+%    my( $curmon, $curyear ) = (localtime(time))[4,5];
+%    $curmon++; $curyear-=100;
+%    $y++ while $y < $curyear || ( $y == $curyear && $mon < $curmon );
+%  }
+%  $mon = "0$mon" if $mon =~ /^\d$/;
+%  $y = "0$y" if $y =~ /^\d$/;
 %  my $exp = "$mon$y";
 %  $batchcount++;
 %  $batchtotal += $cust_pay_batch->amount;
 %
 %  } elsif ($format eq "csv-chase_canada-E-xactBatch"){
 %
-%    
-<% $cust_pay_batch->paybatchnum %>,<% $cust_pay_batch->custnum %>,<% $cust_pay_batch->invnum %>,"<% $cust_pay_batch->payname %>",01,<% $cust_pay_batch->payinfo %>,<% $cust_pay_batch->amount %>,<% $exp %>,,
+%  my $payname=$cust_pay_batch->payname; $payname =~ tr/",/  /; #payinfo too? :P
+<% $cust_pay_batch->paybatchnum %>,<% $cust_pay_batch->custnum %>,<% $cust_pay_batch->invnum %>,"<% $payname %>",00,<% $cust_pay_batch->payinfo %>,<% $cust_pay_batch->amount %>,<% $exp %>,,
 %
 %
 %  } else {