[freeside-commits] branch FREESIDE_3_BRANCH updated. a8981b8fc11c032fd4fa1a3943c4785391a9ffb4

Christopher Burger burgerc at freeside.biz
Mon May 21 08:50:45 PDT 2018


The branch, FREESIDE_3_BRANCH has been updated
       via  a8981b8fc11c032fd4fa1a3943c4785391a9ffb4 (commit)
       via  f1205344753e1b44945ccc0daa1c78d0f7fa7c45 (commit)
      from  c2bcd30a9cf76008d21706bab99b6209f76a9f5a (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 a8981b8fc11c032fd4fa1a3943c4785391a9ffb4
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon May 21 09:44:55 2018 -0400

    RT# 77964 - refined code to defer dates when waiving setup fee for prorated packages.

diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index 8a6056b67..79a0c9ed1 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -1253,10 +1253,8 @@ sub _make_lines {
         }
     }
 
-    if ($cust_pkg->waive_setup && $part_pkg->plan eq "prorate") {
-      $lineitems++;
-      $setup = 0 if $part_pkg->prorate_setup($cust_pkg, $time);
-    }
+    $lineitems++
+    if $cust_pkg->waive_setup && $part_pkg->can('prorate_setup') && $part_pkg->prorate_setup($cust_pkg, $time);
 
     $cust_pkg->setfield('setup', $time)
       unless $cust_pkg->setup;

commit f1205344753e1b44945ccc0daa1c78d0f7fa7c45
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue May 15 10:19:33 2018 -0400

    RT# 77964 - Fixed error where deferring date did not work when waive setup fee was set.
    
    Conflicts:
            FS/FS/cust_main/Billing.pm

diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index debff8a53..8a6056b67 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -1253,6 +1253,11 @@ sub _make_lines {
         }
     }
 
+    if ($cust_pkg->waive_setup && $part_pkg->plan eq "prorate") {
+      $lineitems++;
+      $setup = 0 if $part_pkg->prorate_setup($cust_pkg, $time);
+    }
+
     $cust_pkg->setfield('setup', $time)
       unless $cust_pkg->setup;
           #do need it, but it won't get written to the db

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

Summary of changes:
 FS/FS/cust_main/Billing.pm | 3 +++
 1 file changed, 3 insertions(+)




More information about the freeside-commits mailing list