{% if doc.get("serial_and_batch_bundle") %} {% set bundle_print = get_serial_or_batch_nos(doc.serial_and_batch_bundle) %} {{bundle_print}} {%- endif %}