-
Notifications
You must be signed in to change notification settings - Fork 2
Taxes and Discounts
Tax and discount extensions participate in order and invoice export. Choose a consistent totals strategy and verify it with the payment method and NetSuite account configuration. This module does not synchronize tax rules or rates.
| Setting | Behavior |
|---|---|
tax_item_line (default) |
Preserve store-calculated tax by adding a dedicated NetSuite item line. Configure its item internal ID and the appropriate non-taxable tax code. |
netsuite_processor |
Let NetSuite calculate transaction tax using its tax setup and the mapped taxable flags. Optional custom fields carry the original store total and tax amount for comparison. |
With tax_item_line, order tax includes item tax and shipping tax. The dedicated line must not itself generate additional tax. Cash-sale export adds the invoice tax line and adjusts the mapped item tax fields. Check item, shipping, discount, and grand totals separately, including rounding and partial invoices.
With netsuite_processor, taxable-item decisions are based on the product tax class. The optional sales_order_total_amount_id and sales_order_tax_amount_id settings name NetSuite custom fields containing store totals. The cash-sale tax handler for this mode does not perform a separate tax recalculation in PHP.
These strategies can produce different NetSuite totals. The connector does not resolve an accounting mismatch merely because the SOAP write succeeds.
Under Order Settings, explicitly save Select Where to Export the Discount as body or line. There is no shipped value for mageos_netsuite/orders/logic_switch. When discount processing is not skipped, the order and invoice mapper constructors require a registered provider for that exact value and throw Discount Provider mismatch with Interface! if it is empty or invalid. A fresh installation must save this setting before sales processing.
| Strategy | Behavior |
|---|---|
| Body | Uses the configured NetSuite discount item and the absolute order/invoice discount amount as the transaction discount rate. Order export can populate custbody_rw_promotion_codes with the store coupon code. |
| Line | Adds discount item lines. With order-level discounts enabled it uses a combined discount; the setting to disable order-level discounts changes this to item-level treatment, including shipping where applicable. |
Configure the discount-item internal IDs required by the selected strategy. The optional promotion-data observer writes item promotion information to custcol_rw_cc_promotion_amount and custcol_rw_cc_promotion_rules. These custom fields must exist and accept the exported values if that option is used.
Cash-sale import uses its discount plugin to identify the configured discount item and map a discount amount into the store invoice. It is not a general import of every NetSuite promotion rule.
Test an undiscounted taxable order, coupon, automatic cart rule, shipping discount, tax-exempt product, mixed tax classes, partial invoice, and refund. Include configurable products and kit bundles used by the catalog. Compare line amounts, discounts, tax, shipping, and totals in both systems before enabling the flow for customers.
Sources: tax strategy configuration, order tax handlers, invoice tax handlers, discount configuration, discount providers, promotion data, cash-sale discount import.
Mage-OS Labs · Source · Reviewed commit fec65e2 · September 9, 2026 · Validation and limitations
Mage-OS NetSuite Connector
Setup
Data flows
Operations and development