From d2d8c2d81508b6e26e2a199c00819f392476d6fb Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 11 Jul 2017 16:52:02 -0400 Subject: [PATCH] RT# 74666 - updated some UI and description field location. --- httemplate/edit/quotation.html | 2 +- httemplate/elements/quotations.html | 14 ++++++++++---- httemplate/search/quotation.html | 32 ++++++++++++++++---------------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/httemplate/edit/quotation.html b/httemplate/edit/quotation.html index 69de2ca82..ab1d5242b 100644 --- a/httemplate/edit/quotation.html +++ b/httemplate/edit/quotation.html @@ -17,9 +17,9 @@ { field=>'prospectnum', type=>'fixed-prospect_main' }, { field=>'custnum', type=>'fixed-cust_main' }, { field=>'_date', type=>'fixed-date' }, + { field=>'quotation_description', type=>'text', size=>50 }, { field=>'close_date', type=>'input-date-field' }, { field=>'confidence', type=>'text', size=>3, postfix=>'%' }, - { field=>'quotation_description', type=>'text', size=>50 }, ($can_disable ? { field=>'disabled', type=>'checkbox', value=>'Y'} : ()), ], #XXX some way to disable the "view all" diff --git a/httemplate/elements/quotations.html b/httemplate/elements/quotations.html index b89143623..b517a5cde 100644 --- a/httemplate/elements/quotations.html +++ b/httemplate/elements/quotations.html @@ -11,10 +11,12 @@ # - <% mt('Date') |h %> <% mt('Setup') |h %> <% mt('Recurring') |h %> + <% mt('Date') |h %> <% mt('Description') |h %> + <% mt('Close date') |h %> + <% mt('Confidence') |h %> @@ -28,10 +30,12 @@ % $quotation->quotationnum. '">'; <% $a %><% $quotation->quotationnum %> - <% $a %><% time2str($date_format, $quotation->_date) |h %> - <% $a %><% $quotation->total_setup |h %> - <% $a %><% $quotation->total_recur |h %> + <% $a %><% $money_char.$quotation->total_setup |h %> + <% $a %><% $money_char.$quotation->total_recur |h %> + <% $a %><% time2str('%b %d %Y', $quotation->_date) |h %> <% $a %><% $quotation->quotation_description |h %> + <% $a %><% $quotation->close_date ? time2str('%b %d %Y', $quotation->close_date) : '' |h %> + <% $a %><% length($quotation->confidence) ? $quotation->confidence . '%' : '' |h %> <% $opt{convert_label} || 'Convert to customer' %> % } @@ -49,6 +53,8 @@ my $curuser = $FS::CurrentUser::CurrentUser; my $conf = new FS::Conf; +my $money_char = $conf->config('money_char') || '$'; + my $date_format = $conf->config('date_format') || '%m/%d/%Y'; my %opt = @_; diff --git a/httemplate/search/quotation.html b/httemplate/search/quotation.html index 6a4fef019..cad28a121 100755 --- a/httemplate/search/quotation.html +++ b/httemplate/search/quotation.html @@ -13,30 +13,30 @@ emt('Setup'), emt('Recurring'), emt('Date'), + emt('Description'), + emt('Close date'), + emt('Confidence'), emt('Prospect'), emt('Customer'), - emt('Confidence'), - emt('Close date'), - emt('Description') ], '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 ? encode_entities($cust_main->name) : ''; }, - sub { my $quotation = shift; - length($quotation->confidence) ? $quotation->confidence . '%' : ''; - }, - sub { my $quotation = shift; - $quotation->close_date ? time2str('%b %d %Y', $quotation->close_date) : ''; - }, - 'quotation_description', #\&FS::UI::Web::cust_fields, ], 'sort_fields' => [ @@ -44,23 +44,23 @@ '', #FS::quotation->total_setup_sql, '', #FS::quotation->total_recur_sql, '_date', + 'quotation_description', + 'close_date', + 'confidence', '', '', - 'confidence', - 'close_date', - 'quotation_description' ], - 'align' => 'rrrrllrr', #.FS::UI::Web::cust_aligns(), + 'align' => 'rrrrlrrll', #.FS::UI::Web::cust_aligns(), 'links' => [ $link, $link, $link, $link, - $prospect_link, - $cust_link, $link, $link, $link, + $prospect_link, + $cust_link, #( map { $_ ne 'Cust. Status' ? $cust_link : '' } # FS::UI::Web::cust_header() #), -- 2.11.0