Skip to main content

Overview

Boletas are electronic receipts used for retail sales and B2C (Business to Consumer) transactions in Chile. LibreDTE Core supports two types of boletas:
  • Boleta Afecta (Code 39): For taxable retail sales
  • Boleta Exenta (Code 41): For tax-exempt retail sales

Boleta Afecta (Code 39)

Official Name: Boleta electrónica
Document Code: 39
Enum Constant: CodigoDocumento::BOLETA_AFECTA
Interface: BoletaAfectaInterface

When to Use Boleta Afecta

Use a Boleta Afecta when:
  • Making retail sales to consumers
  • The transaction is subject to VAT
  • The customer does not require a tax-deductible invoice (Factura)
  • Point-of-sale transactions with final consumers

Code Example

use libredte\lib\Core\Package\Billing\Component\Document\Enum\CodigoDocumento;
use libredte\lib\Core\Package\Billing\Component\Document\Contract\Document\BoletaAfectaInterface;

// Access the document type
$documentType = CodigoDocumento::BOLETA_AFECTA;

// Get document code
$codigo = $documentType->getCodigo(); // 39

// Get document name
$nombre = $documentType->getNombre(); // "Boleta electrónica"

// Get short name
$nombreCorto = $documentType->getNombreCorto(); // "Boleta"

// Get alias
$alias = $documentType->getAlias(); // "boleta_afecta"

// Get interface class
$interface = $documentType->getInterface(); // BoletaAfectaInterface::class

Boleta Exenta (Code 41)

Official Name: Boleta no afecta o exenta electrónica
Document Code: 41
Enum Constant: CodigoDocumento::BOLETA_EXENTA
Interface: BoletaExentaInterface

When to Use Boleta Exenta

Use a Boleta Exenta when:
  • Making retail sales to consumers
  • The transaction is exempt from VAT
  • Selling tax-exempt goods or services
  • The customer does not require a tax-deductible invoice

Code Example

use libredte\lib\Core\Package\Billing\Component\Document\Enum\CodigoDocumento;
use libredte\lib\Core\Package\Billing\Component\Document\Contract\Document\BoletaExentaInterface;

// Access the document type
$documentType = CodigoDocumento::BOLETA_EXENTA;

// Get document code
$codigo = $documentType->getCodigo(); // 41

// Get document name
$nombre = $documentType->getNombre(); // "Boleta no afecta o exenta electrónica"

// Get short name
$nombreCorto = $documentType->getNombreCorto(); // "Boleta no afecta o exenta"

// Get alias
$alias = $documentType->getAlias(); // "boleta_exenta"

// Get interface class
$interface = $documentType->getInterface(); // BoletaExentaInterface::class

Document Properties

Boleta Afecta (39)

codigo
int
required
Document code: 39
nombre
string
required
Full document name: “Boleta electrónica”
alias
string
required
Programmatic alias: “boleta_afecta”

Boleta Exenta (41)

codigo
int
required
Document code: 41
nombre
string
required
Full document name: “Boleta no afecta o exenta electrónica”
alias
string
required
Programmatic alias: “boleta_exenta”

Comparison: Boleta vs Factura

FeatureBoleta (39/41)Factura (33/34)
TargetConsumers (B2C)Businesses (B2B)
Tax DeductibleNoYes
Buyer InformationOptional/MinimalRequired
Use CaseRetail salesCommercial invoices
VAT DetailIncluded in totalItemized separately
  • Factura Afecta (33): For B2B taxable invoices
  • Factura Exenta (34): For B2B tax-exempt invoices
  • Nota de Crédito (61): To reverse or correct a boleta
  • Nota de Débito (56): To add charges to a boleta

Implementation

Both boleta types implement their respective interfaces:
namespace libredte\lib\Core\Package\Billing\Component\Document\Contract\Document;

interface BoletaAfectaInterface extends DocumentInterface
{
    // Boleta Afecta specific methods
}

interface BoletaExentaInterface extends DocumentInterface
{
    // Boleta Exenta specific methods
}

Build docs developers (and LLMs) love