<div><div><div><div><div><div><div><div><div><div><div><style>p { margin: 0; }span.fr-emoticon.fr-emoticon-img { background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle; } span.fr-emoticon { font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0; } blockquote { border-left: solid 2px #5e35b1; color: #5e35b1; margin-left:0; padding-left:5px;}blockquote blockquote{ border-color: #00bcd4; color: #00bcd4;}blockquote blockquote blockquote{ border-color: #43a047; color: #43a047;} table.grid{ border-collapse: collapse;} table.grid td, table.grid th { border: 1px solid #ddd;} .fr-fic.fr-dib{ display: block; margin: 5px auto;}.fr-fic.fr-dib.fr-fir{ text-align: right; margin: 5px 0 5px auto;}.fr-fic.fr-dib.fr-fil{ text-align: left; margin: 5px auto 5px 0;}.fr-fic.fr-dii{ float: none; margin: 5px auto;}.fr-fic.fr-dii.fr-fil{ float: left; margin: 5px auto;}.fr-fic.fr-dii.fr-fir{ float: right; margin: 5px auto;}img.fr-dib.fr-fir { margin-right: 0; text-align: right;}img.fr-dib.fr-fil { margin-left: 0; text-align: left;}img.fr-dib { margin: 5px auto; display: block; float: none;}img.fr-bordered { box-sizing: content-box; border: solid 5px #CCC;}img.fr-shadow { box-shadow: 10px 10px 5px 0px #cccccc;}img.fr-rounded { border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;}</style><div><div><p><span style="font-size: 11pt;"><strong>In this guide we will cover:</strong></span></p><p><span style="font-size: 11pt;"><strong>- Adding a Report to a PDF Template</strong></span></p><p><span style="font-size: 11pt;"><strong>- Filtering reports for a specific entity</strong></span></p><p><br></p><p><br></p><p><span style="font-size: 11pt;">PDF templates are used to apply set formatting to various entities in Halo.</span></p><p><span style="font-size: 11pt;">The following entities can also have reporting data added to their template:</span></p><p><span style="font-size: 11pt;"><br></span></p><ul><li><span style="font-size: 11pt;">Tickets</span></li><li><span style="font-size: 11pt;">Quotations</span></li><li><span style="font-size: 11pt;">Sales Orders</span></li><li><span style="font-size: 11pt;">Purchase Orders</span></li><li><span style="font-size: 11pt;">Invoices </span></li><li><span style="font-size: 11pt;">Agreements </span></li><li><span style="font-size: 11pt;">Assets</span></li></ul><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 14pt;"><strong>Adding a Report to a PDF Template</strong></span></p><p><span style="font-size: 11pt;">First you will need to choose the report you would like to appear on your chosen template. To do this head to Configuration > Reporting > PDF Templates, here you can change the entity you are viewing templates for on the top left.</span></p><p><br></p><p><span style="font-size: 11pt;">To change the entity you are viewing select the drop down and choose another entity. </span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImMzNGU2MDA0LWJjYjAtNGI5MS04MjliLWRiMDQ1ZGVjZGZlNiJ9.r1l-kWG3bCpieYn9G5gQZqXyPv1ZF8ADPTHgT6K4q5o" class="fr-fic fr-fil fr-dib" style="width: 510px;"></span></p><p><span style="font-size: 10pt;"><strong>Fig 1. Template Entity Selection</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">Now select the template you would like to edit, once inside the template, under the details tab, you will need to set which report you would like to be visible on the template. Select 'Add' on the table to add a new report. </span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImFjYTg4MWZiLTkyMWQtNDI2YS1hNzFkLTQwNjEwOGIwMTEzZSJ9.f6OPzSUOXhrBTQE-_TihAxPKRmIwczMcNXC5m1PwZyI" class="fr-fic fr-fil fr-dib" style="width: 534px;"></span></p><p><span style="font-size: 10pt;"><strong>Fig 2. Report selection Table</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">Now you will be prompted to search and select the report you would like to add, you can search either by report name, or report ID. Once selected your chosen report will appear in the table, and the variable for the report will be given. </span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA0MDJjODBkLWU1MjYtNDM0NS04M2M0LWFmYjA4YWNlZTI4ZSJ9.WFb5fnDSl2MKaZdh6K3VgJ16i7fhTwV6DkJBn-PNS68" class="fr-fic fr-fil fr-dib" style="width: 931px;"></span></p><p><span style="font-size: 10pt;"><strong>Fig 3. Report Variable</strong></span></p><p><span style="font-size: 11pt;"><strong> </strong></span></p><p><span style="font-size: 11pt;">Now the report has been chosen and the variable is available, we need to edit the template pages to include this variable. Head to the 'Pages' tab and add a new page.</span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImE3YWM2NzYzLTRlZGYtNDBhOS05ZGUzLTNhNDc3NzAyOGJkNCJ9.81We9fhqUr7pXMwA0i_3c4ApoTnznyxfYX94xT_MHPg" class="fr-fic fr-fil fr-dib" style="width: 914px;"></span></p><p><span style="font-size: 10pt;"><strong>Fig 4. Adding a new page to the template</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">When adding the page the editor screen will appear. By default the HTML from the 'Main Page' will be copied over into the new page, remove any information that you do not want to appear on the second 'report' page. To have report data pull through we need to format the data to be in table form, and give it a title.</span></p><p><br></p><p><span style="font-size: 11pt;">Here is some basic formatting you can use to copy and paste into your template HTML:</span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><br></span></p><p id="isPasted"><span style="white-space: pre; font-size: 11pt;"> </span><span style="font-size: 11pt;"><h1><strong><em>REPORTNAMEHERE</em></strong></h1></span></p><p><span style="white-space: pre; font-size: 11pt;"> </span><span style="font-size: 11pt;"><div></span></p><p><span style="white-space: pre; font-size: 11pt;"> </span></p><p><span style="white-space: pre; font-size: 11pt;"> </span><span style="font-size: 11pt;"></div></span></p><p><span style="white-space: pre; font-size: 11pt;"> </span><span style="font-size: 11pt;"><div style="margin-top:30px"></span></p><p><span style="white-space: pre; font-size: 11pt;"> </span><span style="font-size: 11pt;"><table class="detail-table"></span></p><p><span style="white-space: pre; font-size: 11pt;"> <strong> </strong></span><span style="font-size: 11pt;"><em><strong>$REPORT123DATA</strong></em></span></p><p><span style="white-space: pre; font-size: 11pt;"> </span><span style="font-size: 11pt;"></table></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 10pt;"><strong>Fig. 5 Example HTML formatting for report table</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">If you are using the above, you will need to replace 'REPORTNAMEHERE' with the title of your report and replace '$REPORT123DATA' with the variable of the report you want to pull through. </span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">Once set ensure you save the HTML on the page you are editing, then you can use the 'Preview Print' function to see what the template will look like with the report data.</span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImJjNjQxNGQ4LTI5NjktNDMyYi05MTQ1LWUzMWE3MTg3Y2Q0MCJ9.pfY-R14KRfFtz2F4DeO3RjJtYMchZgQpqNxKgq3mf_k" class="fr-fic fr-fil fr-dib" style="width: 687px;"></span></p><p><span style="font-size: 10pt;"><strong>Fig 6. Preview Print function</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">Now when this template is applied to an entity, the report data will appear on the PDF. If any changes are made to the report, this will automatically update the report on the template, including if any filters are applied to the report. </span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 14pt;"><strong>Filtering Reports For a Specific entity</strong></span></p><p><span style="font-size: 11pt;">If most of your reports are data overviews, showing data for various customers/suppliers/assets etc. you may want the report that shows on the PDF to be filtered so it only shows the data for the invoice/purchase order/sales order/customer etc. it is on. This can be done by adding a filter to the report using a $-variable. We will work through this with an example. </span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 12pt;"><strong>Example 1</strong></span></p><p><span style="font-size: 11pt;">I have a report I would like to appear on all my quotes, this report shows a summary of all the outstanding quotes in my Halo. However, at the moment the report shows all quote details across all customers, I would like it to just show the quote details of the quote the template is being applied to. </span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">To do this I will need to add the following line to my report script:</span></p><p><span style="font-size: 11pt;"><br></span></p><div style="color: #000000;background-color: #fffffe;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;" id="isPasted"><span style="color: rgb(0, 0, 255); font-size: 11pt;">where</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> QHid</span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> $QUOTEID </span></div><p><span style="font-size: 11pt;"><br></span></p><p><span style="color: rgb(0, 0, 0); font-size: 11pt;">This will filter my report so that when a PDF for this quote is generated it will only show data for the quote that PDF is for. Note that this query requires the report to use the 'quotationheader' table as the data source, or this table be joined onto the report. </span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="color: rgb(0, 0, 0); font-size: 11pt;">The variable used to filter the report in this example is $QUOTEID, this will change based on the entity your report/template relates to. The variable used to filter the report can be found on the template itself, above the reports table, see <strong>Fig 7</strong>. </span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="color: rgb(0, 0, 0); font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA2ZGM4YTc5LTg4MzYtNDg5ZC1iYWZjLWU3Mjc2MzlkMzkxYiJ9.YtKO9qFHAp6hZ-bwmV7KfoVyXqAx0sFNkMECXwxGV-U" class="fr-fic fr-fil fr-dib" style="width: 835px;"></span></p><p><span style="font-size: 10pt;"><strong>Fig 7. Variable that can be used to filter the report on the template </strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 12pt;"><strong>Example 2</strong></span></p><p><span style="font-size: 11pt;">I have a report I would like to appear on all my invoices, this report shows all the outstanding invoices for all my customers. However, I would like this to only show the outstanding invoices for the customer the invoice is for. At the moment my report looks as shown in <strong>Fig 8</strong>.</span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZlZGU5MjA2LWY2MjctNDNlYS04Mjc2LTk3MmZkYWNjYmY4NyJ9.kkNYjvAaIPgfbQgUdNnkZ9sHBL52nua-b_sCtYHDhw8" class="fr-fic fr-fil fr-dib" style="width: 839px;"></span></p><p><span style="font-size: 10pt;"><strong>Fig 8. Outstanding invoices report for all customers</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><strong>To do this I will need to add the following query to my script:</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><div style="color: #000000;background-color: #fffffe;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;" id="isPasted"><span style="color: rgb(119, 136, 153); font-size: 11pt;">join</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> site </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">on</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihsitenumber </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> Ssitenum</span></div><p><span style="font-size: 11pt;"><br></span><span style="color: rgb(0, 0, 255); font-size: 11pt;">WHERE</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> Ssitenum </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> (</span><span style="color: rgb(0, 0, 255); font-size: 11pt;">SELECT</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> usite </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">FROM</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> users </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">WHERE</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> uid </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> (</span><span style="color: rgb(0, 0, 255); font-size: 11pt;">SELECT</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihuid </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">FROM</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> invoiceheader </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">WHERE</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihid </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> $InvoiceID))</span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="color: rgb(0, 0, 0); font-size: 11pt;">This query filters the report to only show outstanding invoices for the customer linked to the invoice the report appears on.</span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">When you add this query to your report in the reporting suite it will pull through no data, this is expected as the report is not linked to a specific invoice with a customer yet. After I add the report to a template, and preview this on an invoice in my Halo instance I can see the report is being filtered by customer. In <strong>Fig 9</strong> you can see how the report looks after the filter is applied, it is showing all the invoices in the report for the customer the invoice is for. See <strong>Fig A1 in appendix </strong>for the whole report script used here. </span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg2MDQ2MGUyLTVjYWItNDRhNy1hYmZiLTQzMTI1YjAxZjgwYSJ9.6NMJVHEkB8VJl_iYV4i6B0NThFSaat5YTz_24a9CToI" class="fr-fic fr-fil fr-dib" style="width: 929px;"></span></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjcyZmM1MDEzLTY5ZDItNDZlMC04NGIzLTQ4ZjU3ZGNmZmJjZiJ9.sICDcJEkRhe-RA4T2w6opwKbOtgNaG4wZOFyMymnnLs" class="fr-fic fr-fil fr-dib" style="width: 929px;"></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 10pt;"><strong>Fig 9. Invoice template with report being filtered by customer</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">The example SQL queries in this guide can be used as a base for a report filter, but note that they will need to be amended based on your report and the entity.</span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 14pt;"><strong>Appendix</strong></span></p><p><span style="font-size: 12pt;"><strong>Figure A1 - SQL Script used for report 'Accounts report-Outstanding invoices'</strong></span></p><p><span style="font-size: 11pt;"><br></span></p><div style="color: #000000;background-color: #fffffe;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;" id="isPasted"><span style="color: rgb(0, 0, 255); font-size: 11pt;">select</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> <br> (</span><span style="color: rgb(0, 0, 255); font-size: 11pt;">select</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> IHname </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">from</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> invoiceheader </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">where</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihid</span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">idihid)</span><span style="color: rgb(255, 0, 0); font-size: 11pt;">'Client'</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">,<br> (</span><span style="color: rgb(0, 0, 255); font-size: 11pt;">select</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihid </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">from</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> invoiceheader </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">where</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihid</span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">idihid )</span><span style="color: rgb(255, 0, 0); font-size: 11pt;">'InvoiceNumber'</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">,<br> (</span><span style="color: rgb(0, 0, 255); font-size: 11pt;">select</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> IHInvoice_date </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">from</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> invoiceheader </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">where</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihid</span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">idihid)InvoiceDate, <br> IDItem_ShortDescription </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">as</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> </span><span style="color: rgb(255, 0, 0); font-size: 11pt;">'Item'</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> , idqty_order </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">as</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> </span><span style="color: rgb(255, 0, 0); font-size: 11pt;">'Quantity'</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ,<br> idunit_price </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">as</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> </span><span style="color: rgb(255, 0, 0); font-size: 11pt;">'UnitPrice'</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ,<br> </span><span style="color: rgb(199, 0, 199); font-size: 11pt;">round</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">(IDqty_order</span><span style="color: rgb(119, 136, 153); font-size: 11pt;">*</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">idunit_price,</span><span style="color: rgb(9, 134, 88); font-size: 11pt;">2</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">) </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">as</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> </span><span style="color: rgb(255, 0, 0); font-size: 11pt;">'LineTotal'</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">from</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> invoicedetail<br> </span><span style="font-size: 11pt;"><br></span><span style="color: rgb(119, 136, 153); font-size: 11pt;">join</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> invoiceheader </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">on</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihid</span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;">idihid<br></span><span style="color: rgb(119, 136, 153); font-size: 11pt;">join</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> site </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">on</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihsitenumber </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> Ssitenum<br></span><span style="font-size: 11pt;"><br></span><span style="color: rgb(0, 0, 255); font-size: 11pt;">WHERE</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> Ssitenum </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> (</span><span style="color: rgb(0, 0, 255); font-size: 11pt;">SELECT</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> usite </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">FROM</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> users </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">WHERE</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> uid </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> (</span><span style="color: rgb(0, 0, 255); font-size: 11pt;">SELECT</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihuid </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">FROM</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> invoiceheader </span><span style="color: rgb(0, 0, 255); font-size: 11pt;">WHERE</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> ihid </span><span style="color: rgb(119, 136, 153); font-size: 11pt;">=</span><span style="color: rgb(0, 0, 0); font-size: 11pt;"> $InvoiceID))</span></div><p><br></p></div></div></div></div></div></div></div></div></div></div></div></div></div>