[freeside-commits] branch FREESIDE_4_BRANCH updated. 0b377f833567c5fd460c11d75bdb5c59a67556c4

Christopher Burger burgerc at freeside.biz
Mon May 21 07:19:28 PDT 2018


The branch, FREESIDE_4_BRANCH has been updated
       via  0b377f833567c5fd460c11d75bdb5c59a67556c4 (commit)
       via  a37042cb6ab64f04a60ab601911c38c2e490dbbc (commit)
      from  46aa8e84c2a28f04e5e218b7afa8dbfc9aae2ff6 (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 0b377f833567c5fd460c11d75bdb5c59a67556c4
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 51b49e4f0..9cf9b56c6 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -1052,10 +1052,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);
 
     if ( $cust_pkg->get('setup') ) {
       # don't change it

commit a37042cb6ab64f04a60ab601911c38c2e490dbbc
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.

diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index 08b10c1ff..51b49e4f0 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -1052,6 +1052,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);
+    }
+
     if ( $cust_pkg->get('setup') ) {
       # don't change it
     } elsif ( $cust_pkg->get('start_date') ) {

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

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




More information about the freeside-commits mailing list