X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fquotation.html;h=cad28a121f02278d0b54250d52ac442d8cdbb9f7;hp=fbc35bea1ae1078378460c80f33064b623adcce4;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hpb=54a357b171aa44f9399b4c146acd2afd3b686075 diff --git a/httemplate/search/quotation.html b/httemplate/search/quotation.html index fbc35bea1..cad28a121 100755 --- a/httemplate/search/quotation.html +++ b/httemplate/search/quotation.html @@ -1,49 +1,67 @@ <& elements/search.html, - 'title' => emt('Quotation Search Results'), - 'html_init' => $html_init, - 'menubar' => $menubar, - 'name' => 'quotations', - 'query' => $sql_query, - 'count_query' => $count_query, - 'count_addl' => $count_addl, - 'redirect' => $link, - 'header' => [ emt('Quotation #'), - emt('Setup'), - emt('Recurring'), - emt('Date'), - emt('Prospect'), - emt('Customer'), - ], - 'fields' => [ + 'title' => emt('Quotation Search Results'), + 'html_init' => $html_init, + 'menubar' => $menubar, + 'name' => 'quotations', + 'query' => $sql_query, + 'count_query' => $count_query, + 'count_addl' => $count_addl, + 'redirect' => $link, + 'disableable' => 1, + 'disabled_statuspos' => 1, + 'header' => [ emt('Quotation #'), + emt('Setup'), + emt('Recurring'), + emt('Date'), + emt('Description'), + emt('Close date'), + emt('Confidence'), + emt('Prospect'), + emt('Customer'), + ], + 'fields' => [ 'quotationnum', sub { $money_char. shift->total_setup }, sub { $money_char. shift->total_recur }, sub { time2str('%b %d %Y', shift->_date ) }, + 'quotation_description', + sub { my $quotation = shift; + $quotation->close_date ? time2str('%b %d %Y', $quotation->close_date) : ''; + }, + sub { my $quotation = shift; + length($quotation->confidence) ? $quotation->confidence . '%' : ''; + }, sub { my $prospect_main = shift->prospect_main; $prospect_main ? $prospect_main->name : ''; }, sub { my $cust_main = shift->cust_main; - $cust_main ? $cust_main->name : ''; + $cust_main ? encode_entities($cust_main->name) : ''; }, #\&FS::UI::Web::cust_fields, ], - 'sort_fields' => [ + 'sort_fields' => [ 'quotationnum', '', #FS::quotation->total_setup_sql, '', #FS::quotation->total_recur_sql, '_date', + 'quotation_description', + 'close_date', + 'confidence', '', '', ], - 'align' => 'rrrrll', #.FS::UI::Web::cust_aligns(), + 'align' => 'rrrrlrrll', #.FS::UI::Web::cust_aligns(), 'links' => [ $link, $link, $link, $link, + $link, + $link, + $link, $prospect_link, $cust_link, - #( map { $_ ne 'Cust. Status' ? $clink : '' } + #( map { $_ ne 'Cust. Status' ? $cust_link : '' } # FS::UI::Web::cust_header() #), ], @@ -71,6 +89,8 @@ my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('List quotations'); +local($FS::Record::qsearch_qualify_columns) = 1; + my $join_prospect_main = 'LEFT JOIN prospect_main USING ( prospectnum )'; my $join_cust_main = FS::UI::Web::join_cust_main('quotation');