Files
2022-02-17 01:46:24 +00:00

1 line
16 KiB
Plaintext

{"Name":"Customer Quote","Active":true,"Notes":"\n","Roles":49514,"AType":27,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n {{#each ayReportData}}\n <!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n <table>\n <!-- the css to start a new page when a new object -->\n <thead>\n <!--table header will repeat on multiple pages if total thead content is less than 25% of page - IF NOT SHOWING ON 2nd PAGE of WO, is because is too high - note css -->\n\n {{#if ../ayServerMetaData.HasSmallLogo}}\n <!-- this displays if have uploaded small logo -->\n <tr class=\"reporttitle\">\n <th colspan=\"12\" class=\"leftlean\">{{ ayLogo \"small\" }}</th>\n <th colspan=\"4\"></th>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'Quote'}}</th>\n <td colspan=\"4\"> {{Serial}}</td>\n </tr>\n {{else}}\n <!-- else this displays if have do NOT have small logo -->\n <tr class=\"reporttitle\">\n <th colspan=\"12\" class=\"leftlean\">{{../ayServerMetaData.CompanyName}}</th>\n <th colspan=\"4\"></th>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'Quote'}}</th>\n <td colspan=\"4\">{{Serial}}</td>\n </tr>\n {{/if}}\n <!-- this closes this if/else statement -->\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n <tr>\n <th colspan=\"24\" class=\"leftlean\">{{ayT 'Quote'}} prepared for:</th>\n </tr>\n <tr class=\"reporttitle\">\n <td colspan=\"1\"></td>\n <td colspan=\"23\">{{CustomerViz}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"15\">{{Address}}, {{City}}</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'QuotePreparedByID'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{PreparedByViz}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"15\">{{CustomerPhone1Viz}}</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'WorkOrderCustomerReferenceNumber'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{CustomerReferenceNumber}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"14\">{{CustomerEmailAddressViz}}</td>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'WorkOrderInternalReferenceNumber'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{InternalReferenceNumber}}</td>\n </tr>\n <tr>\n <td colspan=\"16\">&nbsp;</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT \"QuoteQuoteRequestDate\"}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{ayDate Requested}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"14\" class=\"leftlean\">{{ayT 'WorkOrderSummary'}}</th>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'QuoteValidUntilDate'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{ayDate ValidUntil}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"22\">{{Notes}} </td>\n <td colspan=\"1\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"22\" class=\"leftlean\">{{ayT 'QuoteIntroduction'}}</th>\n <td colspan=\"1\">&nbsp;</td>\n \n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"22\">{{Introduction}}</td>\n <td colspan=\"1\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n </thead>\n\n <tbody>\n {{#each Items}}\n <tr>\n <th colspan=\"4\" class=\"leftlean\">{{ayT 'WorkOrderItemSummary'}} &#35;{{Sequence}}</th>\n <td colspan=\"20\">{{Notes}}</td>\n </tr>\n <tr>\n <th colspan=\"4\" class=\"leftlean\">{{ayT 'WorkOrderItemTechNotes'}}</th>\n <td colspan=\"20\">{{TechNotes}}</td>\n </tr>\n\n {{#each Units}}\n <tr>\n <td colspan=\"1\"></td>\n <th colspan=\"3\" class=\"leftlean\">{{ayT 'Unit'}}</th>\n <td colspan=\"20\">{{UnitViz}} - {{UnitModelNameViz}}</td>\n </tr>\n {{/each}}\n {{#if Units}}\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n {{/if}}\n\n <tr>\n <td colspan=\"1\"></td>\n <th colspan=\"11\" class=\"leftlean\">{{ayT 'WorkOrderItemList'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemPartQuantity'}}</th>\n <th colspan=\"2\">{{ayT 'Price'}}</th>\n <th colspan=\"2\">{{ayT 'NetPrice'}}</th>\n <th colspan=\"2\">{{ayT 'TaxCodeTaxA'}}</th>\n <th colspan=\"2\">{{ayT 'TaxCodeTaxB'}}</th>\n <th colspan=\"2\">{{ayT 'LineTotal'}}</th>\n </tr>\n\n {{#each Labors}}\n <tr>\n <td colspan=\"1\"></td>\n <td colspan=\"11\">{{ayT 'WorkOrderItemLaborServiceRateID'}}: {{ServiceRateViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ServiceRateQuantity}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency NetViz}}</td>\n {{#if TaxAViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n\n {{#if Labors}}\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n {{/if}}\n\n {{#each Parts}}\n <tr>\n <td colspan=\"1\"></td>\n <td colspan=\"11\">{{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{Quantity}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency NetViz}}</td>\n {{#if TaxAViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n\n {{#if Parts}}\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n {{/if}}\n\n {{/each}}\n </tbody>\n </table>\n\n <table class=\"singlePage\">\n <tfoot>\n <!--footer ONLY displays on last page for each workorder because it is within its own table. if want to display on each page of multi-page workorder, move tfoot back up within the above table and edit above table with class=\"singlePage\" -->\n\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n\n <tr>\n <th colspan=\"12\"></th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemLaborList'}} {{ayT 'NetPrice'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemPartList'}} {{ayT 'NetPrice'}}</th>\n <th colspan=\"1\"></th>\n <th colspan=\"2\" class=\"centerlean\">{{ayT 'TaxCodeTaxA'}} {{ayT 'NetPrice'}}</th>\n <th colspan=\"2\" class=\"centerlean\">{{ayT 'TaxCodeTaxB'}} {{ayT 'NetPrice'}}</th>\n <th colspan=\"3\" class=\"rightlean \"> {{ayT 'Quote'}} {{ayT 'Total'}}</th>\n </tr>\n <tr>\n <td colspan=\"12\"></td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllLaborsNetViz}}</td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllPartsNetViz}}</td>\n <td colspan=\"1\"></td>\n {{#if ThisWOTotalTaxAs}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency ThisWOTotalTaxAs}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if ThisWOTotalTaxBs}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency ThisWOTotalTaxBs}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"3\" class=\"rightlean \">{{ayCurrency ThisWOTotalGrand}}</td>\n </tr>\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n <tr>\n <th colspan=\"24\">Thank you for your business!</th>\n </tr>\n <tr>\n <th colspan=\"24\">If any questions about this price quote, please contact {{../ayServerMetaData.CompanyPhone1}} referencing {{ayT 'Quote'}} {{Serial}}</th>\n </tr>\n </tfoot>\n </table>\n\n {{/each}}\n\n </div>\n</body>\n\n</html>","Style":".singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n.fontpurple {\n color: purple;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData) { \n\t//this function (if present) is called with the report data \n\t//before the report is rendered \n\t//modify data as required here and return it to change the data before the report renders \n\t//see the help documentation for details\n\n\tawait ayGetTranslations([\"Quote\", \"WorkOrderItemPartList\", \"WorkOrderItemLaborList\", \"WorkOrderItemList\", \"QuoteIntroduction\", \"WorkOrderSummary\", \"QuotePreparedByID\", \"WorkOrderInternalReferenceNumber\", \"WorkOrderCustomerReferenceNumber\", \"QuoteDateSubmitted\", \"QuoteDateApproved\", \"QuoteValidUntilDate\", \"QuoteQuoteRequestDate\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemTechNotes\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"Total\", \"WorkOrderItemPartPartID\", \"WorkOrderItemLaborServiceRateID\"]);\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this quote so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this quote so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\n\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS quote's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS quote's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS quote's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS quote in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS quote in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS quote in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS quote in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS quote in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS quote in this report data\n \t \t\t}\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS quote in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS quote in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS quote in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS quote in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS quote in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS quote in this report data\n \t \t\t}\t\t\t\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\n\treturn reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span>&nbsp;</span>","FooterTemplate":"<span style=\"font-size:6pt;width: 100%; text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Printed date:&nbsp;<span class=\"date\"></span></span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">&nbsp;&nbsp;&nbsp;Page&nbsp;<span class=\"pageNumber\"></span>&nbsp;of&nbsp;<span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}