Event Hire Software quote documentsHireHop has a very powerful document engine, and even though it is powerful, it is very easy to use and enables you to make amazing looking documents.

Documents are all standard HTML documents, and fully support CSS and JavaScript, even when HireHop converts them to a PDF.

There are numerous standard templates available, and every template can be customised when you are a paying HireHop subscriber.

Document Types

A document will only be available in certain places and in certain circumstances within HireHop, for example a Job Quote document will only appear when you are in a job, and not when in Stock Management or a Project.  Another example is a job invoice document that will only appear when an authorised invoice is selected in the job’s Billing tab.  If the invoice is not authorised, the invoice document will not appear.

Document Templates

In Settings->Documents, you can add a new template document.  All template documents have a padlock on the line, so when you edit one, it creates a copy as new document.  Template documents (the ones with padlocks) are fine to delete as you can always easily add them again.  Documents without the padlock icon are custom documents and cannot be retrieved once you delete them, so it is advised to keep backups.

Editing a Document

HireHop does have an inbuilt HTML editor, however this is very basic and it is recommended to use the “Source” view as much as possible.

HireHop documents have merge fields which are prefilled by HireHop when you print or email a document.  The list of fields and explanation on how to use them can be found at https://myhirehop.com/modules/docmaker/fields.php.

Interfacing With The API

Instead or as well as using merege fields in a document, documents in HireHop can also talk with the HireHop API, and already has the appropriate cookies set.  Please note that this will not work for shared link documents due to security reasons.  HireHop documents can also communicate with third party APIs and even load JavaScript frameworks.

As an example of a document getting its data using the API, copy the code from the document at https://myhirehop.com/docs/job_info.html, and paste it into a job document.  The output is not very interesting, it is just a dump of data received from the server using the API.

You can also post data in a document, which is what the signature request document does.  Another example is that when you print or email a quote document, adding the following code into the quote document will automatically create an archive.

	// Save the supplying list as a quote once the document has finished loading
	window.onload = function() {
		var http = new XMLHttpRequest(),
		    job_id = document.getElementById("number").textContent,
		    now_str = (new Date()).toLocaleDateString(),
		    params = "job=" + job_id + "&desc=" + encodeURIComponent("Quote sent - " + now_str);
		http.open("POST", "/php_functions/archive_insert.php");
		http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

Documents as PDFs

HireHop uses two engines to render documents as PDFs, being Chromium, which is used by Google Crome and Microsoft Edge browsers to render web pages on your computer, or WebKit which is the base for Apple Safari.  WebKit is far older and not maintained anymore, and does not support HTML5 as well as Chromium, however it is a lot faster when creating PDF documents due to its simplicity.

Document Stationery

When printing or emailing PDF documents with HireHop, you can add stationery for the document to be overlaid onto.  Stationery is uploaded as PDF files in Depot Management, and is applicable to each depot (including virtual depots).

The stationery pages get added to each applicable page of a document, and the last stationery page is then repeated for all remaining document pages.  As an example, with a one page stationery document, it will be placed behind every page of the document.  If the stationery is a two page PDF, the first page of the stationery will appear behind page one of the document, and the second page behind page two, and then any other subsequent document page.