Order Printerのテンプレートをカスタマイズして納品書 兼 領収書を作成しています。
販売商品は、
①軽減税率対象の消費税8%
②通常10%
の税率が異なる商品があり、販売商品のほとんどが税率8%の商品です。
Order Printer上ではデフォルトの仕様なのか分かりませんが、一律税率10%の計算で表示されてしまっているため、【お支払い詳細】の「うち消費税合計」の数字が合いません。
税率が8%と10%のどちらの商品でも「うち消費税合計」を正しい計算で表示させることはできるのでしょうか。
どのようにコードを修正すれば対応できるのかをお教えいただきたいです。
ご注文詳細とお支払い詳細の現在のコード
<h5 style="margin: 0 0 5px 0;">ご注文詳細</h5>
<table class="table-tabular" style="margin: 0 0 1px 0;">
<thead>
<tr>
<th style="border-right: 1px solid black;font-size: 10px"}>商品名</th>
<th style="border-right: 1px solid black; text-align: center;font-size: 10px">数量</th>
<th style="border-right: 1px solid black; text-align: center;font-size: 10px">税込<br />単価</th>
{% if show_line_item_taxes %}
<th style="border-right: 1px solid black; text-align: center;font-size: 10px">税込<br />価格</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
<tr>
<td style="border-right: 1px solid black;font-size: 10px"><b>{{ line_item.title }}</b></td>
<td style="border-right: 1px solid black; text-align: center;font-size: 10px">{{ line_item.quantity }}</td>
<td style="border-right: 1px solid black;font-size: 10px">
{% if line_item.original_price != line_item.price %}
<s>{{ line_item.original_price | money }}</s>
{% endif %}
{{ line_item.price | money }}
</td>
{% if show_line_item_taxes %}
<td style="border-right: 1px solid black;font-size: 10px">
{{ line_item.quantity | times: line_item.price | money }}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<h5 style="margin: 0 0 5px 0;">お支払詳細</h5>
<table class="table-tabular" style="margin: 0 0 5px 0;font-size: 10px">
<tr>
<td><strong>小計(税込):</td>
<td style="text-align: right; padding-right: 1em;font-size: 10px">{{ subtotal_price | money }}</td>
</tr>
{% for discount in discounts %}
<tr>
<td>Includes discount "{{ discount.code }}"</td>
<td style="text-align: right; padding-right: 1em;font-size: 10px">{{ discount.savings | money }}</td>
</tr>
{% endfor %}
<tr>
<td><strong>うち消費税合計: </td>
<td style="text-align: right; padding-right: 1em;font-size: 10px">{{ tax_price | money }}</td>
</tr>
{% if shipping_address %}
<tr>
<td><strong>配送料:</td>
<td style="text-align: right; padding-right: 1em;font-size: 10px">{{ shipping_price | money }}</td>
</tr>
{% endif %}
<tr>
<td><strong>合計金額(税込):</strong></td>
<td style="text-align: right; padding-right: 1em;font-size: 10px"><strong>{{ total_price | money }}</strong></td>
</tr>
{% if total_paid != total_price %}
{% endif %}
<tr>
</table>


