RT# 74666, Added quotation description to customer quotation list and quotation view
authorChristopher Burger <burgerc@freeside.biz>
Fri, 17 Mar 2017 00:28:56 +0000 (20:28 -0400)
committerChristopher Burger <burgerc@freeside.biz>
Wed, 24 May 2017 18:55:02 +0000 (14:55 -0400)
FS/FS/Schema.pm
httemplate/edit/quotation.html
httemplate/elements/quotations.html
httemplate/view/quotation.html

index a158f39..c70861c 100644 (file)
@@ -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, '', '',
       ],
index 43e815c..36a445d 100644 (file)
@@ -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) = @_;
index 1d80a48..a6dd373 100644 (file)
@@ -13,6 +13,7 @@
         <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('Description') |h %></TH>
         <TH CLASS="grid" BGCOLOR="#cccccc"></TH>
       </TR>
 %     foreach my $quotation (@quotations) {
@@ -28,6 +29,7 @@
           <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 %>"><% $a %><% $quotation->quotation_description |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>
 %     }
index 6687361..41a5a87 100755 (executable)
@@ -1,3 +1,12 @@
+% if ( $quotation->custnum ) {
+<& /elements/header-cust_main.html, view=>'quotations', custnum=>$quotation->custnum &>
+<h2>Quotation #<% $quotationnum %>
+% if ($quotation->quotation_description) {
+(<% $quotation->quotation_description %>)  
+% } 
+</h2>
+% } 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 &>