<Orders>
    <UpdateOrder>
        <Function>2</Function>
        <ErrorLevel>2</ErrorLevel>
        <ReferenceNumber>{{ reference_number }}</ReferenceNumber>
        <CheckNumber>{{ ticket_number }}</CheckNumber>
        {%- if sub_ticket_number %}
        <SubCheckNumber>{{sub_ticket_number}}</SubCheckNumber>
        {%- endif %}
        <Check>
            <CheckHeader>
               {%- if terminal_number %}
               <TerminalNumber>{{ terminal_number }}</TerminalNumber>
               {%- endif %}
            </CheckHeader>
            <DeleteDiscount>
                <DeletionSerialNumber>{{discount_serial_number}}</DeletionSerialNumber>
            </DeleteDiscount>
        </Check>
    </UpdateOrder>
</Orders>