Learn how to use transformation filters and control structures directly in theplatform's template editor.
This article contains the exact code snippets (snippets) to automate dates, amounts in words, and custom attributes following the official technical guide.
This article is aimed at Administrators who manage the Documentos y Firma module.
- PrerequisitesAccess to theDocumentos y Firma
- .
- Administrator permissions or a profile with access to edit templates.Be inside theEditor de Plantillas
(Administrativo > Documentos y Firma > Plantillas > Crear/Editar).
Content - Step by Step
Copy and paste these fragments into the platform editor to automatically transform your collaborators' data.
1. Date and Time Formatting
-
So dates don't appear as plain numbers, use these filters:
{{fecha_de_hoy | fecha_en_palabras: "%d de %B"}} -
Full date in words (e.g., "17 de Marzo"):
{{fecha_ingreso | formato_fecha: "dd-mm-yyyy"}} -
Specific format (e.g., "31-12-2023"):
{{fecha_de_hoy | detalle_fecha: "M"}} -
Extract Month only (e.g., "03" for March):
{{fecha_de_hoy | fecha_n_meses_al_futuro: "3" | formato_fecha: "dd/mm/yyyy"}}
Future date (e.g., date in 3 months):
2. Amounts in Words (Legal Clauses)
-
Use these filters to comply with the regulation requiring remuneration to be written in text:
"El trabajador percibirá un sueldo base de {{empleado.sueldo | monto_con_decimales_a_palabras}}"Salary with decimals and legal text: -
Result: "...sum of five hundred thousand pesos 00/100."
{{sueldo | palabras}}Convert any number to text:
Result: "five hundred thousand"
-
3. Currency and Number Formatting
{{empleado.sueldo | monto_con_formato}}Amount with currency symbol and separators: -
Result: "$ 1.200.000"
{{1000000 | formato_numero}}Number with thousands separator and 2 decimals:
Result: "1.000.000,00"
4. Custom Attributes and Images
-
If you use attributes you created or need to insert dynamic images:
{{empleado.custom_empleado.nombre_del_atributo}} -
Custom Attribute (Text): Image or Scanned Signature:
{{empleado.custom_empleado.firma_escaneada | imagen: "150", "80"}} -
(It is strictly necessary to define width and height)
{{empresa.logo | imagen: "200", "200"}}
Company Logo:
-
Final ConsiderationsGolden Rule:
{{ variable }}All simple variables must be enclosed in double braces -
.No Spaces:
|Do not leave spaces between the variable and the pipe symbol{{variable|filtro}}(example: -
).Mandatory Closures:
{% endif %}If you use logical conditions, always remember to close with -
.Uppercase Usage:
{{empleado.apellido | convertir_a_mayusculas}}You can force any text to uppercase using:
.
💡Still have questions?
If this article does not fully answer your question or you need support in a particular case, our team is available through the support channels.
Chat | Phone | Email🎓
Interested in getting certified in Buk?
🤖 This article was translated using artificial intelligence. View original article.