per-package option to adjust bill date on unsuspend, RT#8434
[freeside.git] / FS / FS / part_pkg / flat.pm
index a04f44a..d539e8d 100644 (file)
@@ -123,6 +123,11 @@ tie my %temporalities, 'Tie::IxHash',
                                     'with the customer\'s other packages',
                           'type' => 'checkbox',
                         },
+    'unsuspend_adjust_bill' => 
+                        { 'name' => 'Adjust next bill date forward when '.
+                                    'unsuspending',
+                          'type' => 'checkbox',
+                        },
 
     %usage_fields,
     %usage_recharge_fields,
@@ -134,6 +139,7 @@ tie my %temporalities, 'Tie::IxHash',
   'fieldorder' => [ qw( setup_fee recur_fee
                         recur_temporality unused_credit
                         expire_months start_1st sync_bill_date
+                        unsuspend_adjust_bill
                       ),
                     @usage_fieldorder, @usage_recharge_fieldorder,
                     qw( externalid ),
@@ -171,7 +177,7 @@ sub calc_recur {
   return 0
     if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0;
 
-  if( $self->option('sync_bill_date') ) {
+  if( $self->option('sync_bill_date',1) ) {
     return $self->calc_prorate(@_);
   }
   else {