Adding a 4th column to order printer invoice template to show the line total

Give this a shot:


      {% for line_item in order.line_items %}
        
      {% endfor %}
      
      {% for discount in order.discounts %}
      
      {% endfor %}
      
     {% if order.shipping_address %}
    
  {% endif %}
      
      {% if order.net_payment != order.total_net_amount %}
        
      {% endif %}
      {% if order.total_refunded_amount > 0 %}
        
      {% endif %}
      {% if order.net_payment != order.total_net_amount %}
        
      {% endif %}
    <table>

    
      <tr>

        <th>

Qty

</th>

        <th>

Item

</th>

        <th>

Price/Pc

</th>

        <th>

Line Total

</th>

      </tr>

    
    <tr>

          <td>

{{ line_item.quantity }}

</td>

          <td>

{{ line_item.title }}

</td>

          <td>

            {% if line_item.original_price != line_item.price %}
              ~~{{ line_item.original_price | money }}~~
            {% endif %}
            {{ line_item.price | money }}
          

</td>

          <td>

            {{ line_item.final_line_price | money }}
          

</td>

        </tr>
<tr>

        <td colspan="3">

Subtotal:

</td>

        <td>

{{ order.subtotal_price | money }}

</td>

      </tr>
<tr>

        <td colspan="3">

Includes discount: {% if discount.code %}"{{ discount.code }}"{% endif %}

</td>

        <td>

{{ discount.savings | money }}

</td>

      </tr>
<tr>

        <td colspan="3">

Tax:

</td>

        <td>

{{ order.tax_price | money }}

</td>

      </tr>
<tr>

      <td colspan="3">

        {% if order.shipping_methods[0].title contains "pickup" %}
          Customer Pickup:
        {% else %}
          Shipping | {{ order.shipping_methods[0].title }}:
        {% endif %}
      

</td>

      <td>

{{ order.shipping_price | money }}

</td>

    </tr>
<tr>

        <td colspan="3">

**Total:**

</td>

        <td>

**{{ order.total_price | money }}**

</td>

      </tr>
<tr>

          <td colspan="3">

Total Paid:

</td>

          <td>

{{ order.net_payment | money }}

</td>

        </tr>
<tr>

          <td colspan="3">

Total Refunded:

</td>

          <td>

{{ order.total_refunded_amount | money }}

</td>

        </tr>
<tr>

          <td colspan="3">

**Outstanding Amount:**

</td>

          <td>

**{{ order.total_price | minus: order.net_payment | money }}**

</td>

        </tr>

  </table>
2 Likes