You can use the following variable to show only the internal notes in Worksheet Template.
- is_internal_note?
Here is an example of how you can modify the default Worksheet Template to distinguish between internal notes and public notes that the customer can see.
Default Code
{% if order.show_notes_on_worksheet %}
{% if order.production_notes.size > 0 %}
<div id="header_order_notes">
<h3>Customer Notes</h3>
{% for note in order.production_notes %}
<div id="customer_order_notes">
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
Custom Code
Add/replace the code in red to the default code shown above as follows:
{% if order.show_notes_on_worksheet %}
{% if order.production_notes.size > 0 %}
<div id="header_order_notes">
{% for note in order.production_notes %}
<div id="customer_order_notes">
{% if (note.is_internal_note?) %}
<h3>Internal Notes</h3>
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
{% else %}
<h3>Customer Notes</h3>
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
Comments
0 comments
Please sign in to leave a comment.