accounting.vat_extract
Extract net supply value and VAT from a gross amount by applying reverse VAT calculation with configurable rate and rounding.
Instructions
공급대가(부가세 포함 금액)에서 공급가액과 부가세를 역산한다. 공급가액 = gross / (1 + rate)를 정수 자리로 rounding(기본 DOWN, 절사) 처리하고 부가세 = gross - 공급가액. rate 기본 0.1, 금액은 Decimal 문자열. 공급가액에서 공급대가를 구하는 순방향 계산에는 vat_add 를 쓴다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rate | No | 0.1 | |
| gross | Yes | ||
| rounding | No | DOWN |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | Yes | ||
| vat | Yes | ||
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) |