# アプリ「order printer」の税率別の表示について

**URL:** <https://community.shopify.com/t/order-printer/215285>\
**Category:** Shopify アプリ\
**Created:** [May 11, 2023, 2:37am UTC](https://community.shopify.com/t/order-printer/215285 "2023-05-11T02:37:45Z")\
**Posts on this page:** 3\
**Page:** 1

## AI-generated summary

Order Printerアプリで税率表示の形式変更に関する質問と解決。

**問題点:**
- デフォルトのコード `{{ tax_line.rate }}%` では税率が「0.08%」「0.1%」のように小数で表示される
- 希望する表示形式は「8%」「10%」

**解決方法:**
- `{{ tax_line.rate | times:100 | round }}%` というコードに変更
- tax_line.rateを100倍し、小数点を丸めることで整数表示を実現

**結果:**
質問者は提案されたコード修正により問題を解決できた。

<div class="post-metadata">

**Author:** ![kkw01](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kkw01](https://community.shopify.com/u/kkw01)\
**Post date:** [May 11, 2023, 2:37am UTC](https://community.shopify.com/t/order-printer/215285/1 "2023-05-11T02:37:45Z")

</div>

「order printer」で、以下のコードを出力すると、

* * *

{% for tax\_line in tax\_lines %}

{{ tax\_line.rate }}%

{{ tax\_line.price | money }}円

{% endfor %}

* * *

0.08% 100円

0.1% 100円

このように表示されます。

上記の表示を0.08%→税（8%） 0.1%→税（10%）に変更したいのですが、可能でしょうか。

解決策ございましたらご教授いただけませんでしょうか。

よろしくお願いいたします。

---

<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:** [May 11, 2023, 7:57am UTC](https://community.shopify.com/t/order-printer/215285/2 "2023-05-11T07:57:54Z")

</div>

ご質問いただいている、税率の表示を0.08%→税（8%） 0.1%→税（10%）に変更したい件ですが。

記載いただいている、{{ tax\_line.rate }}を100倍し、小数点を丸めることでご希望の数値での表示になるかと思われます。

**下記対象箇所の調整版コード**

```markup
{{ tax_line.rate | times:100 | round }}%

```

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

---

<div class="post-metadata">

**Author:** ![kkw01](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kkw01](https://community.shopify.com/u/kkw01)\
**Post date:** [May 12, 2023, 1:49am UTC](https://community.shopify.com/t/order-printer/215285/3 "2023-05-12T01:49:06Z")

</div>

ありがとうございます。

解決いたしました。
