I sell hardware and almost always sell large quantities of a single line item. I am currently migrating to the new order printer app and need to modify the invoice template to not only show the price per piece, but also the total price for that line item. The product table on my invoices currently look like this:
I’d like to have the “Price” column be shifted to the left and become “Price/Pc” and in it’s place have another column that is titled “Line Total” that shows the total price for each line item (essentially QTY x Price/Pc).
As a follow-up question, I’d also like to add vertical lines on the table that separate the columns of the table but can’t seem to figure that out.
The code for that table currently looks like this:
{% 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
</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>
</tr>
<tr>
<td colspan="2">
Subtotal:
</td>
<td>
{{ order.subtotal_price | money }}
</td>
</tr>
<tr>
<td colspan="2">
Includes discount: {% if discount.code %}"{{ discount.code }}"{% endif %}
</td>
<td>
{{ discount.savings | money }}
</td>
</tr>
<tr>
<td colspan="2">
Tax:
</td>
<td>
{{ order.tax_price | money }}
</td>
</tr>
<tr>
<td colspan="2">
{% 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="2">
**Total:**
</td>
<td>
**{{ order.total_price | money }}**
</td>
</tr>
<tr>
<td colspan="2">
Total Paid:
</td>
<td>
{{ order.net_payment | money }}
</td>
</tr>
<tr>
<td colspan="2">
Total Refunded:
</td>
<td>
{{ order.total_refunded_amount | money }}
</td>
</tr>
<tr>
<td colspan="2">
**Outstanding Amount:**
</td>
<td>
**{{ order.total_price | minus: order.net_payment | money }}**
</td>
</tr>
</table>
Any help would be greatly appreciated! Thanks ahead of time.
