communigate (phase 2): rules. RT#7514
[freeside.git] / httemplate / edit / REAL_cust_pkg.cgi
index 18d4415..77ab1fe 100755 (executable)
 </FORM>
 
 <% include('/elements/footer.html') %>
+<%shared>
 
+my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
+my $format = $date_format. ' %T %z (%Z)';
+
+</%shared>
 <%init>
 
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates');
 
-my $conf = new FS::Conf;
-my $date_format = $conf->config('date_format') || '%m/%d/%Y';
-
-my $format = $date_format. ' %T %z (%Z)';
 
 my $error = '';
 my( $pkgnum, $cust_pkg );
@@ -184,9 +187,9 @@ if ( $cgi->param('error') ) {
   $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
   die "No package!" unless $cust_pkg;
 
-  foreach my $col (qw( setup last_bill bill adjourn expire )) {
+  foreach my $col (qw( start_date setup last_bill bill adjourn expire )) {
     my $value = $cgi->param($col);
-    $cust_pkg->set( $col, $value ? str2time($value) : '' );
+    $cust_pkg->set( $col, $value ? parse_datetime($value) : '' );
   }
 
 } else {