diff --git a/app/templates/automation.html b/app/templates/automation.html
index ea3273e..93e7496 100644
--- a/app/templates/automation.html
+++ b/app/templates/automation.html
@@ -364,6 +364,14 @@ async function previewAutomation() {
psSection.classList.add('hidden');
}
+ // Ventas - errores de generación
+ if (data.ventas_gen_errors && data.ventas_gen_errors.length > 0) {
+ data.ventas_gen_errors.forEach(e => {
+ showToast(`Error generando venta ${e.factura}: ${e.error}`, 'error');
+ console.error('ventas_gen_error', e);
+ });
+ }
+
// Ventas
const vtaSection = document.getElementById('ventas-section');
if (_pasos.has('ventas') && data.ventas_preview && data.ventas_preview.length > 0) {