[freeside] my credit card bug

ivan ivan at 420.am
Sat Jan 29 22:58:40 PST 2000


The ideal solution is:

/^(\d{4})-(\d{1,2})-\d{1,2}$/

Otherwise you're going to have the same problem in October. :)

(hopefully I'll get 1.3.0 wrapped up long before then)

On Tue, Jan 11, 2000 at 10:26:21PM -0700, Jeff Garner wrote:
> I fixed it by adding the following to the /edit/cust_main.cgi
> 
> under sub expselect
> 
>   if ( $date  =~ /^(\d{4})-(\d{1})-\d{2}$/ ) { #PostgreSQL date format          
>     ( $m, $y ) = ( $2, $1 );
> 
> 
> it appears my credit exp dates were getting setup as  yyyy-m-dd  ex 2002-6-01
> 
> The key was 
> 
>   if ( $date  =~ /^(\d{4})-(\d{2})-\d{2}$/ ) { #PostgreSQL date format          
>     ( $m, $y ) = ( $2, $1 );
> 
> so I added the line with \d{1}  and it worked good
> 

-- 
_ivan



More information about the freeside-users mailing list