[freeside-commits] branch FREESIDE_4_BRANCH updated. 01e645f8e1c8a15f68b6be0164e419bff19a134d
Christopher Burger
burgerc at 420.am
Tue Jul 11 14:15:53 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via 01e645f8e1c8a15f68b6be0164e419bff19a134d (commit)
via 7544d99cd34be2f941a6defdec8f74b00437ebce (commit)
via b8d2cddb6a809a717920ab489512c6f9f91a3b90 (commit)
from 7e8e63c546f48ae88bd557e2e2b81f10b0c8361f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 01e645f8e1c8a15f68b6be0164e419bff19a134d
Author: Christopher Burger <burgerc at freeside.biz>
Date: Tue Jul 11 16:52:02 2017 -0400
RT# 74666 - updated some UI and description field location.
Conflicts:
httemplate/search/quotation.html
diff --git a/httemplate/edit/quotation.html b/httemplate/edit/quotation.html
index 69de2ca..ab1d524 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 b891436..b517a5c 100644
--- a/httemplate/elements/quotations.html
+++ b/httemplate/elements/quotations.html
@@ -11,10 +11,12 @@
<THEAD>
<TR>
<TH CLASS="grid" BGCOLOR="#cccccc">#</TH>
- <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Date') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Setup') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Recurring') |h %></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Date') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Description') |h %></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Close date') |h %></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Confidence') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"></TH>
</TR>
</THEAD>
@@ -28,10 +30,12 @@
% $quotation->quotationnum. '">';
<TR>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% $quotation->quotationnum %></A></TD>
- <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% time2str($date_format, $quotation->_date) |h %></A></TD>
- <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% $quotation->total_setup |h %></A></TD>
- <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% $quotation->total_recur |h %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>" ALIGN=right><% $a %><% $money_char.$quotation->total_setup |h %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>" ALIGN=right><% $a %><% $money_char.$quotation->total_recur |h %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% time2str('%b %d %Y', $quotation->_date) |h %></A></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% $quotation->quotation_description |h %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% $quotation->close_date ? time2str('%b %d %Y', $quotation->close_date) : '' |h %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>" ALIGN=right><% $a %><% length($quotation->confidence) ? $quotation->confidence . '%' : '' |h %></A></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><A HREF="<%$p%>edit/process/quotation_convert.html?quotationnum=<% $quotation->quotationnum %>"><% $opt{convert_label} || 'Convert to customer' %></A></TD>
</TR>
% }
@@ -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 f9b77b9..cad28a1 100755
--- a/httemplate/search/quotation.html
+++ b/httemplate/search/quotation.html
@@ -13,28 +13,30 @@
emt('Setup'),
emt('Recurring'),
emt('Date'),
+ emt('Description'),
+ emt('Close date'),
+ emt('Confidence'),
emt('Prospect'),
emt('Customer'),
- emt('Confidence'),
- emt('Close date'),
],
'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) : '';
- },
#\&FS::UI::Web::cust_fields,
],
'sort_fields' => [
@@ -42,21 +44,23 @@
'', #FS::quotation->total_setup_sql,
'', #FS::quotation->total_recur_sql,
'_date',
+ 'quotation_description',
+ 'close_date',
+ 'confidence',
'',
'',
- 'confidence',
- 'close_date',
],
- '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()
#),
commit 7544d99cd34be2f941a6defdec8f74b00437ebce
Author: Christopher Burger <burgerc at freeside.biz>
Date: Thu Apr 6 09:21:06 2017 -0400
RT# 74665 - small cleanup of code, removed text value
diff --git a/httemplate/edit/quotation.html b/httemplate/edit/quotation.html
index 8c9fce1..69de2ca 100644
--- a/httemplate/edit/quotation.html
+++ b/httemplate/edit/quotation.html
@@ -17,7 +17,7 @@
{ field=>'prospectnum', type=>'fixed-prospect_main' },
{ field=>'custnum', type=>'fixed-cust_main' },
{ field=>'_date', type=>'fixed-date' },
- { field=>'close_date', type=>'input-date-field', value=>'30' },
+ { 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'} : ()),
commit b8d2cddb6a809a717920ab489512c6f9f91a3b90
Author: Christopher Burger <burgerc at freeside.biz>
Date: Thu Apr 6 09:09:57 2017 -0400
RT# 74665 - set a default close date if global config quotation_disable_after_days is set
diff --git a/httemplate/edit/quotation.html b/httemplate/edit/quotation.html
index 3cedef8..8c9fce1 100644
--- a/httemplate/edit/quotation.html
+++ b/httemplate/edit/quotation.html
@@ -17,7 +17,7 @@
{ field=>'prospectnum', type=>'fixed-prospect_main' },
{ field=>'custnum', type=>'fixed-cust_main' },
{ field=>'_date', type=>'fixed-date' },
- { field=>'close_date', type=>'input-date-field' },
+ { field=>'close_date', type=>'input-date-field', value=>'30' },
{ field=>'confidence', type=>'text', size=>3, postfix=>'%' },
{ field=>'quotation_description', type=>'text', size=>50 },
($can_disable ? { field=>'disabled', type=>'checkbox', value=>'Y'} : ()),
@@ -28,6 +28,9 @@
foreach qw( prospectnum custnum );
$quotation->_date(time);
},
+ 'field_callback' => sub { my( $cgi, $quotation, $field_hashref ) = @_;
+ $quotation->close_date(($default_close_days * 86400) + time) if !$quotation->close_date && $default_close_days;
+ },
)
%>
<%init>
@@ -37,4 +40,8 @@ die "access denied"
my $can_disable = $FS::CurrentUser::CurrentUser->access_right('Disable quotation');
+my $conf = new FS::Conf;
+
+my $default_close_days ||= $conf->config('quotation_disable_after_days');
+
</%init>
-----------------------------------------------------------------------
Summary of changes:
httemplate/edit/quotation.html | 9 ++++++++-
httemplate/elements/quotations.html | 14 ++++++++++----
httemplate/search/quotation.html | 30 +++++++++++++++++-------------
3 files changed, 35 insertions(+), 18 deletions(-)
More information about the freeside-commits
mailing list