[freeside-commits] freeside/httemplate/edit/process quick-cust_pkg.cgi, 1.15, 1.15.2.1 cust_pay.cgi, 1.15, 1.15.2.1 REAL_cust_pkg.cgi, 1.12.2.2, 1.12.2.3 cust_main.cgi, 1.42, 1.42.2.1 quick-charge.cgi, 1.19, 1.19.2.1
Ivan,,,
ivan at wavetail.420.am
Fri Apr 9 01:18:39 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv7411/httemplate/edit/process
Modified Files:
Tag: FREESIDE_1_9_BRANCH
quick-cust_pkg.cgi cust_pay.cgi REAL_cust_pkg.cgi
cust_main.cgi quick-charge.cgi
Log Message:
fix date parsing when using international dates (package date edit), RT#8027
Index: quick-cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/quick-cust_pkg.cgi,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -w -d -r1.15 -r1.15.2.1
--- quick-cust_pkg.cgi 7 Aug 2009 00:39:14 -0000 1.15
+++ quick-cust_pkg.cgi 9 Apr 2010 08:18:37 -0000 1.15.2.1
@@ -50,7 +50,7 @@
'custnum' => $custnum,
'pkgpart' => $pkgpart,
'start_date' => ( scalar($cgi->param('start_date'))
- ? str2time($cgi->param('start_date'))
+ ? parse_datetime($cgi->param('start_date'))
: ''
),
'refnum' => $refnum,
Index: REAL_cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/REAL_cust_pkg.cgi,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -w -d -r1.12.2.2 -r1.12.2.3
--- REAL_cust_pkg.cgi 10 Mar 2010 06:47:52 -0000 1.12.2.2
+++ REAL_cust_pkg.cgi 9 Apr 2010 08:18:37 -0000 1.12.2.3
@@ -19,13 +19,8 @@
my $pkgnum = $cgi->param('pkgnum') or die;
my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
my %hash = $old->hash;
-$hash{'start_date'} = $cgi->param('start_date') ? str2time($cgi->param('start_date')) : '';
-$hash{'setup'} = $cgi->param('setup') ? str2time($cgi->param('setup')) : '';
-$hash{'bill'} = $cgi->param('bill') ? str2time($cgi->param('bill')) : '';
-$hash{'last_bill'} =
- $cgi->param('last_bill') ? str2time($cgi->param('last_bill')) : '';
-$hash{'adjourn'} = $cgi->param('adjourn') ? str2time($cgi->param('adjourn')) : '';
-$hash{'expire'} = $cgi->param('expire') ? str2time($cgi->param('expire')) : '';
+$hash{$_}= $cgi->param($_) ? parse_datetime($cgi->param($_)) : ''
+ foreach qw( start_date setup bill last_bill adjourn expire );
my @errors = ();
@@ -47,7 +42,6 @@
if ( @errors ) {
$error = join(',', @errors);
} else {
- warn join(',',%hash);
$new = new FS::cust_pkg \%hash;
$error = $new->replace($old);
}
Index: quick-charge.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/quick-charge.cgi,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -w -d -r1.19 -r1.19.2.1
--- quick-charge.cgi 10 Oct 2009 00:00:32 -0000 1.19
+++ quick-charge.cgi 9 Apr 2010 08:18:37 -0000 1.19.2.1
@@ -58,7 +58,7 @@
'bill_now' => scalar($cgi->param('bill_now')),
'invoice_terms' => scalar($cgi->param('invoice_terms')),
'start_date' => ( scalar($cgi->param('start_date'))
- ? str2time($cgi->param('start_date'))
+ ? parse_datetime($cgi->param('start_date'))
: ''
),
'pkg' => scalar($cgi->param('pkg')),
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_main.cgi,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -w -d -r1.42 -r1.42.2.1
--- cust_main.cgi 7 Aug 2009 23:08:03 -0000 1.42
+++ cust_main.cgi 9 Apr 2010 08:18:37 -0000 1.42.2.1
@@ -98,7 +98,7 @@
} else {
- $parsed = str2time($value)
+ $parsed = parse_datetime($value)
or $error ||= "Invalid $dfield: $value";
}
Index: cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_pay.cgi,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -w -d -r1.15 -r1.15.2.1
--- cust_pay.cgi 21 Sep 2009 02:41:43 -0000 1.15
+++ cust_pay.cgi 9 Apr 2010 08:18:37 -0000 1.15.2.1
@@ -39,7 +39,7 @@
my $field = my $link = $1;
$field = 'custnum' if $field eq 'popup';
-my $_date = str2time($cgi->param('_date'));
+my $_date = parse_datetime($cgi->param('_date'));
my $new = new FS::cust_pay ( {
$field => $linknum,
More information about the freeside-commits
mailing list