-my $error;
-if ($method eq 'expire' || $method eq 'adjourn'){
- my %hash = $cust_pkg->hash;
- $hash{$method} = $date;
- my $new = new FS::cust_pkg \%hash;
- $error = $new->replace($cust_pkg, 'reason' => $reasonnum);
-} else {
- $error = $cust_pkg->$method( 'reason' => $reasonnum );
-}
+#for uncancel
+my $last_bill =
+ $cgi->param('last_bill') ? parse_datetime($cgi->param('last_bill')) : '';
+my $bill =
+ $cgi->param('bill') ? parse_datetime($cgi->param('bill')) : '';
+
+my $svc_fatal = ( $cgi->param('svc_not_fatal') ne 'Y' );
+
+my $error = $cust_pkg->$method( 'reason' => $reasonnum,
+ 'date' => $date,
+ 'resume_date' => $resume_date,
+ 'last_bill' => $last_bill,
+ 'bill' => $bill,
+ 'svc_fatal' => $svc_fatal,
+ );