order_by
pre_options
post_options
+ select
) ) {
die "Cannot use toggle_disabled with $someopt"
if exists $opt{$someopt};
die 'Use of toggle_disabled with classnum has not been implemented'
if exists $hash{'classnum'};
+# CAUTION: For proper functioning of toggle_disabled,
+# please ensure changes to default options are synced with misc/xmlhttp-part_pkg.cgi
+
$opt{'select'} = 'part_pkg.*, setup_option.optionvalue AS _setup_fee,
recur_option.optionvalue AS _recur_fee'
unless $opt{'select'};
# default returned records must maintain consistency with /elements/select-part_pkg.html
+my $select = 'part_pkg.*, setup_option.optionvalue AS _setup_fee,
+ recur_option.optionvalue AS _recur_fee';
+my $addl_from .= FS::part_pkg->join_options_sql;
+
my $extra_sql = ' WHERE ' . FS::part_pkg->curuser_pkgs_sql;
# equivalent to agent_virt=1 and agent_null=1 in /elements/select-table.html
my @records = qsearch( {
'table' => 'part_pkg',
+ 'select' => $select,
+ 'addl_from' => $addl_from,
'hashref' => {},
'extra_sql' => $extra_sql,
'order_by' => "ORDER BY pkg",
}
} @records;
-print STDERR Dumper(\@return);
-
</%init>