The quick answer
Find the Advanced PDF/HTML template assigned to the sales order’s saved custom form. Add the transaction Department label and value expressions to the existing summary table, then wrap the complete Tax Total row in a populated, nonzero tax-total condition. Save the template and print both a zero-tax and taxable order that use the same form.
This walkthrough starts with a saved sales order whose PDF omits Department and prints Tax Total $0.00. We’ll identify the template the order uses, edit its source, and check both branches of the tax condition. The screenshots use sample data and fictional person and operating-company names.
Before you start
Confirm that Advanced PDF/HTML Templates are enabled and use an Administrator role or another role that can view and edit the relevant transaction form and template. Feature availability, permissions, and form actions vary by account and role. If the feature is unavailable, check Setup → Company → Enable Features with an authorized administrator.
Have two saved sales orders ready on the same custom form: one with a completed zero tax calculation and one with a confirmed nonzero Tax Total. Confirm that Department is populated and, in OneWorld accounts, valid for the transaction’s subsidiary.
In this example, SO-2048 has Tax Total 0.00, SO-2049 has Tax Total 96.00, and both use Wholesale Sales Order. That form uses the Wholesale Sales Order PDF print template.
Tax fields and data types can differ with Legacy Tax, SuiteTax, localization, and third-party tax engines. Confirm that your template’s existing tax row uses the transaction-level ${record.taxtotal} field before applying this example. The condition changes presentation; it doesn’t calculate tax.
01. Confirm the current sales order PDF
Open the saved zero-tax order and confirm its Custom Form, Department, and Tax Total. Use the account’s available Print action and inspect the PDF before editing anything.
The starting PDF for SO-2048 omits Department and shows a complete Tax Total $0.00 row. After the template is saved, refresh or reopen this order before printing it again.
02. Find the print template assigned to the form
Return to the sales order. Open Customize → Customize Form. If your role doesn’t show that action, have an authorized administrator open the saved form’s customization page.
Confirm that the form name matches the Custom Form saved on your order. Under the form’s printing settings, check that Printing Type is Advanced and note the Print Template. Don’t use the Email Template or a print template assigned to another form.
You only need to read this page. Return without saving changes to the transaction form. Before editing the assigned template, confirm whether other forms use it. Duplicate the template with the available template action or retain a copy of its original source so you can restore it if needed.
03. Add Department to the assigned template
Go to Customization → Forms → Advanced PDF/HTML Templates. Find the assigned template and click Edit. Turn on Source Code.
Locate the existing subtotal, tax, or total rows in the source and add Department to that same summary table. Don’t create a separate table unless the intended layout requires one. Copy the structure, column count, colspan values, widths, classes, and alignment from a nearby row, then replace only the label and value expressions.
The demonstrated template uses a two-column summary table, so its added row is:
<tr>
<td>${record.department@label}</td>
<td>${record.department}</td>
</tr>
The @label expression requests the configured field label. The second expression requests the Department value exposed by the transaction template data model. Confirm the rendered label and value in your account.
In this walkthrough, Save and Edit saves the source and keeps the template open. Use the available save action in your account, reopen the template if needed, and confirm that no validation error appears and both expressions remain in the source.
04. Hide the complete zero-value Tax Total row
Find the <tr> that contains the Tax Total label and the exact tax field already used by the template. In this account-specific example, that field is ${record.taxtotal}. Put the opening condition immediately before that row and the closing </#if> immediately after it:
<#if record.taxtotal?has_content
&& record.taxtotal != 0>
<tr id="tax-total">
<td>${record.taxtotal@label}</td>
<td>${record.taxtotal}</td>
</tr>
</#if>
Wrapping the complete row removes both the label and value when the total is zero. The ?has_content check alone isn’t enough when NetSuite supplies a zero value. If your account exposes the field as formatted text or through a different template field, adjust the comparison to the actual data type and field instead of copying this expression unchanged.
Save the template again. Confirm that NetSuite reports no validation or rendering error and that the complete opening and closing condition remains in the saved source. A successful save proves that the template source was accepted; the next two prints prove how each conditional branch renders.
05. Print both orders and verify the result
Print SO-2048 again. Department: Wholesale should now appear, while the entire zero-value Tax Total row should be gone.
Now open SO-2049. Before printing, confirm that its Custom Form is Wholesale Sales Order, its Department is Wholesale, and its saved Tax Total is 96.00. The confirmed form is what ties this order to the same assigned template.
Use the available Print action. The PDF should keep Department: Wholesale and show Tax Total $96.00.
Check both branches
- Same form: both saved orders use the custom form whose assigned template you edited.
- Zero-tax order: Department appears and the complete Tax Total row is absent.
- Taxable order: Department appears and the nonzero Tax Total row remains.
This comparison verifies the presentation logic for these two transactions using the confirmed shared form and template. It doesn’t verify other forms, subsidiaries, tax engines, currencies, transaction types, or the account’s tax calculation.
Common questions
Why does ?has_content still show Tax Total when the value is zero?
?has_content checks whether NetSuite supplied a value. Zero can still be a supplied value, so that test passes. The demonstrated condition also checks record.taxtotal != 0 before printing the row.
Why does the condition need to wrap the complete table row?
The label and amount belong to the same <tr>. Wrapping only the amount can leave an orphaned Tax Total label or an uneven table. Put the opening condition before the row and the closing </#if> after it.
Why might Department still be missing from the PDF?
First check that the saved transaction has a Department. Then confirm that it uses the custom form and print template you edited, and that the Department expressions sit inside the intended summary table. In OneWorld, also check that the Department is valid for the transaction’s subsidiary.
Can every account use record.taxtotal != 0?
No. Use the tax field already present in that template and check the value its data model exposes. Legacy Tax, SuiteTax, localizations, and third-party tax engines can use different fields or value types. A formatted text value may need a different comparison.
Does hiding the row remove tax from the sales order?
No. This FreeMarker condition only controls whether the PDF prints the row. It doesn’t calculate tax, change the transaction, or alter the accounting impact.
Why test a taxable order after the zero-tax result looks right?
The zero-tax order proves that the row can disappear. A taxable order on the same confirmed form proves that the condition still allows a nonzero Tax Total to print. Without that second check, a broken condition could hide the row for every order.