billing.book) handles the management of sales and purchase books (Libro de Ventas y Compras) required for tax reporting in Chile.
Overview
This component provides functionality for creating, maintaining, and reporting sales and purchase books that consolidate all tax documents issued and received during a period.This component is currently under development. Workers and functionality will be added in future releases.
Status
The Book Component is in active development. The following features are planned:Sales Book Management
Sales Book Management
Track and consolidate all issued sales documents (invoices, receipts, credit/debit notes) for a period.
Purchase Book Management
Purchase Book Management
Track and consolidate all received purchase documents for a period.
Book Generation
Book Generation
Generate official sales and purchase book reports in required formats for SII submission.
Period Management
Period Management
Manage books by tax periods (monthly, yearly).
Book Validation
Book Validation
Validate book completeness and accuracy before submission.
Planned Workers
The following workers are planned for implementation:- Builder Worker: Constructs sales and purchase books from document collections
- Validator Worker: Validates book content and structure
- Generator Worker: Generates book reports in required formats (XML, PDF)
- Loader Worker: Loads existing books from storage
- Period Manager Worker: Manages book periods and closures
Current Implementation
getWorkers
Returns all available workers in this component.Returns an empty array (no workers implemented yet)
Expected Usage (Coming Soon)
Once implemented, the component will support operations like:Books in Chilean Tax System
In the Chilean tax system, businesses must maintain:Libro de Ventas (Sales Book)
A register of all sales documents issued:- Facturas Electrónicas (Electronic Invoices)
- Boletas Electrónicas (Electronic Receipts)
- Notas de Crédito (Credit Notes)
- Notas de Débito (Debit Notes)
- Facturas de Exportación (Export Invoices)
Libro de Compras (Purchase Book)
A register of all purchase documents received:- Purchase invoices from suppliers
- Credit and debit notes received
- Import documents
Reporting Requirements
Books must be:- Maintained for each tax period (monthly)
- Submitted to SII electronically
- Kept for the legally required retention period
- Available for tax audits
Development Status
Check the source code for the latest implementation status: Location:/workspace/source/src/Package/Billing/Component/Book/BookComponent.php:37
Workers and methods are being actively developed. Check the official LibreDTE documentation for updates on availability.
Source Reference
Namespace:libredte\lib\Core\Package\Billing\Component\Book\BookComponent
Location: /workspace/source/src/Package/Billing/Component/Book/BookComponent.php:37