} 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",
});
}
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
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,