Requirement:
We need a reference in the Sales Order Advanced PDF template to distinguish whether the order has an invoice posted against it or Partially/Fully fulfilled.
Solution:
We can create a free-form text type field where we will add a summary search which shows the count of applying transactions (type= invoice or Item fulfillments) in the validation and defaulting. We can refer to the count easily in the pdf template.
Note: In the field setup Store Value should be unchecked.