[freeside-commits] branch master updated. cc577407362f8b64817afbe89d23888a0a5b63f9

Jonathan Prykop jonathan at 420.am
Tue Jun 30 03:30:24 PDT 2015


The branch, master has been updated
       via  cc577407362f8b64817afbe89d23888a0a5b63f9 (commit)
      from  d13dae1c37c36c27f1ac9fd134c5d8b3a4fb9754 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cc577407362f8b64817afbe89d23888a0a5b63f9
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Jun 30 05:29:49 2015 -0500

    RT#30705: Change contract end date when changing packages [got rid of chronology requirements]

diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 5bd307b..8e88728 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -1986,9 +1986,6 @@ sub _check_change {
       #option shouldn't be passed, throw error if it's non-empty
       return "Cannot add contract end date when changing packages " . $self->pkgnum;
     }
-    if ($opt->{'start_date'} && ($opt->{'contract_end'} < $opt->{'start_date'})) {
-      return "Contract end date is before change date";
-    }
   }
   return '';
 }
diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html
index c066ff5..046a979 100644
--- a/httemplate/edit/process/change-cust_pkg.html
+++ b/httemplate/edit/process/change-cust_pkg.html
@@ -41,15 +41,9 @@ if ( $cgi->param('locationnum') == -1 ) {
 }
 
 my $error;
-my $contract_end;
 my $now = time;
 if (defined($cgi->param('contract_end'))) {
-  $contract_end = parse_datetime($cgi->param('contract_end'));
-  if ($contract_end < $now) {
-    $error = "Contract end ".$cgi->param('contract_end')." is in the past.";
-  } else {
-    $change{'contract_end'} = $contract_end;
-  }
+  $change{'contract_end'} = parse_datetime($cgi->param('contract_end'));
 }
 
 unless ($error) {

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_pkg.pm                            |    3 ---
 httemplate/edit/process/change-cust_pkg.html |    8 +-------
 2 files changed, 1 insertion(+), 10 deletions(-)




More information about the freeside-commits mailing list