From 674f60dc84dd3eaefba0d7c582a92f5679cf2f66 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 16 Mar 2017 20:28:56 -0400 Subject: [PATCH] RT# 74666, Added quotation description to customer quotation list and quotation view --- FS/FS/Schema.pm | 17 +++++++++-------- httemplate/edit/quotation.html | 26 ++++++++++++++------------ httemplate/elements/quotations.html | 2 ++ httemplate/view/quotation.html | 9 +++++++++ 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index a158f39c2..c70861cf7 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1352,14 +1352,15 @@ sub tables_hashref { 'quotation' => { 'columns' => [ #regular fields - 'quotationnum', 'serial', '', '', '', '', - 'prospectnum', 'int', 'NULL', '', '', '', - 'custnum', 'int', 'NULL', '', '', '', - '_date', @date_type, '', '', - 'disabled', 'char', 'NULL', 1, '', '', - 'usernum', 'int', 'NULL', '', '', '', - 'close_date', @date_type, '', '', - 'confidence', 'int', 'NULL', '', '', '', + 'quotationnum', 'serial', '', '', '', '', + 'prospectnum', 'int', 'NULL', '', '', '', + 'custnum', 'int', 'NULL', '', '', '', + '_date', @date_type, '', '', + 'disabled', 'char', 'NULL', 1, '', '', + 'usernum', 'int', 'NULL', '', '', '', + 'close_date', @date_type, '', '', + 'confidence', 'int', 'NULL', '', '', '', + 'quotation_description', 'varchar', 'NULL', '50', '', '', #'total', @money_type, '', '', #'quotation_term', 'varchar', 'NULL', $char_d, '', '', ], diff --git a/httemplate/edit/quotation.html b/httemplate/edit/quotation.html index 43e815c09..36a445db5 100644 --- a/httemplate/edit/quotation.html +++ b/httemplate/edit/quotation.html @@ -3,21 +3,23 @@ 'table' => 'quotation', 'menubar' => [], 'labels' => { - 'quotationnum' => 'Quotation number', - 'prospectnum' => 'Prospect', - 'custnum' => 'Customer', - '_date' => 'Date', - 'close_date' => 'Close Date', - 'confidence' => 'Confidence', + 'quotationnum' => 'Quotation number', + 'prospectnum' => 'Prospect', + 'custnum' => 'Customer', + '_date' => 'Date', + 'close_date' => 'Close Date', + 'confidence' => 'Confidence', + 'quotation_description' => 'Description', ($can_disable ? ('disabled' => 'Disabled') : ()), }, 'fields' => [ - { 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=>'confidence', type=>'text', size=>3, postfix=>'%' }, - ($can_disable ? { field=>'disabled', type=>'checkbox', value=>'Y'} : ()), + { 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=>'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" 'new_callback' => sub { my( $cgi, $quotation) = @_; diff --git a/httemplate/elements/quotations.html b/httemplate/elements/quotations.html index 1d80a48ea..a6dd373a7 100644 --- a/httemplate/elements/quotations.html +++ b/httemplate/elements/quotations.html @@ -13,6 +13,7 @@ <% mt('Date') |h %> <% mt('Setup') |h %> <% mt('Recurring') |h %> + <% mt('Description') |h %> % foreach my $quotation (@quotations) { @@ -28,6 +29,7 @@ <% $a %><% time2str($date_format, $quotation->_date) |h %> <% $a %><% $quotation->total_setup |h %> <% $a %><% $quotation->total_recur |h %> + <% $a %><% $quotation->quotation_description |h %> <% $opt{convert_label} || 'Convert to customer' %> % } diff --git a/httemplate/view/quotation.html b/httemplate/view/quotation.html index 66873616b..41a5a87c5 100755 --- a/httemplate/view/quotation.html +++ b/httemplate/view/quotation.html @@ -1,3 +1,12 @@ +% if ( $quotation->custnum ) { +<& /elements/header-cust_main.html, view=>'quotations', custnum=>$quotation->custnum &> +

Quotation #<% $quotationnum %> +% if ($quotation->quotation_description) { +(<% $quotation->quotation_description %>) +% } +

+% } else { #eventually, header-prospect_main.html +>>>>>>> 512a0bd... RT# 74666, Added quotation description to customer quotation list and quotation view <& /elements/header.html, mt('Quotation View'), $menubar &> <& /elements/init_overlib.html &> -- 2.11.0