From: jeff Date: Wed, 25 Oct 2006 04:44:48 +0000 (+0000) Subject: select multiple pkgparts on advanced package report X-Git-Tag: TRIXBOX_2_6~894 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0c2f4bccc3810426d4b9e31dca645711c32f0b63 select multiple pkgparts on advanced package report --- diff --git a/httemplate/elements/tr-selectmultiple-part_pkg.html b/httemplate/elements/tr-selectmultiple-part_pkg.html new file mode 100644 index 000000000..abf96d726 --- /dev/null +++ b/httemplate/elements/tr-selectmultiple-part_pkg.html @@ -0,0 +1,23 @@ +% +% my( $cust_fields, %opt ) = @_; +% +% use FS::ConfDefaults; +% $opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ]; +% +% + + + + <% $opt{'label'} || 'Packages' %> + + <% include( '/elements/select-table.html', + 'table' => 'part_pkg', + 'name_col' => 'pkg', + 'value' => '', + 'empty_label' => '(none)', + 'element_etc' => 'multiple', + %opt, + ) + %> + + diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 8dbc600e9..7a651c4bf 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -80,6 +80,14 @@ %#eslaf % %### +%# parse part_pkg +%### +% +%my $pkgpart = join (' OR pkgpart=', +% grep {$_} map { /^(\d+)$/; } ($cgi->param('pkgpart'))); +%push @where, '(pkgpart=' . $pkgpart . ')' if $pkgpart; +% +%### %# parse magic, legacy, etc. %### % diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html index 8fabf107a..2193cac8b 100755 --- a/httemplate/search/report_cust_pkg.html +++ b/httemplate/search/report_cust_pkg.html @@ -18,7 +18,7 @@ 'empty_label' => '(empty class)', ) %> -% #include( '/elements/tr-selectmultiple-part_pkg.html' ) + <% include( '/elements/tr-selectmultiple-part_pkg.html' ) %> Next bill date