[freeside-commits] branch FREESIDE_3_BRANCH updated. a931e7703fc3b7b68a1e17c11cc9c76949372898

Ivan ivan at 420.am
Wed Jul 1 15:46:49 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  a931e7703fc3b7b68a1e17c11cc9c76949372898 (commit)
      from  f2ccf00b0a2eb89499bd63cbd965fbd63802d754 (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 a931e7703fc3b7b68a1e17c11cc9c76949372898
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jul 1 15:46:47 2015 -0700

    payment total on quotes: not when recur_method eq prorate, and be more refined about disabling with sync_bill-date

diff --git a/FS/FS/quotation.pm b/FS/FS/quotation.pm
index 0e6b4e7..669a254 100644
--- a/FS/FS/quotation.pm
+++ b/FS/FS/quotation.pm
@@ -347,11 +347,13 @@ sub _items_total {
     my $disable_total = 0;
     foreach my $quotation_pkg ($self->quotation_pkg) {
       my $part_pkg = $quotation_pkg->part_pkg;
-      if (   $part_pkg->plan =~ /^prorate/
-          or $part_pkg->plan eq 'agent'
-          or $part_pkg->plan =~ /^torrus/
-          or $part_pkg->option('sync_bill_date')
-          or $part_pkg->option('recur_method') eq 'prorate' ) {
+      if (    $part_pkg->plan =~ /^(prorate|torrus|agent$)/
+           || $part_pkg->option('recur_method') eq 'prorate'
+           || ( $part_pkg->option('sync_bill_date')
+                  && $self->custnum
+                  && $self->cust_main->billing_pkgs #num_billing_pkgs when we have it
+              )
+      ) {
         $disable_total = 1;
         last;
       }

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

Summary of changes:
 FS/FS/quotation.pm |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list