How do I create a separate column for total line item price based on an 8% or 10% tax rate (Japan consumption tax)?

If you're based in Japan, you may need to create a report with separate columns for total line item prices subject to 8% tax and 10% tax for each order.

This is due to tax rates being different depending on the product type.

In EZ Exporter, we can use the formulas below in the Calculated Fields to filter the line items in each order based on the tax rate and then sum up their prices.

8% Tax Rate

Total Lineitems Price

get_total([i.total_price for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.08"])

Total Lineitems Tax

get_total([i["tax_lines.total_price"] for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.08"])

Total Lineitems Discount

get_total([i["discount_allocations.total_amount"] for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.08"])

Total Lineitems Price Minus Total Lineitems Discount

get_total([i.total_price for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.08"]) - get_total([i["discount_allocations.total_amount"] for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.08"])

10% Tax Rate

Total Lineitems Price

get_total([i.total_price for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.1"])

Total Lineitems Tax

get_total([i["tax_lines.total_price"] for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.1"])

Total Lineitems Discount

get_total([i["discount_allocations.total_amount"] for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.1"])

Total Lineitems Price Minus Total Lineitems Discount

get_total([i.total_price for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.1"]) - get_total([i["discount_allocations.total_amount"] for i in load_json_data({{ line_items }}) if i["tax_lines.rate"] == "0.1"])

The output will look something like this:


App: EZ Exporter

Tags: advanced features, taxes, japan, japan consumption tax