Odoo 税务计算方式详解:税种组合、固定税、百分比税及自定义公式
税务计算
税务计算 {#taxes/computation}
Tax Computation(税务计算)字段决定税额与其计税基数之间的关系。可用的选项如下:
Group of Taxes <taxes/computation/group-of-taxes>:多个其他税的组合Fixed <taxes/computation/fixed>:固定金额Percentage of Price <taxes/computation/percentage-of-price>:税前销售价格的百分比Percentage of Price Tax Included <taxes/computation/percentage-of-price-tax-included>:含税总额的百分比Custom Formula <taxes/computation/python-code>:自定义、用户定义的公式
Group of taxes {#taxes/computation/group-of-taxes}
该税是多个子税的组合。可以按任意顺序添加任意数量的税。
:::: important ::: title 重要 :::
请确保税的顺序正确,因为显示顺序决定了应用顺序,可能会影响税务计算,尤其是当一个税 影响后续税的基数 <taxes/base-subsequent> 时。 ::::
Fixed {#taxes/computation/fixed}
该税在默认货币中有固定金额。每单位金额保持不变,且不随销售价格变化。
计算公式为
$\text{tax amount} = \text{fixed tax amount} \times \text{quantity}$。
::: example
产品的销售价格为 $1000,应用了 $10 的 Fixed(固定)税。结果如下:
-------------------------------------------------
Product sales Price without Tax Total
price tax
------------- ------------- ---------- ----------
1,000 1,000 10 1,010.00
-------------------------------------------------:::
Percentage of price {#taxes/computation/percentage-of-price}
税率是 不含税 小计的百分比。
具体的税务计算取决于 Included in Price <taxes/included-in-price>(是否计入价格)字段的设置。
:::::: tabs .. tab:: Tax-excluded
如果 Included in Price 为 Tax Excluded(税前),计算公式为
$\text{tax amount} = \text{sales price} \times \text{tax rate}$。
::: example
产品的销售价格为 $1000,应用了 10% Percentage of Price(税前百分比)税,且 Included in Price 为 Tax Excluded。结果如下:
-------------------------------------------------
Product sales Price without Tax Total
price tax
------------- ------------- ---------- ----------
1,000 1,000 100 1,100.00
-------------------------------------------------:::
::: tab Tax-included :::
如果 Included in Price 为 Tax Included(税后),计算公式为
$\text{tax amount} = \text{sales price} \times \frac{\text{tax rate}}{1 + \text{tax rate}}$。
::: example
产品的销售价格为 $1000,应用了 10% Percentage of Price(税后百分比)税,且 Included in Price 为 Tax Included。结果如下:
-------------------------------------------------
Product sales Price without Tax Total
price tax
------------- ------------- ---------- ----------
1,000 909.09 90.91 1,000.00
-------------------------------------------------::: ::::::
Percentage of price tax included {#taxes/computation/percentage-of-price-tax-included}
:::: important ::: title 重要 :::
此税务计算很少使用,仅在某些国家(如巴西、玻利维亚)以 含税总额的百分比 报价时才有意义。若要从含税价格计算税额,建议使用 Percentage of Price(税前百分比)并将 Included in Price 设置为 Tax Included。
::::
税率是 含税 总额的百分比。
具体的税务计算同样取决于 Included in Price 设置。
:::::: tabs .. tab:: Tax-excluded
如果 Included in Price 为 Tax Excluded,计算公式为
$\text{tax amount} = \text{sales price} \times \frac{\text{tax rate}}{1 - \text{tax rate}}$。
::: example
产品的销售价格为 $1000,应用了 10% Percentage of Price Tax Included(税前含税百分比)税,且 Included in Price 为 Tax Excluded。结果如下:
-------------------------------------------------
Product sales Price without Tax Total
price tax
------------- ------------- ---------- ----------
1,000 1,000 111.11 1,111.11
-------------------------------------------------注意,按税前价格计算的实际税率为
$\frac{111.11}{1000} = 11.111%$。
:::
::: tab Tax-included :::
如果 Included in Price 为 Tax Included,计算公式为
$\text{tax amount} = \text{sales price} \times \text{tax rate}$。
::: example
产品的销售价格为 $1000,应用了 10% Percentage of Price Tax Included(税后含税百分比)税,且 Included in Price 为 Tax Included。结果如下:
-------------------------------------------------
Product sales Price without Tax Total
price tax
------------- ------------- ---------- ----------
1,000 900 100 1,000.00
-------------------------------------------------注意,按税前价格计算的实际税率为
$\frac{100}{900} = 11.111%$。
:::
::::::
Custom formula {#taxes/computation/python-code}
:::: important ::: title 重要 :::
如果税可以表示为产品数量的倍数,建议使用 Fixed(固定)税,而不是 Custom Formula(自定义公式)税。
::::
:::: note ::: title 注意 :::
使用 Custom Formula 税前,需要 安装 Define Taxes as Python Code([account_python_tax])模块。
::::
对于 Custom Formula 税,税额按照 Formula(公式)字段中定义的 Python 表达式计算。该表达式可使用以下标记:
- 变量:
price_unit:产品单价base:计税基数,可能与price_unit不同(取决于是否已有其他税先被应用)quantity:产品数量product:产品记录,可访问其字段
- 整数和浮点数
- 允许的运算符和函数:
(、)、+、-、*、/、,、<、>、<=、>=、and、or、None、min、max
::: example
产品的销售价格为 $1000,使用 Custom Formula 税,公式为 min(base, 500) * 0.10 + max(base - 500, 0) * 0.20。结果如下:
-------------------------------------------------
Product sales Price without Tax Total
price tax
------------- ------------- ---------- ----------
1,000 1,000 150 1,150.00
-------------------------------------------------:::
Included in price {#taxes/included-in-price}
:::: tip ::: title 提示 :::
若要为公司统一设置默认值,请进入 会计 --> 配置 --> 设置,在 税务 部分将 价格 设为 Tax Excluded(税前)或 Tax Included(税后)。发票生成后此设置不可更改。
::::
Default(默认)表示遵循公司全局默认设置。Tax Excluded(税前)表示税额不计入销售价格,税务计算将在销售价格之上额外计算税额。Tax Included(税后)表示税额已计入销售价格,系统会把销售价格拆分为不含税基数和税额。该方式适用于多数国家的 B2C 销售(价格常以含税方式报价)。
::: example
产品的销售价格为 $1000,应用 10% Percentage of Price 税,且 Included in Price 为 Tax Included。结果如下:
-------------------------------------------------
Product sales Price without Tax Total
price tax
------------- ------------- ---------- ----------
1,000 909.09 90.91 1,000.00
-------------------------------------------------:::
:::: note ::: title 注意 :::
关于 B2B 与 B2C 客户的税前/税后价格配置,请参考 B2B_B2C 文档。
::::
Affect base of subsequent taxes {#taxes/base-subsequent}
此设置控制同一产品行上多个税之间的相互影响。
开启后,本税的税额会计入后续税的计税基数(前提是后续税也启用了 taxes/base-affected 设置)。因此,后续税的基数为“不含税基数 + 本税税额”。
:::::: tabs .. tab:: Tax-excluded
如果 启用 Affect base of subsequent taxes 且 Included in Price 为 Tax Excluded,后续启用了 Base affected by preceding taxes 的税将基于 原始销售价格 + 本税税额 的修改后价格。
::: example
产品的销售价格为 $1000,应用 10% Percentage of Price 税,Included in Price 为 Tax Excluded,且 Affect base of subsequent taxes 开启。随后任何启用了 Base affected by preceding taxes 的税将基于修改后价格 $1100 计算。
:::
::: tab Tax-included :::
如果 启用 Affect base of subsequent taxes 且 Included in Price 为 Tax Included,后续启用了 Base affected by preceding taxes 的税仍基于 原始销售价格 计算。
::: example
产品的销售价格为 $1000,应用 10% Percentage of Price 税,Included in Price 为 Tax Included,且 Affect base of subsequent taxes 开启。后续税仍基于原始价格 $1000 计算。
:::
::::::
如果此设置 关闭,本税的税额不会计入任何后续税的基数。
:::::: tabs .. tab:: Tax-excluded
Affect base of subsequent taxes 关闭且 Included in Price 为 Tax Excluded 时,后续启用了 Base affected by preceding taxes 的税仍基于 原始销售价格。
::: example 同上情形,后续税仍基于原始价格 $1000 计算。 :::
::: tab Tax-included :::
Affect base of subsequent taxes 关闭且 Included in Price 为 Tax Included 时,后续启用了 Base affected by preceding taxes 的税将基于 原始销售价格 - 本税税额 的修改后价格。
::: example
产品的销售价格为 $1000,应用 10% Percentage of Price 税,Included in Price 为 Tax Included,且 Affect base of subsequent taxes 关闭。后续税基于修改后价格 $909.09 计算。
:::
::::::
此设置在同一产品行上应用多个税时(无论通过 税种组合 还是直接在产品行上添加多个税)都会生效。
:::: note ::: title 注意 :::
税的应用顺序仅取决于它们在 税务列表 中的排列顺序,而非添加到产品行的顺序。若要修改顺序,请前往 会计 --> 配置 --> 税务,使用左侧的拖拽手柄调整位置。
无论列表顺序如何,税前(Tax Excluded)税不会影响 税后(Tax Included)税的基数(详见 taxes/base-affected 中的说明)。
::::
::: example 示例说明:
- Ecotax 为每单位 €0.90 的
Fixed(固定)税,且 启用Affect base of subsequent taxes。 - 21% VAT 为 21% 的
Percentage of Price税,且 启用Base affected by preceding taxes。 - 在 税务列表 中,21% VAT 位于 Ecotax 之后。
当两税同时作用于同一产品行时,Ecotax 的金额会被加入到 21% VAT 的计税基数中。
:::
Base affected by preceding taxes {#taxes/base-affected}
此设置仅在 开发者模式 下可见,决定前置税(即 影响后续税基 的税)是否会修改本税所依据的销售价格。
:::: note ::: title 注意 :::
Included in Price 为 Tax Included(税后)的税不具备此设置。此类税永远不受前置 税前 税的影响,除非它们的 计算方式 为 Fixed(固定)。
::::