[freeside-commits] branch master updated. 7358c407cc5fd795e145d9fc0de1d784c1690e55

Jonathan Prykop jonathan at 420.am
Tue Apr 26 13:30:26 PDT 2016


The branch, master has been updated
       via  7358c407cc5fd795e145d9fc0de1d784c1690e55 (commit)
       via  d2b1f8e85a1e879ea6a986b9075eb2babd409af8 (commit)
      from  ae13f6c8d6b3f9bda476e06768a24042d89c8b0b (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 7358c407cc5fd795e145d9fc0de1d784c1690e55
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Apr 26 15:29:51 2016 -0500

    RT#39819: Packages with Show zero setup/recurring do not print on quotations [use quotation_pkg methods, v4+ only]

diff --git a/FS/FS/quotation.pm b/FS/FS/quotation.pm
index f3bfc27..0549853 100644
--- a/FS/FS/quotation.pm
+++ b/FS/FS/quotation.pm
@@ -280,8 +280,8 @@ sub _items_sections {
     my $part_pkg = $pkg->part_pkg;
 
     my $recur_freq = $part_pkg->freq;
-    $show{$recur_freq} = 1 if $pkg->unitrecur > 0 or $part_pkg->recur_show_zero;
-    $show{0} = 1 if $pkg->unitsetup > 0 or $part_pkg->setup_show_zero;
+    $show{$recur_freq} = 1 if $pkg->unitrecur > 0 or $pkg->recur_show_zero;
+    $show{0} = 1 if $pkg->unitsetup > 0 or $pkg->setup_show_zero;
     ($subtotals{0} ||= 0) += $pkg->setup + $pkg->setup_tax;
     ($subtotals{$recur_freq} ||= 0) += $pkg->recur + $pkg->recur_tax;
 
@@ -1055,8 +1055,8 @@ sub _items_pkg {
                                              * $quotation_pkg->quantity);
     next if $this_item->{'amount'} == 0 and !(
       $setuprecur eq 'setup'
-      ? $part_pkg->setup_show_zero
-      : $part_pkg->recur_show_zero
+      ? $quotation_pkg->setup_show_zero
+      : $quotation_pkg->recur_show_zero
     );
 
     if ( $preref ) {

commit d2b1f8e85a1e879ea6a986b9075eb2babd409af8
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Apr 26 15:28:55 2016 -0500

    RT#39819: Packages with Show zero setup/recurring do not print on quotations [quotation_pkg methods]

diff --git a/FS/FS/quotation_pkg.pm b/FS/FS/quotation_pkg.pm
index b9b3799..9854c45 100644
--- a/FS/FS/quotation_pkg.pm
+++ b/FS/FS/quotation_pkg.pm
@@ -327,6 +327,11 @@ sub setup {
 
 }
 
+sub setup_show_zero {
+  my $self = shift;
+  return $self->part_pkg->setup_show_zero;
+}
+
 sub setup_tax {
   my $self = shift;
   sum(0, map { $_->setup_amount } $self->quotation_pkg_tax);
@@ -342,6 +347,11 @@ sub recur {
 
 }
 
+sub recur_show_zero {
+  my $self = shift;
+  return $self->part_pkg->recur_show_zero;
+}
+
 sub recur_tax {
   my $self = shift;
   sum(0, map { $_->recur_amount } $self->quotation_pkg_tax);

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

Summary of changes:
 FS/FS/quotation.pm     |    8 ++++----
 FS/FS/quotation_pkg.pm |   10 ++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list