add prepaid-never_renew flag, RT#26274
authorIvan Kohler <ivan@freeside.biz>
Tue, 3 Jun 2014 01:35:23 +0000 (18:35 -0700)
committerIvan Kohler <ivan@freeside.biz>
Tue, 3 Jun 2014 01:35:23 +0000 (18:35 -0700)
FS/FS/Conf.pm
FS/bin/freeside-prepaidd

index 898bb7f..7ede999 100644 (file)
@@ -5708,6 +5708,13 @@ and customer address. Include units.',
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'prepaid-never_renew',
+    'section'     => 'billing',
+    'description' => 'Prepaid packages never renew.',
+    'type'        => 'checkbox',
+  },
+
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
index c095cee..fe5b545 100644 (file)
@@ -49,8 +49,10 @@ while (1) {
       next;
     }
 
-    if (    $cust_main->total_unapplied_payments > 0
-         || $cust_main->total_unapplied_credits > 0
+    if ( (    $cust_main->total_unapplied_payments > 0
+           || $cust_main->total_unapplied_credits > 0
+         )
+         && ! FS::Conf->new->exists('prepaid-never_renew')
        )
     {