Invoice Template Development for Bitrix24
An invoice is the document by which a client transfers money. If it looks unprofessional, lacks required details, or doesn't match the company's brand identity, it affects how the business is perceived. The standard Bitrix24 invoice template contains basic fields, but for real-world use it almost always requires customization: adding banking details, a stamp and signature, and correct VAT display.
Invoice Template Development for Bitrix24
Invoices in Bitrix24: Two Modes
Bitrix24 has two types of invoices:
Legacy invoices (CRM → Invoices) — a separate CRM entity stored in the b_crm_invoice table. The template is configured via CRM → Settings → Document Templates (type "Invoice"). Available placeholders include: {InvoiceId}, {InvoiceAccount}, {InvoicePrice}, {InvoiceDate}.
New invoices (the "Invoices" smart process, introduced in 2022) — work as a smart process and are stored in the b_crm_dynamic_* table. Document templates for them are accessible through the invoice card, and placeholders correspond to the smart process fields.
Before developing a template, it's important to clarify which invoice type is in use — this determines the set of available variables and the configuration approach.
Required Elements of an Invoice Template
Standard business practice requires an invoice to include:
- Seller's details: name, tax ID, legal address, banking details (BIC, current account, correspondent account, bank name)
- Buyer's details: name, tax ID, address
- Invoice number and date
- Table of goods/services: name, quantity, unit of measure, price, amount
- VAT (if applicable)
- Total amount in figures and in words
- Signature and stamp (placeholder space in the template)
Seller details are most conveniently stored as static text in the docx template — they rarely change. Buyer details are pulled from CRM via placeholders from the company/contact fields.
Banking Details and Custom Fields
Banking details are not stored as a separate entity in standard Bitrix24. Solutions:
- Static in the template — suitable when there is one bank account. Simple, but requires updating the template if details change
- Custom UF fields of the seller company — store details in the seller company's fields in CRM and pull them via placeholders. Flexible, but requires configuration
- Details via the "My Details" module — some Bitrix24 plans have a built-in details directory from which data is automatically inserted into invoices
Amount in Words
Native support for amounts written out in words is not available in Bitrix24 templates. Options:
- The manager fills in a custom field manually (inconvenient, but simple)
- A robot in the pipeline calculates the written-out amount and writes it to a custom field upon invoice creation/modification (via JavaScript in a business process or an external webhook)
- External service via REST API: when an invoice changes, a webhook calls a script that calculates the written-out amount and updates the field via
crm.invoice.update
Case Study: Invoice Template for an IT Company
An IT company issues invoices for technical support and development. Requirements: company details, a services table (name, hours, rate, amount), 20% VAT, total in words, signatures of the director and chief accountant.
Details — static in docx. Services table — via the repetition block {#Products}. VAT and total in words — custom UF fields populated by a robot via a business process (JS action calculates VAT and the written-out amount). Signatures — lines with blank fields for a handwritten signature. The template was uploaded to Bitrix24 and tested on 10 invoices. The work took 1.5 days.
Timelines
| Task | Timeline |
|---|---|
| Customizing the standard template (details, styles) | 4–6 hours |
| Developing a template from scratch + custom fields | 1–2 days |
| Template with automatic written-out amount via a robot | 2–3 days |

