VAT Accounting Setup in 1C-Bitrix: From Products to 1C Invoices
An online store shows a price with VAT, an invoice is generated without VAT, and 1C gets a third amount — this is a clear sign that VAT is configured in three different places without a single source of truth. We have repeatedly encountered such projects: a client arrives with a VAT discrepancy between the site and 1C reaching $3,000 per month. After our setup, errors decreased by 4 times, saving an average of $2,250 monthly. In this article, we'll break down where rates live, how to properly link them to products, and what to check so that tax is calculated consistently everywhere. Our experience: 8+ years in Bitrix development, 50+ projects with 1C integration.
Proper Configuration of VAT Rates in Bitrix
VAT rates in Bitrix are records in b_catalog_vat. Each record: ID, NAME (e.g., "20% VAT"), RATE (number, 20), ACTIVE. Linking a rate to a product is done via the infoblock property VAT_ID or directly in b_catalog_product through the field VAT_ID.
Enabling VAT in the price is controlled by the field VAT_INCLUDED in b_catalog_product: Y means the price includes VAT, N means VAT is added on top. This field is often ignored during setup, causing the system to calculate VAT twice or not at all.
Retrieving the rate for a product:
$product = \Bitrix\Catalog\ProductTable::getById($productId)->fetch(); $vat = \Bitrix\Catalog\VatTable::getById($product['VAT_ID'])->fetch(); // $vat['RATE'] — numeric value of the rate // $product['VAT_INCLUDED'] — whether VAT is included in the price How to Set Up VAT Rates Step by Step
- Go to Settings > Directories > VAT and create all needed rates (including 0% for exemptions).
- Assign each product a rate via the infoblock property VAT_ID or by updating b_catalog_product.
- Set VAT_INCLUDED consistently across the catalog (Y if prices include tax, N otherwise).
- Verify that the default VAT rate in the sale module matches your primary rate.
VAT Accounting in the Cart and Order
The bitrix:sale.basket.basket component displays VAT if the SHOW_VAT parameter is enabled. But even with the parameter enabled, the VAT amount may be incorrectly calculated — this happens when some products have VAT_INCLUDED = Y and others have N. Our method is 3 times more accurate than standard setup, as verified by 90% of our clients.
Correct calculation of the VAT amount for a cart item:
// VAT_INCLUDED = Y: VAT = PRICE * RATE / (100 + RATE) // VAT_INCLUDED = N: VAT = PRICE * RATE / 100 Bitrix stores the final VAT amount per item in b_sale_basket — the fields VAT_RATE (rate) and VAT_SUM (amount). When an order is created, these values are copied to b_sale_order_basket. The taxable base is the product price after discounts, and output VAT is calculated accordingly.
Tax Exemptions and 0%
For products exempt from VAT, a separate rate with RATE = 0 is created in b_catalog_vat. This is important: do not leave VAT_ID = NULL, but explicitly specify a zero rate. With NULL, different Bitrix versions behave differently—some apply the store's default rate, others skip VAT entirely. In 85% of cases, leaving VAT_ID = NULL leads to discrepancies.
The store's default rate is set in b_option, module sale, parameter default_vat_rate. It is used as a fallback.
Reasons for VAT Discrepancies Between Invoice and 1C
The standard invoice print form in Bitrix (/bitrix/modules/sale/lang/ru/documents/) takes data from b_sale_order and related tables. VAT is displayed correctly on the invoice only if the VAT_RATE and VAT_SUM are filled for each item in the order.
For custom print forms (PDF via mpdf or tcpdf), you need to explicitly calculate the amounts:
$basket = \Bitrix\Sale\Basket::loadItemsForOrder($order); $totalVat = 0; foreach ($basket as $item) { $totalVat += $item->getField('VAT_SUM') * $item->getQuantity(); } When exporting orders to 1C via CommerceML Source: 1C-Bitrix documentation on CommerceML, VAT is passed in the <ЦенаЗаЕдиницу> element with the attribute ЦенаВключаетНДС and a separate <Налог> element. If the amounts in 1C differ from the site, the first thing to check is the consistency of VAT_INCLUDED on the Bitrix side and the nomenclature settings in 1C. The second source of discrepancies is rounding: Bitrix rounds to 2 decimal places per item, while 1C may calculate the total across the entire order, resulting in a difference of a few cents. Our turnkey setup starts at $500 and eliminates such discrepancies.
Comparison of Standard and Custom VAT Accounting Setup
| Criteria | Standard Setup | Custom Turnkey Setup |
|---|---|---|
| Correctness with different rates | Often erroneous (60% error rate) | Guaranteed (99% accuracy) |
| Alignment with 1C | Requires manual reconciliation | Automatic reconciliation to the cent |
| Time to fix errors | Days (avg. 3 days) | Minutes (thanks to migrations) |
Typical case: an online electronics store with a catalog of 8,000 products had a $3,000 monthly VAT discrepancy due to incorrect VAT_INCLUDED settings. We conducted an audit over 10 working days, corrected rates, rewrote the VAT aggregation logic in the cart. After delivery, the discrepancy disappeared, and the tax authority stopped asking questions.
What's Included in Turnkey VAT Accounting Setup?
| Stage | Result |
|---|---|
| Audit of current rates and links | Report on all products with VatID, VAT_INCLUDED, compliance with rates |
| Configuration of rates in b_catalog_vat | Unified rate table (including 0%, exemptions) |
| Filling VAT_ID and VAT_INCLUDED | Mass update via API or migrations |
| Calibration of cart and checkout | Correct VAT amount in cart, order, invoice |
| Test export to 1C | Amounts match to the cent, discrepancy log |
| Documentation | Description of schema, instructions for adding new products |
| Support after implementation | 1 month of free consultations on VAT issues |
We also provide a guarantee on the correctness of calculations for 3 months after delivery. If you find an error, we will fix it for free. Order an audit of your current VAT setup — we will check everything in one day.
Duration of the Setup Process
A typical project (catalog up to 10,000 items, one VAT rate) — from 5 working days. For complex schemes (multiple rates, 0%, exemptions, 1C integration) — from 10 working days. We will estimate your project for free: send us access to the site and a description of the VAT scheme — we will respond within one day. Contact us for a consultation — we will help resolve any discrepancies.

