[freeside-commits] branch master updated. a2ff7564f36a5db81bdba053ff70017b8f438904

Ivan ivan at 420.am
Mon Mar 11 01:03:56 PDT 2013


The branch, master has been updated
       via  a2ff7564f36a5db81bdba053ff70017b8f438904 (commit)
      from  57c5cf47f41739b57c563ddac09d0bd49d6d67b4 (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 a2ff7564f36a5db81bdba053ff70017b8f438904
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Mar 11 01:03:51 2013 -0700

    fix quotations, RT#21103

diff --git a/FS/FS/TemplateItem_Mixin.pm b/FS/FS/TemplateItem_Mixin.pm
index 6d7ea26..f9ab51a 100644
--- a/FS/FS/TemplateItem_Mixin.pm
+++ b/FS/FS/TemplateItem_Mixin.pm
@@ -271,10 +271,12 @@ sub cust_bill_pkg_display {
   } else {
     my $hashref = { 'billpkgnum' => $self->billpkgnum };
     $hashref->{type} = $type if defined($type);
+
+    my $order_by = $self->display_table_orderby || 'billpkgdisplaynum';
     
     @result = qsearch ({ 'table'    => $self->display_table,
                          'hashref'  => { 'billpkgnum' => $self->billpkgnum },
-                         'order_by' => 'ORDER BY billpkgdisplaynum',
+                         'order_by' => "ORDER BY $order_by",
                       });
   }
 
diff --git a/FS/FS/quotation_pkg.pm b/FS/FS/quotation_pkg.pm
index 3d40bb0..47045cd 100644
--- a/FS/FS/quotation_pkg.pm
+++ b/FS/FS/quotation_pkg.pm
@@ -1,10 +1,11 @@
 package FS::quotation_pkg;
 
 use strict;
-use base qw( FS::Record );
+use base qw( FS::TemplateItem_Mixin FS::Record );
 use FS::Record qw( qsearchs ); #qsearch
 use FS::part_pkg;
 use FS::cust_location;
+use FS::quotation_pkg_discount; #so its loaded when TemplateItem_Mixin needs it
 
 =head1 NAME
 
@@ -80,6 +81,11 @@ points to.  You can ask the object for a copy with the I<hash> method.
 
 sub table { 'quotation_pkg'; }
 
+sub display_table         { 'quotation_pkg'; }
+sub display_table_orderby { 'quotationpkgnum'; } # something else?
+                                                 #  (for invoice display order)
+sub discount_table        { 'quotation_pkg_discount'; }
+
 =item insert
 
 Adds this record to the database.  If there is an error, returns the error,

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

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




More information about the freeside-commits mailing list