Issue a monthly Factura C on AFIP/ARCA for Monotributo. Use when the user says "afip invoice", "issue invoice", "factura", "facturar", or "emitir factura".
Issue a Factura C via ARCA's RCEL (Comprobantes en Línea) system. This skill is run once per month.
Before starting, read ~/.config/afip/invoice-defaults.json to load all invoice parameters (emisor/receptor details, amounts, activity codes). All field values referenced below as config.<section>.<field> come from this file.
All dates use DD/MM/YYYY format (Argentine convention).
https://auth.afip.gov.ar/contribuyente_/login.xhtml?action=SYSTEM&system=admin_monoconfig.emisor.cuit in the CUIT/CUIL field.config.emisor.nombre) to select the company.config.emisor.punto_de_ventaconfig.comprobante.tipoServiciosconfig.comprobante.actividadconfig.receptor.condicion_ivaconfig.receptor.cuit using keyboard input (do NOT use form_input for this field), then press Tab to trigger the auto-population of name and address. Wait 2-3 seconds for the AJAX call.config.receptor.nombre (verify this appeared).event.isTrusted so only real (non-scripted) click events register. Follow this protocol strictly:
computer left_click with the checkbox's ref ID (a single clean CDP click — do NOT use form_input, JavaScript .click(), or .checked = true). The checkbox must not have been touched by any other method before this click.config.comprobante.producto_servicioconfig.comprobante.cantidadconfig.comprobante.unidad_medida (it does NOT default to this — you must select it manually)config.comprobante.precio_unitarioBefore clicking "Confirmar Datos...", you MUST read the full page DOM using read_page with filter: all and verify every single field against the expected values from the config file:
| Field | Expected value |
|---|---|
| Razón Social (emisor) | config.emisor.nombre |
| Punto de Venta | config.emisor.punto_de_venta |
| Domicilio | config.emisor.domicilio |
| Conceptos a Incluir | Servicios |
| Período Facturado desde | 1st of previous month |
| Período Facturado hasta | last day of previous month |
| Vto. para el Pago | 1st of current month |
| CUIT (receptor) | config.receptor.cuit |
| Razón Social (receptor) | config.receptor.nombre |
| Domicilio Comercial (receptor) | config.receptor.domicilio |
| Condición frente al IVA | config.receptor.condicion_iva |
| Condiciones de Venta | Contado |
| Producto/Servicio | config.comprobante.producto_servicio |
| Cant. | formatted from config.comprobante.cantidad |
| U. Medida | config.comprobante.unidad_medida |
| Prec. Unitario | formatted from config.comprobante.precio_unitario |
| Importe Total | formatted from config.comprobante.precio_unitario * config.comprobante.cantidad |
If ANY field does not match, DO NOT click "Confirmar Datos...". Report the discrepancy and ask the user how to proceed.
If ALL fields match, ask the user for explicit confirmation before clicking "Confirmar Datos...".
form_input for dropdowns and text fields, but use keyboard typing (click + type action) for the CUIT number field — programmatic value setting does not trigger the AJAX auto-populate.computer left_click with ref) — form_input, JavaScript .checked, and .click() all fail silently (the form likely checks event.isTrusted). If the CDP click also fails, fall back to asking the user to tick it manually. See Step 3 for the exact protocol.