-
Purpose
This snippet lets you automatically display only the relevant hotel details for the supplier listed on a Purchase Order.
If your hotel_hub custom field contains details for multiple crew or suppliers, this code filters the output to show only the matching entry based on the supplier name in the PO header.
How It Works
Reads the hotel_hub data from the linked opportunity.
Finds the section that starts with the supplier’s name (e.g. Andy Brown).
Displays only that section of text on the Purchase Order document.
Ignores all other entries automatically.
———————————————————
{% assign opportunity = order.sources.first %}
<!-- Hotel section -->
<div class="section notes">
{% assign supplier_name = order.supplier_address_name | strip %}
{% assign hotel_lines = opportunity.hotel_hub | newline_to_br | split: '<br />' %}
{% assign matched_block = "" %}
{% assign current_block = "" %}
{% assign include_block = false %}
{% for line in hotel_lines %}
{% assign clean_line = line | strip %}
{% if clean_line == supplier_name %}
{% assign include_block = true %}
{% assign current_block = clean_line %}
{% elsif clean_line == "" %}
{% assign include_block = false %}
{% endif %}
{% if include_block %}
{% assign matched_block = matched_block | append: clean_line | append: "<br />" %}
{% endif %}
{% endfor %}
{% if matched_block != blank %}
<h4>Hotel Details</h4>
<p>{{ matched_block }}</p>
{% endif %}
</div>
-
Purpose
This snippet allows you to automatically display the Transport Schedule from an Opportunity directly against an item on a Purchase Order.
It’s ideal for courier bookings, haulage suppliers, or external transport providers who only need clear, readable transport instructions without accessing the full job.
The data is pulled straight from the Transport Hub schedule stored on the Opportunity, ensuring the information is always up to date.
How It Works
Reads the linked Opportunity from the Purchase Order.
Pulls the transport_schedule stored against the Opportunity Item.
Converts line breaks so the schedule formats correctly on documents.
Displays the transport schedule inline on the Purchase Order item.
Example Use Case
Courier Purchase Orders
External haulage companies
Driver paperwork
Job-specific transport instructions per item
———————————————————
{% assign opportunity = order.sources.first %}
{{ item.opportunity_cost.asset.opportunity_item.transport_schedule | newline_to_br }}
-
Purpose
This snippet allows you to automatically insert the Transport Hub schedule into a Discussion template on an Opportunity.
It’s ideal for sharing transport details with internal teams and external suppliers, ensuring everyone is working from the same, up-to-date transport plan without copying and pasting.
The data is pulled directly from the Transport Hub on the Opportunity, so any changes made to the schedule are instantly reflected in the discussion content.
How It Works
Reads the Transport Hub data stored on the Opportunity
Pulls the current transport schedule
Converts line breaks so formatting is preserved in the discussion
Inserts the transport schedule directly into the discussion body
Example Use Cases
Internal team communications
External suppliers and haulage partners
Courier and transport coordination
Ops and warehouse briefings
Sharing live transport plans without attachments
———————————————————
{{ opportunity.transport_hub | newline_to_br }}
-
Purpose
This snippet allows you to display all Transport Hub schedules directly on an Opportunity document.
It’s ideal for internal paperwork, driver packs, warehouse prep sheets, and job documents where the full transport plan needs to be clearly visible in one place.
The data is pulled directly from the Transport Hub on the Opportunity, ensuring the document always reflects the latest transport planning without manual updates.
How It Works
Reads the Transport Hub data stored on the Opportunity
Pulls the combined transport schedules
Converts line breaks so formatting is preserved on documents
Displays the full transport schedule inline on the Opportunity document
Example Use Cases
Driver packs
Warehouse preparation sheets
Internal job paperwork
Full transport overview per Opportunity
———————————————————
{{ order.transport_hub | newline_to_br }}
-
Purpose
This snippet allows you to display the Transport Schedule for an individual Opportunity Item directly on an Opportunity document.
It’s ideal when different items on the same job have separate transport requirements, allowing clear, item-specific instructions to be shown without cluttering the document with irrelevant details.
The data is pulled directly from the Transport Hub schedule stored against each Opportunity Item, ensuring transport instructions remain accurate and up to date.
How It Works
Reads the Transport Hub schedule stored on the Opportunity Item
Pulls the item-specific transport_schedule
Converts line breaks so formatting is preserved on documents
Displays the schedule inline against each item
Example Use Cases
Mixed courier and in-house transport on the same job
Item-specific delivery or collection instructions
Warehouse pick lists with transport notes per item
Driver paperwork for split or staged deliveries
———————————————————
{% for item in order.services %}
{{ item.transport_schedule | newline_to_br }}
-
Purpose
This simple edit allows you to hide individual Opportunity Items, groups, and related description rows from client-facing documents.
It is ideal when certain lines should remain internal only, such as backup gear, warehouse-only items, free support items, or anything that might confuse the client if shown on their quote.
The visibility is controlled using the Hide From Quote custom field on the Opportunity Item, meaning the document automatically reflects the setting applied to each item.
How It Works
The document template checks the Hide From Quote field before rendering each line.
If the field is set to Yes, the document simply skips that item when generating the quote, while leaving it fully visible inside the Opportunity for internal use.
How to Add It
Open your Current RMS document template and go to the Body tab.
Find the line in the template that loops through the Opportunity items:
{% for item in order.items %}
Then add the following lines directly underneath it:
{% if item.hide_from_quote == 'Yes' %}
{% continue %}
{% endif %}
So the start of the loop looks like this:
{% for item in order.items %}
{% if item.hide_from_quote == 'Yes' %}
{% continue %}
{% endif %}
-
Purpose
This snippet allows you to display crew schedule information directly on Purchase Order documents using data from Team Hub.
If your items include a crew_schedule custom field, this will format and display it in a clean, readable way on the document, broken down by date, time, and shifts.
How it works
• Reads the crew_schedule data stored against the opportunity item.
• Splits the structured data into days and shifts.
• Formats each entry into a clear, human-readable schedule.
• Displays dates, start/end times, and any shifts.
• Only shows if schedule data exists, otherwise stays hidden.
How to use it
This is important based on how your document is structured
• Add the snippet inside your item loop ({% for item in order.items %})
• Place it after the item description / transport schedule section
• It should sit alongside other item-level details like:
Description
Transport schedule
Notes
• Find this section in your PO template:
{% for item in order.items %}
• Then paste the snippet just before the item.description block
Code Snippet
{% assign crew_raw = item.opportunity_cost.asset.opportunity_item.crew_schedule %}
{% if crew_raw != blank %}
<tr>
<td style="padding-left: {{ item.depth_padding | plus:30 }}px;" colspan="6">
<strong>Crew Schedule</strong><br>
{% assign day_parts = crew_raw | split:'{"date":"' %}
{% for day_part in day_parts offset:1 %}
{% assign day_date = day_part | split:'","shifts":[' | first %}
{% assign pretty_date = day_date | date: "%A, %b %d" | replace: " 0", " " %}
{% assign shifts_raw = day_part | split:'","shifts":[' | last %}
{% assign shift_parts = shifts_raw | split:'{"start":"' %}
{% for shift_part in shift_parts offset:1 %}
{% assign shift_start = shift_part | split:'","end":"' | first %}
{% assign after_end = shift_part | split:'","end":"' | last %}
{% assign shift_end = after_end | split:'","tags":[' | first %}
{% assign tags_blob = after_end | split:'","tags":[' | last | split:']' | first %}
{% assign tags_line = tags_blob | replace:'"','' | replace:',',', ' %}
{{ pretty_date }}, {{ shift_start }} - {{ shift_end }}<br>
{% if tags_line != blank %}
{{ tags_line }}<br>
{% endif %}
<br>
{% endfor %}
{% endfor %}
</td>
</tr>
{% endif %}
-
Purpose
This snippet allows you to display Team Hub crew schedules directly on an Opportunity document.
It’s ideal for internal paperwork, crew call sheets, production packs, and service schedules where the full crew plan needs to be visible against each service item.
How It Works
Reads the Team Hub schedule saved against each service item
Falls back to the service record if no item-level schedule is present
Parses the stored schedule data into dates, shift times, and shift tags
Displays the Team Hub schedule inline beneath each relevant service on the Opportunity document
Example Use Cases
Crew call sheets
Internal operations paperwork
Project manager packs
Per-service crew planning on Opportunity documents
Important Placement
Add this inside your Opportunity services loop, usually inside:
{% for item in order.services %}
and within the service section, usually inside:
{% elsif item.is_service? %}
———————————————————
{% if item.service.service_type_name != "Transport" %}
{% assign crew_raw = item.crew_schedule | strip %}
{% if crew_raw == blank %}
{% assign crew_raw = item.service.crew_schedule | strip %}
{% endif %}
{% if crew_raw != blank and crew_raw contains '{"date":"' and crew_raw contains '{"start":"' %}
<tr>
<td colspan="5" style="padding-left: {{ item.depth_padding | plus:64 }}px;">
<strong>Crew Schedule</strong><br>
{% assign day_parts = crew_raw | split:'{"date":"' %}
{% for day_part in day_parts offset:1 %}
{% assign day_date = day_part | split:'","shifts":[' | first %}
{% assign pretty_date = day_date | date: "%A, %b %d" | replace: " 0", " " %}
{% assign shifts_raw = day_part | split:'","shifts":[' | last %}
{% assign shift_parts = shifts_raw | split:'{"start":"' %}
{% for shift_part in shift_parts offset:1 %}
{% assign shift_start = shift_part | split:'","end":"' | first %}
{% assign after_end = shift_part | split:'","end":"' | last %}
{% assign shift_end = after_end | split:'","tags":[' | first | split:'"}' | first %}
{{ pretty_date }}, {{ shift_start }} - {{ shift_end }}<br>
{% if after_end contains '","tags":[' %}
{% assign tags_blob = after_end | split:'","tags":[' | last | split:']' | first %}
{% assign tags_line = tags_blob | replace:'"','' | replace:',',', ' %}
{% if tags_line != blank %}
{{ tags_line }}<br>
{% endif %}
{% endif %}
<br>
{% endfor %}
{% endfor %}
</td>
</tr>
{% endif %}
{% endif %}