Custom Theme | Excluding a Column | Customer Statement - Unpaid Invoice

We would like to exclude the column of ‘Order Number’ from Customer Statement - Unpaid Invoice. Can anybody suggest, how we can exclude the same.

Earliest response will be highly appreciated.

Try yourself @Rajwani
And If you are not able to Did this than post your best try code and results on the forum and ask for help.

        {% for column in table.columns %}

        {% if column.label != 'Order number' %}
        <td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}">{{ column.label | replace: "Order number", "Fee Name" }}</td>
            {% if column.label == 'Overdue' %}{% assign i = forloop.index0 %}{% endif %}
       {% endif %}
      {% endfor %}

        {% for row in table.rows %}
       
        {% unless row.cells[i].text == '-' %}
                <tr>
                {% for cell in row.cells %}
        {% if column.label == 'Order number' %}{% continue %}{% endif %}
<td class="text-{{ table.columns[forloop.index0].align }} border-start{% if forloop.last == true %} border-end{% endif %}" style="font-size: 8px; padding: 0.1px; {% if table.columns[forloop.index0] %}; width: 0px{% endif %}">   {{ cell.text | newline_to_br }}</td>
                {% endfor %}
        {% endunless %}       
                </tr>
                {% endfor %}

I have already tried it, from header it is removed but from row.cell data unable to fix the code. Hope now you can assist.

{% if column.label == 'Order number' %}
{% assign j = forloop.index0%}
{% continue %}
{% endif%}
        <td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}">{{ column.label | replace: "Order number", "Fee Name" }}</td>
            {% if column.label == 'Overdue' %}{% assign i = forloop.index0 %}{% endif %}
      {% endfor %}

        {% for row in table.rows %}
       
        {% unless row.cells[i].text == '-' %}
                <tr>
                {% for cell in row.cells %}
        {% if forloop.index0 == j %}{% continue %}{% endif %}
<td class="text-{{ table.columns[forloop.index0].align }} border-start{% if forloop.last == true %} border-end{% endif %}" style="font-size: 8px; padding: 0.1px; {% if table.columns[forloop.index0] %}; width: 0px{% endif %}">   {{ cell.text | newline_to_br }}</td>
                {% endfor %}
        {% endunless %}       
                </tr>
                {% endfor %}

But I don’t know why you want to remove order number from the statement. It’s a useful piece of information.

@Ealfardan Thank you for your support. Just to respond on your concern, Yes, Order Number is a useful piece of information and we want to keep it but Reoccurring Invoices does not support this feature, as we have multiple invoices to issue on monthly basis so our step is based on reoccurring invoice, yet we were updating the same through batch update but it increase the changes of error within the team and automation purpose is not met otherwise.

In order to mitigate batch process, we are planning not to include such information which Manager does not support through automation.

For coding, we have tried your suggested codes but it gives some error in L525 for endfor … we reviewed it the same and remove

Codes executed but requirement for excluding Order Number is not achieved yet. I am adding updated codes here for your review and assistance in order to achieve the goal.

  <tbody>

    <td colspan="7" style="padding: 5px 5px; border-right-width: 1px">
   
        <table style="border-bottom-width: 0px ">
            
  {% if column.label == 'Order number' %}
  {% assign j = forloop.index0%}
  {% continue %}
  {% endif%}
    <td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}">{{ column.label | replace: "Order number", "Fee Name" }}</td>
        {% if column.label == 'Overdue' %}{% assign i = forloop.index0 %}{% endif %}

    {% for row in table.rows %}
   
    {% unless row.cells[i].text == '-' %}
            <tr>
            {% for cell in row.cells %}
    {% if forloop.index0 == j %}{% continue %}{% endif %}
 <td class="text-{{ table.columns[forloop.index0].align }} border-start{% if forloop.last == true %} border-end{% endif %}" style="font-size: 8px; padding: 0.1px; {% if table.columns[forloop.index0] %}; width: 0px{% endif %}">  {{ cell.text | newline_to_br }}</td>
            {% endfor %}
    {% endunless %}       
            </tr>
            {% endfor %}

                <tr>
                {% for column in table.columns %}
                <td class="border-start{% if forloop.last == true %} border-end{% endif %}" style="border-bottom-width: 0px">&nbsp;</td>
                {% endfor %}

                </tr>

                <td colspan="7" style="border-top-width: 1px"></td>
    {% assign OverdueTot = 0 %}
                {% for total in table.totals %}
        {% unless total.label == 'Current' or  total.label == 'Total' %}
            {% assign OverdueTot = OverdueTot | plus: total.number %}
        {% endunless %}
 {% endfor %}
                <tr>
                    <td class="text-right" colspan="{{ table.columns | size | minus:1 }}" style="padding: 0.5px;font-size: 8px {% if total.emphasis == true %} ;font-weight: bold{% endif %}"> Total </td>
                    <td class="border-start border-end text-right" style="white-space: nowrap; border-bottom-width: 1px; padding: 0.5px;font-size: 8px {% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ OverdueTot }}</td>
                </tr>

Your inputs are really valuable to us!

The code fragment was missing the first for loop.

This one should work:

{% assign removedCols = 1 %}
{% for column in table.columns %}
    {% if column.label == 'Order number' %}
        {% assign j = forloop.index0%}
        {% assign removedCols = removedCols | plus: 1 %}
        {% continue %}
    {% endif%}
    <td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}">{{ column.label | replace: "Order number", "Fee Name" }}</td>
    {% if column.label == 'Overdue' %}{% assign i = forloop.index0 %}{% endif %}
{% endfor %}

{% for row in table.rows %}
    {% unless row.cells[i].text == '-' %}
        <tr>
            {% for cell in row.cells %}
                {% if forloop.index0 == j %}{% continue %}{% endif %}
                <td class="text-{{ table.columns[forloop.index0].align }} border-start{% if forloop.last == true %} border-end{% endif %}" style="font-size: 8px; padding: 0.1px; {% if table.columns[forloop.index0] %}; width: 0px{% endif %}">   {{ cell.text | newline_to_br }}</td>
            {% endfor %}
        </tr>
    {% endunless %}       
{% endfor %}

Mind that you’d have to also make some adjustments to the number of columns, because they might change. Also, they may not change in some cases so it’d better be dynamic. That’s why I added the variable removedCols that you can use to adjust the columns

2 Likes

@Rajwani, your post is contradictory. Your opening post says:

But now you say:

So what is your issue?

That is because the sales order number is most likely going to be different for every sales invoice. If it were present on a recurring sales invoice template, you would be entering the same sales order for every sales invoice. That would seldom be desirable.

I also wonder why this is an issue. If you do not have any order numbers, the column should not appear.

@Ealfardan Thank you for your support, logic works perfectly…!!!

However, removing column has disrupted our presentation. Is there any way, we don’t effect the alignment.

@Tut Order Number is a meaningful information however Recurring does not support it therefore, we have to Batch Update every month for Order No, Therefore, in order to make it completely automate we may not update Order No onwards, however existing statement includes Order No so it is important to exclude such column from the statement.

It can vary from organization to organization. One large Sales Order can have multiple invoices too.

Replace this:

{{ table.columns | size | minus:1 }}

With this:

{{ table.columns | size | minus: removedCols }}

Thank you for the guidance.

This is the initial display without exlcuding Fee Name. and page alignment is distributed in 3 equal columns.

After adding suggested coding, following is the displayed. This is what, I was referring earlier.

This is confusing. It does not look like any Manager view screen. Also, I thought the discussion was about excluding order number column?

@eko Manager supports, Custom Theme so we have modified the theme accordingly.

Yes, the requirement was to exclude Order number to the reasons stated above. With the support of @Ealfardan it was achieved but now we are struggling for the alignment.

Struggling? Maybe paste the code here with the solution(s) you have tried so far and the result(s)?

Codes are the same as suggested by @eko, for better clarity display before and after is also attached. Please let me know, what else can I share.

Exactly what I asked before, i.e., the code you have edited to remedy the alignment and the result of it. But I guess you haven’t done anything and are simply waiting for @Ealfardan (and not @eko) to do the job for you?

The answer has already been given in this post:

You replaced this only in the totals section, you need to replace it everywhere.

Also, wherever you used table.columns | size in your customization with a different adjustment factor, you need to correct for that accordingly.

That’s not True!!

I definitely respect the support of forum however there are specific instructions too which cannot be shared publicly. Hope you also respect a matter of confidentiality.

Both the gentle representative have supported us on different occasion and we are also thankful for it.

Here is the desire complete code, just removing specific information.

     <td colspan="7" style="padding: 5px 5px; border-right-width: 1px">
        <table style="margin-bottom: 1px"><tr>
        <td style="font-weight: bold; font-size: 11px">School</td>
        {% if business.logo != null %}<td class="text-right"><img src="{{ business.logo }}" style="max-height: 50px; max-width: 50px" /></td>{% endif %}
        </tr>
       </table>
       
        <div  style="font-weight: bold; font-size: 8px; text-align: center">    Bank </div>
        <div  style="font-weight: bold; font-size: 8px; text-align: center">  A/C No. </div>
        <div  style="font-weight: bold; font-size: 7px; text-align: center; padding-top: 2px; padding-bottom: 2px" >  Campus :  
             {% for field in custom_fields %}
             {% if field.label != 'Project Name' %}{% continue %}{% endif %}
             {{ field.text }}
             {% endfor %}
        </div>

        <table style="margin-bottom: 2px; border-bottom-width: 1px "><tr>
        <td class="text-left" style="font-weight: bold; font-size: 8px"> FEE VOUCHER </td>
        <td class="text-right" style="font-weight: bold; font-size: 8px"> BANK COPY </td>
        </tr>
       </table>

        <table style="margin-bottom: 4px; border-bottom-width: 2px; padding: 5px "><tr>
        <td class="text-left" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Issue Date : </td>
        <td class="text-center" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Due Date : </td>
        <td class="text-center" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Validity Date : </td>
        </tr>

        <tr>
        <td class="text-left" style="font-size: 8px" style="padding: 1px">      

          <div> 01-03-2022 </div>
        </td>
        <td class="text-center" style="font-size: 7px; padding: 1px">      

           <div> 15-03-2022 </div>           
        </td>

        <td class="text-center" style="font-size: 7px" style="padding: 1px">      
            <div> 25-03-2022 </div>                 
        </td>
        </tr>
        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="margin-bottom: 4px; border-bottom-width: 2px;border-bottom-width: 4px; padding: 5px; border-end"> Name : {{ recipient.name }} 
        </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px; margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> CID : 
            {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
        </td>

        </tr>
        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px;margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> Father Name : 
            {% for field in custom_fields %}
            {% if field.label != 'Father Name' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
            </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px;margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> GRN : 
            {% for field in custom_fields %}
            {% if field.label != 'GRN' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
        </td>
        </tr>
        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px"> Class : 
            {% for field in custom_fields %}
            {% if field.label != 'Class' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}     
        </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px"> Section : 
            {% for field in custom_fields %}
            {% if field.label != 'Section' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}     
        
        </td>
        </tr>
       </table>
            <div style="font-size: 12px; font-weight: bold; margin-bottom: 1px">{{ description }}             
           </div>
            <div style="font-size: 5px; font-weight: bold; margin-top: 2px"> MONTHLY STANDARD TUITION FEE : 
            </div>
        </td>
     <td colspan="7" style="padding: 5px 5px; border-right-width: 1px">
        <table style="margin-bottom: 1px"><tr>
        <td style="font-weight: bold; font-size: 11px">School</td>
        {% if business.logo != null %}<td class="text-right"><img src="{{ business.logo }}" style="max-height: 50px; max-width: 50px" /></td>{% endif %}
        </tr>
       </table>
     
        <div  style="font-weight: bold; font-size: 8px; text-align: center">    Bank </div>
        <div  style="font-weight: bold; font-size: 8px; text-align: center">  A/C No. </div>
        <div  style="font-weight: bold; font-size: 7px; text-align: center; padding-top: 2px; padding-bottom: 2px" >  Campus :  
             {% for field in custom_fields %}
             {% if field.label != 'Project Name' %}{% continue %}{% endif %}
             {{ field.text }}
             {% endfor %}
        </div>

        <table style="margin-bottom: 2px; border-bottom-width: 1px "><tr>
        <td class="text-left" style="font-weight: bold; font-size: 8px"> FEE VOUCHER </td>
        <td class="text-right" style="font-weight: bold; font-size: 8px"> SCHOOL COPY </td>
        </tr>
       </table>

        <table style="margin-bottom: 4px; border-bottom-width: 2px; padding: 5px "><tr>
        <td class="text-left" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Issue Date : </td>
        <td class="text-center" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Due Date : </td>
        <td class="text-center" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Validity Date : </td>
        </tr>

        <tr>
        <td class="text-left" style="font-size: 8px" style="padding: 1px">      
 
          <div> 01-03-2022 </div>
        </td>
        <td class="text-center" style="font-size: 7px; padding: 1px">      

           <div> 15-03-2022 </div>           
        </td>

        <td class="text-center" style="font-size: 7px" style="padding: 1px">      

           <div> 25-03-2022 </div>                 
        </td>
        </tr>

        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="margin-bottom: 4px; border-bottom-width: 2px;border-bottom-width: 4px; padding: 5px; border-end"> Name : {{ recipient.name }} 
        </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px; margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> CID : 
            {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}

        </td>

        </tr>

        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px;margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> Father Name : 
            {% for field in custom_fields %}
            {% if field.label != 'Father Name' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
            </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px;margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> GRN : 
            {% for field in custom_fields %}
            {% if field.label != 'GRN' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}

        </td>

        </tr>

        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px"> Class : 
            {% for field in custom_fields %}
            {% if field.label != 'Class' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}     
        </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px"> Section : 
            {% for field in custom_fields %}
            {% if field.label != 'Section' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}     
        
        </td>
        </tr>

       </table>


            

        
            <div style="font-size: 12px; font-weight: bold; margin-bottom: 1px">{{ description }}
           </div>
            <div style="font-size: 5px; font-weight: bold; margin-top: 2px"> MONTHLY STANDARD TUITION FEE : 
            </div>

 

        
        </td>

     <td colspan="7" style="padding: 5px 5px">
        <table style="margin-bottom: 1px"><tr>
        <td style="font-weight: bold; font-size: 11px">School</td>
        {% if business.logo != null %}<td class="text-right"><img src="{{ business.logo }}" style="max-height: 50px; max-width: 50px" /></td>{% endif %}
        </tr>
       </table>
       
        <div  style="font-weight: bold; font-size: 8px; text-align: center">    Bank </div>
        <div  style="font-weight: bold; font-size: 8px; text-align: center">  A/C No. </div>
        <div  style="font-weight: bold; font-size: 7px; text-align: center; padding-top: 2px; padding-bottom: 2px" >  Campus :  
             {% for field in custom_fields %}
             {% if field.label != 'Project Name' %}{% continue %}{% endif %}
             {{ field.text }}
             {% endfor %}
        </div>

        <table style="margin-bottom: 2px; border-bottom-width: 1px "><tr>
        <td class="text-left" style="font-weight: bold; font-size: 8px"> FEE VOUCHER </td>
        <td class="text-right" style="font-weight: bold; font-size: 8px"> PARENT COPY </td>
        </tr>
       </table>

        <table style="margin-bottom: 4px; border-bottom-width: 2px; padding: 5px "><tr>
        <td class="text-left" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Issue Date : </td>
        <td class="text-center" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Due Date : </td>
        <td class="text-center" style="font-weight: bold; font-size: 7px" style="padding: 2px"> Validity Date : </td>
        </tr>

        <tr>
        <td class="text-left" style="font-size: 8px" style="padding: 1px">      
 
          <div> 01-03-2022 </div>
        </td>
        <td class="text-center" style="font-size: 7px; padding: 1px">      

           <div> 15-03-2022 </div>           
        </td>

        <td class="text-center" style="font-size: 7px" style="padding: 1px">      
            <div> 25-03-2022 </div>                 
        </td>
        </tr>

        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="margin-bottom: 4px; border-bottom-width: 2px;border-bottom-width: 4px; padding: 5px; border-end"> Name : {{ recipient.name }} 
        </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px; margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> CID : 
            {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}

        </td>

        </tr>

        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px;margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> Father Name : 
            {% for field in custom_fields %}
            {% if field.label != 'Father Name' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
            </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px;margin-bottom: 4px;border-bottom-width: 1px; border-bottom-width: 2px; padding: 5px"> GRN : 
            {% for field in custom_fields %}
            {% if field.label != 'GRN' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}

        </td>

        </tr>

        <tr>
        <td colspan="2" class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px"> Class : 
            {% for field in custom_fields %}
            {% if field.label != 'Class' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}     
        </td>

        <td class="text-left" style="font-weight: bold; font-size: 10px" style="padding: 2px"> Section : 
            {% for field in custom_fields %}
            {% if field.label != 'Section' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}     
        
        </td>
        </tr>

       </table>


            

        
            <div style="font-size: 12px; font-weight: bold; margin-bottom: 1px">{{ description }}
           </div>
            <div style="font-size: 5px; font-weight: bold; margin-top: 2px"> MONTHLY STANDARD TUITION FEE : 
            </div>



        
        </td>



    </tr>

   </thead>

  <tbody>

    <td colspan="7" style="padding: 5px 5px; border-right-width: 1px">
   
        <table style="border-bottom-width: 0px ">
           {% assign removedCols = 1 %} 
        {% for column in table.columns %}
               {% if column.label == 'Order number' %}
    {% assign j = forloop.index0%}
    {% assign removedCols = removedCols | plus: 1 %}
    {% continue %}
               {% endif%}
<td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}">{{ column.label | replace: "Order number", "Fee Name" }}</td>
           {% if column.label == 'Overdue' %}{% assign i = forloop.index0 %}{% endif %}
       {% endfor %}

    {% for row in table.rows %}
               {% unless row.cells[i].text == '-' %}
    <tr>
        {% for cell in row.cells %}
            {% if forloop.index0 == j %}{% continue %}{% endif %}
            <td class="text-{{ table.columns[forloop.index0].align }} border-start{% if forloop.last == true %} border-end{% endif %}" style="font-size: 8px; padding: 0.1px; {% if table.columns[forloop.index0] %}; width: 0px{% endif %}">   {{ cell.text | newline_to_br }}</td>
        {% endfor %}
    </tr>
               {% endunless %}       
                {% endfor %}
            
                <tr>
                {% for column in table.columns %}
                <td class="border-start{% if forloop.last == true %} border-end{% endif %}" style="border-bottom-width: 0px">&nbsp;</td>
                {% endfor %}
                </tr>

                <td colspan="7" style="border-top-width: 1px"></td>
    {% assign OverdueTot = 0 %}
                {% for total in table.totals %}
        {% unless total.label == 'Current' or  total.label == 'Total' %}
            {% assign OverdueTot = OverdueTot | plus: total.number %}
        {% endunless %}


           {% endfor %}
                <tr>
                    <td class="text-right" colspan="{{ table.columns | size | minus: removedCols }}" style="padding: 0.5px;font-size: 8px {% if total.emphasis == true %} ;font-weight: bold{% endif %}"> Total </td>
                    <td class="border-start border-end text-right" style="white-space: nowrap; border-bottom-width: 1px; padding: 0.5px;font-size: 8px {% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ OverdueTot }}</td>
                </tr>

                <tr>
                <td class="text-right" colspan="{{ table.columns | size | minus: removedCols }}" style="padding: 0.5px;font-size: 10px {% if total.emphasis == true %} ;font-weight: bold{% endif %}"> Late Fee after Due Date
                </td>
                {% for total in table.totals %}
                    {% if total.label != 'Total' %}{% continue %}{% endif %}
                    {% assign Monthly_Fine = '200' %}
                    <td class="border-start border-end text-right" style="white-space: nowrap; border-bottom-width: 1px; padding: 0.5px;font-size: 10px {% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ 200 }}</td>
                {% endfor %}
                </tr>

        </table>
    
            <table>
                    
                {% for field in custom_fields %}
                    {% if field.label != 'Parent Instructions' %}{% continue %}{% endif %}
                        <div style="text-align: justify; font-weight: bold; font-size: 8px">{{ field.label }} </div>
                        <div style=" font-size: 8px;text-align: justify">1. …… <br> 10. For <b>ONLINE PAYMENT</b> through Mobile/Internet banking or ATM, use <b>1BILL Invoice ID: 000
            {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %} 
      </b> under <b>‘BILL PAYMENT’ </b>option. <br> - Payment charges apply | Rs. 20 (upto Rs. 10,000 voucher) | Rs. 65 (over Rs. 10,000 voucher).
                  <div style="text-align: center; font-weight: bold; font-size: 8px"> 1BILL ID: 000
            {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}

         </div>
         </div>
               {% endfor %}

        <tr >
        <tr>
        <div style="font-size: 5px; text-align: left"> [Note: Fee Names | ADM: Admission | AC: Annual Charges | TF: Tuition Fee | SD: Security Deposit | BCS: Books, Copies & Stationaries]. </div>
        </tr >
        <div style="font-size: 7px; font-weight:bold; text-align: center"> These funds are intended for the School  account number 0000-0000 held with City.</div>
        </tr>
    
    </table>

    
    </td>
    
  
    <td colspan="7" style="padding: 5px 5px; border-right-width: 1px">
   
        <table style="border-bottom-width: 0px ">
 {% assign removedCols = 1 %}
 {% for column in table.columns %}
{% if column.label == 'Order number' %}
    {% assign j = forloop.index0%}
    {% assign removedCols = removedCols | plus: 1 %}
    {% continue %}
{% endif%}
<td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}">{{ column.label | replace: "Order number", "Fee Name" }}</td>
               {% if column.label == 'Overdue' %}{% assign i = forloop.index0 %}{% endif %}
           {% endfor %}

 {% for row in table.rows %}
               {% unless row.cells[i].text == '-' %}
    <tr>
        {% for cell in row.cells %}
            {% if forloop.index0 == j %}{% continue %}{% endif %}
            <td class="text-{{ table.columns[forloop.index0].align }} border-start{% if forloop.last == true %} border-end{% endif %}" style="font-size: 8px; padding: 0.1px; {% if table.columns[forloop.index0] %}; width: 0px{% endif %}">   {{ cell.text | newline_to_br }}</td>
        {% endfor %}
    </tr>
{% endunless %}       
           {% endfor %}
            
                <tr>
                {% for column in table.columns %}
                <td class="border-start{% if forloop.last == true %} border-end{% endif %}" style="border-bottom-width: 0.5px">&nbsp;</td>
                {% endfor %}
                </tr>
                <td colspan="7" style="border-top-width: 1px"></td>
    {% assign OverdueTot = 0 %}
                
                {% for total in table.totals %}
              {% unless total.label == 'Current' or  total.label == 'Total' %}
            {% assign OverdueTot = OverdueTot | plus: total.number %}
        {% endunless %}


 {% endfor %}
                <tr>
                    <td class="text-right" colspan="{{ table.columns | size | minus: removedCols }}" style="padding: 0.5px;font-size: 10px {% if total.emphasis == true %} ;font-weight: bold{% endif %}"> Total </td>
                    <td class="border-start border-end text-right" style="white-space: nowrap; border-bottom-width: 1px; padding: 0.5px;font-size: 10px {% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ OverdueTot }}</td>
                </tr>
                <tr>
                <td class="text-right" colspan="{{ table.columns | size | minus: removedCols }}" style="padding: 0.5px;font-size: 10px {% if total.emphasis == true %} ;font-weight: bold{% endif %}"> Late Fee after Due Date </td>
                {% for total in table.totals %}
                    {% if total.label != 'Total' %}{% continue %}{% endif %}
                    {% assign Monthly_Fine = '200' %}
                    <td class="border-start border-end text-right" style="white-space: nowrap; border-bottom-width: 1px; padding: 0.5px;font-size: 10px {% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ 200 }}</td>
                {% endfor %}
                </tr>

        </table>        

            <table>
                    
                {% for field in custom_fields %}
                    {% if field.label != 'Parent Instructions' %}{% continue %}{% endif %}
                        <div style="text-align: justify; font-weight: bold; font-size: 8px">{{ field.label }} </div>
                        <div style=" font-size: 8px;text-align: justify">1. …… <br> 10. For <b>ONLINE PAYMENT</b> through Mobile/Internet banking or ATM, use <b>1BILL Invoice ID: 000

            {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
         </b> under <b>‘BILL PAYMENT’ </b>option. <br> - Payment charges apply | Rs. 20 (upto Rs. 10,000 voucher) | Rs. 65 (over Rs. 10,000 voucher).
                  <div style="text-align: center; font-weight: bold; font-size: 8px"> 1BILL ID: 000                 {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
          </div>
         </div>

                {% endfor %}

        <tr >
        <tr>
        <div style="font-size: 5px; text-align: left"> [Note: Fee Names | ADM: Admission | AC: Annual Charges | TF: Tuition Fee | SD: Security Deposit | BCS: Books, Copies & Stationaries]. </div>
        </tr >
        <div style="font-size: 7px; font-weight:bold; text-align: center"> These funds are intended for the School  account number 0000-0000 held with City.</div>
        </tr>
    
    </table>
    
    </td>
  
    <td colspan="7" style="padding: 5px 5px">
   
        <table style="border-bottom-width: 0px ">
            
         {% assign removedCols = 1 %}
         {% for column in table.columns %}
             {% if column.label == 'Order number' %}
                 {% assign j = forloop.index0%}
                 {% assign removedCols = removedCols | plus: 1 %}
    {% continue %}
             {% endif%}
<td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}">{{ column.label | replace: "Order number", "Fee Name" }}</td>
{% if column.label == 'Overdue' %}{% assign i = forloop.index0 %}{% endif %}
         {% endfor %}

         {% for row in table.rows %}
             {% unless row.cells[i].text == '-' %}
    <tr>
        {% for cell in row.cells %}
            {% if forloop.index0 == j %}{% continue %}{% endif %}
            <td class="text-{{ table.columns[forloop.index0].align }} border-start{% if forloop.last == true %} border-end{% endif %}" style="font-size: 8px; padding: 0.1px; {% if table.columns[forloop.index0] %}; width: 0px{% endif %}">   {{ cell.text | newline_to_br }}</td>
        {% endfor %}
    </tr>
{% endunless %}       
         {% endfor %}
            
                <tr>
                {% for column in table.columns %}
                <td class="border-start{% if forloop.last == true %} border-end{% endif %}" style="border-bottom-width: 0.5px">&nbsp;</td>
                {% endfor %}
                </tr>
                <td colspan="7" style="border-top-width: 1px"></td>
    {% assign OverdueTot = 0 %}
                
                {% for total in table.totals %}
        {% unless total.label == 'Current' or  total.label == 'Total' %}
            {% assign OverdueTot = OverdueTot | plus: total.number %}
        {% endunless %}
           

        {% endfor %}
                <tr>
         <td class="text-right" colspan="{{ table.columns | size | minus: removedCols }}" style="padding: 0.5px;font-size: 10px {% if total.emphasis == true %} ;font-weight: bold{% endif %}"> Total </td>
              <td class="border-start border-end text-right" style="white-space: nowrap; border-bottom-width: 1px; padding: 0.5px;font-size: 10px {% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ OverdueTot }}</td>
                </tr>

                <tr>
                <td class="text-right" colspan="{{ table.columns | size | minus: removedCols }}" style="padding: 0.5px;font-size: 10px {% if total.emphasis == true %} ;font-weight: bold{% endif %}"> Late Fee after Due Date </td>
                {% for total in table.totals %}
                    {% if total.label != 'Total' %}{% continue %}{% endif %}
                    {% assign Monthly_Fine = '200' %}
                    <td class="border-start border-end text-right" style="white-space: nowrap; border-bottom-width: 1px; padding: 0.5px;font-size: 10px {% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ 200 }}</td>
                {% endfor %}
                </tr>

        </table>
    
            <table>
                    
                {% for field in custom_fields %}
                    {% if field.label != 'Parent Instructions' %}{% continue %}{% endif %}
                        <div style="text-align: justify; font-weight: bold; font-size: 8px">{{ field.label }} </div>
                        <div style=" font-size: 8px;text-align: justify">1. ………. <br> 10. For <b>ONLINE PAYMENT</b> through Mobile/Internet banking or ATM, use <b>1BILL Invoice ID: 000
             {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
           </b> under <b>‘BILL PAYMENT’ </b>option. <br> - Payment charges apply | Rs. 20 (upto Rs. 10,000 voucher) | Rs. 65 (over Rs. 10,000 voucher).
                  <div style="text-align: center; font-weight: bold; font-size: 8px"> 1BILL ID: 000                 
         {% for field in custom_fields %}
            {% if field.label != 'CID' %}{% continue %}{% endif %}
            {{ field.text }}
            {% endfor %}
          </div>
         </div>
                {% endfor %}

        <tr >
        <tr>
        <div style="font-size: 5px; text-align: left"> [Note: Fee Names | ADM: Admission | AC: Annual Charges | TF: Tuition Fee | SD: Security Deposit | BCS: Books, Copies & Stationaries]. </div>
        </tr >
        <div style="font-size: 7px; font-weight:bold; text-align: center"> These funds are intended for the School  account number 0000-0000 held with City.</div>
        </tr>
    
    </table>
    
    </td>
<tr>
  <td sytle="border-right-width:1px"> 
     <tr>
        {% for column in table.columns %}
        <td class="text-{{ column.align }}  style="font-weight: solid;font-size: 6px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}"> </td>
         {% endfor %}
        
         {% for column in table.columns %}
        <td class="text-{{ column.align }}  style="font-weight: solid;font-size: 6px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}"> </td>
        {% endfor %}
       
         {% for column in table.columns %}
        <td class="text-{{ column.align }}  style="font-weight: solid;font-size: 6px ;padding: 0.5px; border-bottom-width: 1px; border-top-width: 1px{% if column.nowrap %}; width: 0px{% endif %}"> </td>
        {% endfor %}
      
    </tr>

</td>

         <tr>
        <td colspan="7">
            {% if emphasis.text != null and emphasis.positive %}
            <div style="text-align: center; margin-top: 40px"><span style="color: #006400; border-width: 5px; border-color: #006400; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div>
            {% endif %}

            {% if emphasis.text != null and emphasis.negative %}
            <div style="text-align: center; margin-top: 40px"><span style="color: #FF0000; border-width: 5px; border-color: #FF0000; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div>
            {% endif %}
        </td>
    </tr>
  
</tbody>
</table>
1 Like

I got an idea from you code to replace everywhere did the same.

I hope now with complete codes forum team including you would be able to support more effectively. Sorry for inconvenience and appreciate your time and input!

1 Like

You left out the adjustment for the blank row before the totals. :grin:

When I said replace, I assumed that would copy the theme to a text editor and do a find and replace and not scan the code manually.

Anyway, that’s an honest mistake and as they say, you live and learn.

1 Like