> ## Documentation Index
> Fetch the complete documentation index at: https://foliant-help.iforiti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 템플릿의 금액과 통화

> Foliant의 Liquid에서 금액 값은 센트 단위입니다. 금액 필터로 주문 통화 또는 다른 통화로 출력하세요.

Foliant의 Liquid에서 모든 금액 값은 센트 단위의 정수입니다. 주문 합계가 100.00이면 `10000`입니다. Shopify Order Printer와 같은 방식이므로 기존 템플릿도 같은 금액을 출력합니다. 금액을 출력할 때는 항상 금액 필터를 사용하세요. 금액 필터가 값을 100으로 나누고 통화를 붙입니다.

## 금액 필터

| 필터 | 예시 | 출력 결과(스토어 형식 `${{amount}}`) |
| - | - | - |
| `money` | `{{ total_price \| money }}` | `$1,604.20` |
| `money_with_currency` | `{{ total_price \| money_with_currency }}` | `$1,604.20 USD` |
| `money_without_currency` | `{{ total_price \| money_without_currency }}` | `1,604.20` |
| `money_without_trailing_zeros` | `{{ 10000 \| money_without_trailing_zeros }}` | `$100` |
| `money_in` | `{{ amount \| money_in: 'EUR' }}` | 지정한 통화로 표시한 금액 |

* `money`, `money_with_currency`, `money_without_currency`, `money_without_trailing_zeros`는 **주문 통화**를 사용합니다. 따라서 캐나다 달러로 결제한 주문은 CAD로 출력됩니다.
* `money_in`은 주문 통화가 아닌 다른 통화로 금액을 출력합니다. 예를 들어 VAT를 자국 통화로 표시할 수 있습니다: `{{ vat_reporting.tax | money_in: vat_reporting.currency }}`.

## 금액이 출력되는 형식

편집기 상단 줄이나 템플릿 설정 페이지에 있는 템플릿의 **숫자 형식**에 따라 금액 표시 방식이 정해집니다.

| 숫자 형식 | 동작 |
| - | - |
| **스토어 통화 형식** | Shopify 관리자에 설정된 스토어의 통화 형식을 사용합니다. Shopify Order Printer와 같은 방식입니다. |
| **문서 언어 형식** | 문서 언어의 방식대로 금액을 표시합니다. 예를 들어 독일어에서는 `1.234,56 €`로 표시합니다. |

`format_number`는 항상 문서 언어의 구분 기호를 사용합니다. 독일어 문서에서 `{{ 1234.5 | format_number: 2 }}`는 `1.234,50`으로 출력됩니다.

## 계산은 센트 단위로 하기

금액이 센트 단위이므로 먼저 계산하고 마지막에 형식을 적용하세요.

```liquid theme={null}
{% assign balance = total_price | minus: total_paid %}
{% if balance > 0 %}
  {{ 'total_due' | t }}: {{ balance | money }}
{% endif %}
```

금액을 비교할 때도 센트 단위를 사용하세요. `{% if total_price >= 10000 %}`는 100.00 이상을 의미합니다.

## 참고 사항

* 금액 필터는 통화별로 알맞은 소수점 자릿수를 출력합니다. 소수점 세 자리를 쓰는 통화(예: KWD)는 세 자리를 유지합니다.
* money 유형의 메타필드는 센트 단위가 아닙니다. `value`(예: `23.00`)와 `unit`(통화 코드)을 가집니다. [템플릿의 메타필드](https://foliant-help.iforiti.com/ko/template-editor/metafields.md)를 참조하세요.
* 품목 가격은 품목 할인이 적용된 후의 가격입니다. 주문 전체 할인은 `order_level_discounts`에 있습니다. [템플릿의 품목](https://foliant-help.iforiti.com/ko/template-editor/liquid-line-items.md)을 참조하세요.

## 관련 문서

* [주문 객체와 주요 변수](https://foliant-help.iforiti.com/ko/template-editor/liquid-order-variables.md)
* [Liquid 필터](https://foliant-help.iforiti.com/ko/template-editor/liquid-filters.md)
* [날짜, 언어 및 번역](https://foliant-help.iforiti.com/ko/template-editor/liquid-dates-and-languages.md)
* [Liquid의 조건부 콘텐츠](https://foliant-help.iforiti.com/ko/template-editor/liquid-conditional-content.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.