# Order Printerの「うち消費税合計」に税率が異なる商品をそれぞれ計算して表示させたい

**URL:** <https://community.shopify.com/t/order-printer/229480>\
**Category:** Shopify アプリ\
**Created:** [July 3, 2023, 9:19am UTC](https://community.shopify.com/t/order-printer/229480 "2023-07-03T09:19:40Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

Order Printerで納品書兼領収書を作成する際、軽減税率8%と通常税率10%の商品が混在しているにもかかわらず、「うち消費税合計」が一律10%で計算されてしまう問題が報告されています。

**現状:**
- 販売商品の大半が軽減税率8%対象
- Order Printer上で消費税が正しく表示されず、支払い詳細の数字が合わない
- 質問者は税率ごとに正しく計算・表示させるコード修正方法を求めている

**提案された解決策:**
Qcoltd社の小坂氏から、Shopifyの「税の優先設定」が未設定の可能性が指摘されました。この設定がないと全体金額に対し10%で計算されるとのこと。

**追加調査:**
質問者は既に「税の優先設定」を設定済みと回答したものの、依然として10%で計算される状態が続いています。現在の情報だけでは原因特定が困難なため、Qcoltd社はコラボレーターアクセスを通じた管理画面の確認を提案しており、問題解決に向けた詳細調査が進行中です。

<div class="post-metadata">

**Author:** ![shin\_66](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@shin\_66](https://community.shopify.com/u/shin_66)\
**Post date:** [July 3, 2023, 9:19am UTC](https://community.shopify.com/t/order-printer/229480/1 "2023-07-03T09:19:40Z")

</div>

Order Printerのテンプレートをカスタマイズして納品書 兼 領収書を作成しています。

 ![納品書.png](https://canada1.discourse-cdn.com/shopifyforum/original/3X/5/7/57f706a8bf42a81103842fb7ffebf6a6d0e4e8f8.png)

販売商品は、

①軽減税率対象の消費税8%

②通常10％

の税率が異なる商品があり、販売商品のほとんどが税率8％の商品です。

Order Printer上ではデフォルトの仕様なのか分かりませんが、一律税率10％の計算で表示されてしまっているため、【お支払い詳細】の「うち消費税合計」の数字が合いません。

税率が8%と10％のどちらの商品でも「うち消費税合計」を正しい計算で表示させることはできるのでしょうか。

どのようにコードを修正すれば対応できるのかをお教えいただきたいです。

ご注文詳細とお支払い詳細の現在のコード

```auto
<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>

```

```auto

<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>

```

---

<div class="post-metadata">

**Author:** ![Qcoltd](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/qcoltd/32/900_2.png) [@Qcoltd](https://community.shopify.com/u/Qcoltd)\
**Post date:** [July 4, 2023, 2:27am UTC](https://community.shopify.com/t/order-printer/229480/2 "2023-07-04T02:27:12Z")

</div>

ご質問いただいています、Order Printerで軽減税率商品を含んだ商品の消費税合計が異なる件ですが、ShopifyのOrder Printerで、軽減税率商品を含んだ商品の消費税合計が異なる場合、『税の優先設定』がされていない可能性があります。

この設定がされていないと、全体の金額に対し消費税が10％で計算されることがあります。軽減税率の設定方法についてはShopifyの紹介ページをご参照ください。

[https://www.shopify.com/jp/blog/zouzei-shopify](https://www.shopify.com/jp/blog/zouzei-shopify)

また、Shopifyで『税の優先設定』を設定し、ご提示いただいたソースを元にOrder Printerで確認した結果、『SamplePlroduct』が10％（消費税：182円）、『テストマカロン』が8％（消費税：185円×2）で、消費税：552円となり正常に表示しているようです。

 ![Qcoltd_0-1688437530600.png](https://canada1.discourse-cdn.com/shopifyforum/original/4X/7/f/e/7feb17f50bde1f59f6e41f3850b5f34b594fc661.png)

ご参考まで。  
(キュー小坂)

---

<div class="post-metadata">

**Author:** ![shin\_66](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@shin\_66](https://community.shopify.com/u/shin_66)\
**Post date:** [July 4, 2023, 2:49am UTC](https://community.shopify.com/t/order-printer/229480/3 "2023-07-04T02:49:40Z")

</div>

株式会社Q

小坂様

ご丁寧にご回答頂き、ありがとうございます。

ご教示頂きました『税の優先設定』については、すでに設定済みとなるのですが、それでもやはり全体の金額に対し消費税が10％で計算されてしまいます。

 ![orderprinter.png](https://canada1.discourse-cdn.com/shopifyforum/original/3X/2/8/286f2d9f7d7176771ecc36ce1a8678b94925426c.png)

---

<div class="post-metadata">

**Author:** ![Qcoltd](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/qcoltd/32/900_2.png) [@Qcoltd](https://community.shopify.com/u/Qcoltd)\
**Post date:** [July 4, 2023, 3:33am UTC](https://community.shopify.com/t/order-printer/229480/4 "2023-07-04T03:33:34Z")

</div>

@shin_66 様

ご連絡いただきました、税の優先適用が設定されている場合は、消費税も分割して計算されると思われますので、現状いただいていいる情報だけでは、原因を突き止めることが出来かねます。

確実に原因が究明できるかは明言できませんが、コラボレーターアクセスを頂き、御社の管理画面を拝見することができるともう少し状況の確認ができるかもしれません。

コラボレーターアクセスを許可いただける場合は、プライベートメッセージにて、御社ShopifyのURLをお送りください、また、コラボレーターリクエストコードを設定されている場合はそちらのコードも合わせていただければと思います。

コラボレーターリクエストをお送りさせていただきます。

(キュー小坂)
