diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-03-04 11:35:51 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-03-04 11:35:51 -0800 |
commit | d256989a19dd100823d35a11929edb1ae07d9883 (patch) | |
tree | 6074cd4525de3c2b0f177e1088a86673bba1697b /httemplate/elements | |
parent | 9000d0d9daea14055bda2c28b3a33c5742930460 (diff) |
optimize package list on order new package, RT#39822
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/select-part_pkg.html | 5 | ||||
-rw-r--r-- | httemplate/elements/select-table.html | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/httemplate/elements/select-part_pkg.html b/httemplate/elements/select-part_pkg.html index fb45c0efa..e5692a798 100644 --- a/httemplate/elements/select-part_pkg.html +++ b/httemplate/elements/select-part_pkg.html @@ -155,6 +155,11 @@ if ( exists($opt{'classnum'}) && defined($opt{'classnum'}) ) { die 'Use of toggle_disabled with classnum has not been implemented' if exists $hash{'classnum'}; +$opt{'select'} = 'part_pkg.*, setup_option.optionvalue AS _setup_fee, + recur_option.optionvalue AS _recur_fee' + unless $opt{'select'}; +$opt{'addl_from'} .= FS::part_pkg->join_options_sql; + $opt{'extra_sql'} .= ( keys(%hash) ? ' AND ' : ' WHERE ' ). FS::part_pkg->curuser_pkgs_sql; diff --git a/httemplate/elements/select-table.html b/httemplate/elements/select-table.html index 4b6ddb40e..d7ec015f3 100644 --- a/httemplate/elements/select-table.html +++ b/httemplate/elements/select-table.html @@ -182,6 +182,7 @@ if ( $opt{'records'} ) { unless $opt{'presorted'}; } else { @records = qsearch( { + 'select' => $opt{'select'} || '*', 'table' => $opt{'table'}, 'addl_from' => $opt{'addl_from'}, 'hashref' => $hashref, |