database - Coldfusion: Is there a way to add a break in the middle of a table? For instance, for the user to add a comment? -


i have basic sales quote website setup--the salesperson selects part number, sets quantity, , part @ appropriate quantity , price added table until user indicates done adding parts.

so instance on quote generated, there table 5 columns, headings part #, description, qty, list price, , final price respectively. page, salesman looks or enters part info , click "add part" , each part added in consecutive rows table go automatically.

screen shot 1

view full image

what want sort parts/group them based on category. able add category heading table add parts. if these parts belong "red category" want able add line before parts can type in "red category", keep adding parts normal, , when new category repeat same.

screen shot 2

view full image

the problem i'm having have 1 table, , part add table appears fields need filled in. first thought have them add part had description field filled in, not working. think because each part added has percentage of price automatically added generate final price column value. , again @ end, discount can applied entire quote, may again causing problem.

so more suppose question is, possible find way them add "part" description field required can use define category headings? or there way can add break in table them insert category heading?

the main issue figuring out how can let sales people add when want to. way set now, way add within table part , part must @ least have part#, price, , quantity of @ least 1 show. thought because way know add table part, create part have part number, quantity, , price hidden when used. sales people able edit parts before added, thought these serve category headings.

i don't need category per se because each of sales people decide categories are--ad hoc basically--i have editable part set not display quantity, price, or part number can call whatever want , category.

i'm not trying create category setup--i apologize--basically , ad hoc line part can type in whatever want specified me purpose categorize quote--we won't saving parts in categories.

here's code of table:

</p><cfif #quote.itemdiscount# eq 0> <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="header">                 <tr>                 <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:left;width:14%">item #</td>                                 <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:left;width:45%">description</td>                                 <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:center;width:9%">quantity</td>                                 <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:right;width:16%">list price</td>                                 <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:right;width:16%">ext. price</td> </tr> </table> <cfelse> <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="header"> <tr>                                  <td style="text-align:left;width:14%"></td>                                 <td style="text-align:left;width:45%"></td>                                 <td style="text-align:center;width:9%"></td>                                 <td style="text-align:right;width:16%"></td>                                 <td style="text-align:right;width:16%"></td> </tr> </table> <br> </cfif> <br /> <cfset #subprice# = 0> <cfset #moduleprice# = 0> <cfif #quote.itemdiscount# eq 0> <form action="" method="post" name="quotesofar"><cfloop query="quote">   <cfif #quote.partnumber# neq "subtotal"><table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="quote">   <tr><cfif #quote.quantity# neq 0>     <td width="14%" align="left"><font size="-1"><cfoutput>#quote.partnumber#</cfoutput></font></td>     <td width="45%" align="left"><cfoutput>#quote.description#</cfoutput></td>      <td width="9%" align="center"><cfoutput>#quote.quantity#</cfoutput></td>      <td width="16%" align="right"><cfoutput>#dollarformat(quote.price)#</cfoutput></td>     <td width="16%" align="right"><div align="right"><cfoutput>#dollarformat(quote.extprice)#</cfoutput></div></td>     <cfset #subprice# = #subprice# + #quote.extprice#>   </cfif></tr>   <tr></tr><!---</cfif>--->    </table>   <cfelseif #quote.partnumber# eq "subtotal"><table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="quote">   <tr>     <td width="14%" align="left"><strong><font size="-1"></font>&nbsp;</strong></td>     <td width="15%" align="left"><strong><font color="#ff0000" size="-1">module price</font></strong></td>     <td width="33%" align="left"><strong><cfoutput>#dollarformat(evaluate(subprice-moduleprice))#</cfoutput></strong></font></strong></div></td>     <td width="12%" align="right"><strong><font color="##ff0000" size="+1">subtotal</font></strong></td>     <td width="8%" align="center"></td>     <td width="12%" align="right"><strong><font color="##ff0000" size="+1"><cfoutput>#dollarformat(subprice)#</cfoutput></font></strong></div></td>   </tr>     <tr><cfset #moduleprice# = #subprice#>   </tr></cfif></cfloop>   </table>   <cfelse>   </form><form action="" method="post" name="quotesofar"><cfloop query="quote">     <table table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0"><cfif #quote.partnumber# neq "subtotal">   <tr><cfif #quote.quantity# neq 0>     <td width="14%" align="left"><strong><font size="-1"><cfoutput>#quote.partnumber#</cfoutput></font></strong></td>     <td width="45%" align="left"><cfoutput>#quote.description#</cfoutput></td>     <td width="9%" align="center"><cfoutput>#quote.quantity#</cfoutput></td>     <td width="12%" align="right"><cfoutput>#dollarformat(quote.price)#</cfoutput></td>     <cfif #quote.itemdiscount# lt 1>     <td width="8%" align="right"><cfoutput>#evaluate(quote.itemdiscount * 100)#</cfoutput></td>     <cfelse>     <td width="8%" align="right"><cfoutput>#evaluate(quote.itemdiscount * 1)#</cfoutput></td>     </cfif>     <td width="12%" align="right"><div align="right"><cfoutput>#dollarformat(quote.extprice)#</cfoutput></div></td>     <cfset #subprice# = #subprice# + #quote.extprice#>   </cfif></tr>   <tr>     <td colspan="7" align="left">&nbsp;</td>   </tr><!---</cfif>--->   <cfelseif #quote.partnumber# eq "subtotal">   <tr>     <td width="14%" align="left"><strong><font size="-1"></font>&nbsp;</strong></td>     <td width="15%" align="left"><strong><font color="#ff0000" size="-1">module price</font></strong></td>     <td width="33%" align="left"><strong><cfoutput>#dollarformat(evaluate(subprice-moduleprice))#</cfoutput></strong></font></strong></div></td>     <td width="12%" align="right"><strong><font color="##ff0000" size="+1">subtotal</font></strong></td>     <td width="8%" align="center"></td>     <td width="12%" align="right"><strong><font color="##ff0000" size="+1"><cfoutput>#dollarformat(subprice)#</cfoutput></font></strong></div></td>   </tr>     <tr><cfset #moduleprice# = #subprice#>     <td colspan="7" align="left">&nbsp;</td>   </tr> </cfif></table></cfloop><!---</cfif>---> </cfif> </form> <cfif #quotetrack.discount# neq 0>  <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial'; border-bottom: 1px solid #000; border-top: 1px solid #000;" cellpadding="0" cellspacing="0">                         <tr> <br>                             <td style="text-align:left;font-weight:bold;">subtotal:</td>                             <td style="text-align:right;font-weight:bold;"><cfoutput query="totals"><strong>#dollarformat (totals.expr1000)#</strong></cfoutput></td>                             </tr>                             <cfset #cost# = #totals.expr1000#>                             <tr>                             <td style="text-align:left;font-weight:bold;">less discount(%):</td>                             <td style="text-align:right;font-weight:bold;"><cfoutput><strong>#evaluate (quotetrack.discount*100)#</strong>%</cfoutput></td>                             </tr>                             <cfset #inverse# = (1-#quotetrack.discount#)>                             <tr>                             <td style="text-align:left;font-weight:bold;">&nbsp;</td>                             <td style="text-align:right;font-weight:bold;">&nbsp;</td>                             </tr>                             <tr>                             <td style="text-align:left;font-weight:bold;">total:</td>                             <td style="text-align:right;font-weight:bold;"><cfoutput>#dollarformat (evaluate(cost * inverse))#</cfoutput></td>                             </tr>                         </table>                          <cfelse>  <table width="30%" border="0" align="center">   <tr>     <td align="right"><strong><font color="#ff0000" size="+2">total</font></strong></td>     <td align="right"><cfoutput query="totals"><strong><font color="##ff0000" size="+2">#dollarformat (totals.expr1000)#</font></strong></cfoutput></td>   </tr> </table> </cfif> <br /> 

this not answer question (yet) long comment. update more info provided.

i have formatted code example in attempt make easier read. in doing found tags seem out of place. may or may not case code provided incomplete. added comments within code initials mf , number 1, 2, , 3. these indicate places believe closing tags out of place in code.

<p></p> <cfif quote.itemdiscount eq 0>     <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="header">     <tr>         <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:left;width:14%">item #</td>         <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:left;width:45%">description</td>         <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:center;width:9%">quantity</td>         <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:right;width:16%">list price</td>         <td style="font-weight:bold ;border-bottom:1px solid #000;text-align:right;width:16%">ext. price</td>     </tr>     </table> <cfelse>     <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="header">     <tr>         <td style="text-align:left;width:14%"></td>         <td style="text-align:left;width:45%"></td>         <td style="text-align:center;width:9%"></td>         <td style="text-align:right;width:16%"></td>         <td style="text-align:right;width:16%"></td>     </tr>     </table>     <br> </cfif> <br /> <cfset subprice = 0> <cfset moduleprice = 0> <cfif quote.itemdiscount eq 0>     <form action="" method="post" name="quotesofar">     <cfloop query="quote">         <cfif quote.partnumber neq "subtotal">             <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="quote">             <tr>             <cfif quote.quantity neq 0>                 <td width="14%" align="left"><font size="-1"><cfoutput>#quote.partnumber#</cfoutput></font></td>                 <td width="45%" align="left"><cfoutput>#quote.description#</cfoutput></td>                 <td width="9%" align="center"><cfoutput>#quote.quantity#</cfoutput></td>                 <td width="16%" align="right"><cfoutput>#dollarformat(quote.price)#</cfoutput></td>                 <td width="16%" align="right"><div align="right"><cfoutput>#dollarformat(quote.extprice)#</cfoutput></div></td>                 <cfset subprice = subprice + quote.extprice>             </cfif>             </tr>             <tr></tr>             <!---</cfif>--->             </table>         <cfelseif quote.partnumber eq "subtotal">             <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0" id="quote">             <tr>                 <td width="14%" align="left"><strong><font size="-1"></font>&nbsp;</strong></td>                 <td width="15%" align="left"><strong><font color="#ff0000" size="-1">module price</font></strong></td>                 <td width="33%" align="left"><strong><cfoutput>#dollarformat(evaluate(subprice-moduleprice))#</cfoutput></strong></font></strong></div></td>                 <td width="12%" align="right"><strong><font color="##ff0000" size="+1">subtotal</font></strong></td>                 <td width="8%" align="center"></td>                 <td width="12%" align="right"><strong><font color="##ff0000" size="+1"><cfoutput>#dollarformat(subprice)#</cfoutput></font></strong></div></td>             </tr>             <tr>             <cfset moduleprice = subprice>             </tr>             <!--- mf 1 - closing table tag should go here --->         </cfif>     </cfloop>     </table> <!--- mf 1 - seems should moved --->     <!--- mf 2 - closing form tag should go here ---> <cfelse>     </form> <!--- mf 2 - seems should moved --->     <form action="" method="post" name="quotesofar">     <cfloop query="quote">         <table table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial';" cellpadding="0" cellspacing="0">         <cfif quote.partnumber neq "subtotal">             <tr>             <cfif quote.quantity neq 0>                 <td width="14%" align="left"><strong><font size="-1"><cfoutput>#quote.partnumber#</cfoutput></font></strong></td>                 <td width="45%" align="left"><cfoutput>#quote.description#</cfoutput></td>                 <td width="9%" align="center"><cfoutput>#quote.quantity#</cfoutput></td>                 <td width="12%" align="right"><cfoutput>#dollarformat(quote.price)#</cfoutput></td>                 <cfif quote.itemdiscount lt 1>                     <td width="8%" align="right"><cfoutput>#evaluate(quote.itemdiscount * 100)#</cfoutput></td>                 <cfelse>                     <td width="8%" align="right"><cfoutput>#evaluate(quote.itemdiscount * 1)#</cfoutput></td>                 </cfif>                 <td width="12%" align="right"><div align="right"><cfoutput>#dollarformat(quote.extprice)#</cfoutput></div></td>                 <cfset subprice = subprice + quote.extprice>             </cfif>             </tr>             <tr>             <td colspan="7" align="left">&nbsp;</td>             </tr>         <!---</cfif>--->         <cfelseif quote.partnumber eq "subtotal">             <tr>                 <td width="14%" align="left"><strong><font size="-1"></font>&nbsp;</strong></td>                 <td width="15%" align="left"><strong><font color="#ff0000" size="-1">module price</font></strong></td>                 <td width="33%" align="left"><strong><cfoutput>#dollarformat(evaluate(subprice-moduleprice))#</cfoutput></strong></font></strong></div></td>                 <td width="12%" align="right"><strong><font color="##ff0000" size="+1">subtotal</font></strong></td>                 <td width="8%" align="center"></td>                 <td width="12%" align="right"><strong><font color="##ff0000" size="+1"><cfoutput>#dollarformat(subprice)#</cfoutput></font></strong></div></td>             </tr>             <tr>                 <cfset moduleprice = subprice>                 <td colspan="7" align="left">&nbsp;</td>             </tr>         </cfif>         </table>     </cfloop>     <!--- mf 3 - closing form tag should go here ---> <!---</cfif>---> </cfif> </form> <!--- mf 3 - seems should moved ---> <cfif quotetrack.discount neq 0>     <table style="width:90%;margin:0 auto;font-size:11px;font-family: 'arial'; border-bottom: 1px solid #000; border-top: 1px solid #000;" cellpadding="0" cellspacing="0">     <tr>         <br>         <td style="text-align:left;font-weight:bold;">subtotal:</td>         <td style="text-align:right;font-weight:bold;"><cfoutput query="totals"><strong>#dollarformat (totals.expr1000)#</strong></cfoutput></td>     </tr>     <cfset cost = totals.expr1000>     <tr>         <td style="text-align:left;font-weight:bold;">less discount(%):</td>         <td style="text-align:right;font-weight:bold;"><cfoutput><strong>#evaluate (quotetrack.discount*100)#</strong>%</cfoutput></td>     </tr>     <cfset inverse = (1-quotetrack.discount)>     <tr>         <td style="text-align:left;font-weight:bold;">&nbsp;</td>         <td style="text-align:right;font-weight:bold;">&nbsp;</td>     </tr>     <tr>         <td style="text-align:left;font-weight:bold;">total:</td>         <td style="text-align:right;font-weight:bold;"><cfoutput>#dollarformat (evaluate(cost * inverse))#</cfoutput></td>     </tr>     </table> <cfelse>     <table width="30%" border="0" align="center">     <tr>         <td align="right"><strong><font color="#ff0000" size="+2">total</font></strong></td>         <td align="right"><cfoutput query="totals"><strong><font color="##ff0000" size="+2">#dollarformat (totals.expr1000)#</font></strong></cfoutput></td>     </tr>     </table> </cfif> <br /> 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -