Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / quotation.pm
index 7bf5ecb..d66b1b8 100644 (file)
@@ -274,10 +274,12 @@ sub _items_sections {
     # but its good enough for the 99% common case of preventing totals from
     # displaying for prorate packages
     $disable_total = 1
-      if $part_pkg->plan =~ /^prorate/
-      || $part_pkg->plan eq 'agent'
-      || $part_pkg->plan =~ /^torrus/
-      || $part_pkg->option('sync_bill_date');
+      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
+         );
 
   }
   my @pkg_freq_order = keys %{ FS::Misc->pkg_freqs };
@@ -970,11 +972,12 @@ sub _items_pkg {
 
   foreach my $quotation_pkg (@pkgs) {
     my $part_pkg = $quotation_pkg->part_pkg;
+    my @details = $quotation_pkg->details;
     my $setuprecur;
     my $this_item = {
       'pkgnum'          => $quotation_pkg->quotationpkgnum,
       'description'     => $quotation_pkg->desc($locale),
-      'ext_description' => [],
+      'ext_description' => \@details,
       'quantity'        => $quotation_pkg->quantity,
     };
     if ($freq eq '0') {