when the parameter is not passed, the initial value previously passed to cust_header() is used
if @cust_fields is empty, cust_header() is called with no arguments
}
sub cust_sort_fields {
- cust_header(@_);
+ cust_header(@_) if( @_ or !@cust_fields );
#inefficientish, but tiny lists and only run once per page
map { $_ eq 'custnum' ? 'custnum' : '' } @cust_fields;
my @fields = qw( last first company );
# push @fields, map "ship_$_", @fields;
- cust_header(@_);
+ cust_header(@_) if( @_ or !@cust_fields );
#inefficientish, but tiny lists and only run once per page
my @location_fields;
sub cust_fields_subs {
my $unlinked_warn = 0;
+
return map {
my $f = $_;
if ( $unlinked_warn++ ) {
'cust_main.custnum',
$range_cols,
$packages_cols,
- FS::UI::Web::cust_sql_fields($cgi->param('cust_fields')),
+ FS::UI::Web::cust_sql_fields(),
'payby',
),
'extra_sql' => $where,