Commit Graph

8 Commits

Author SHA1 Message Date
lite b99d09789b refactor(dolibarr): use typed fields matching web→BFF format
- Remove totalHt/totalTax/total from input (calculated from lines)
- Remove line.total (calculated as quantity × unitPrice)
- All numeric fields are proper numbers (not strings)
- Dates are ISO 8601 (converted to dd-mm-yyyy internally)
- Totals calculated and validated automatically
2026-05-17 17:40:33 -04:00
lite 2fcd61ae81 docs: update documentation for format system
- Add formatos.md with native and dolibarr format specs
- Update api.md with both format examples and formats endpoint
- Update arqui.md with formats layer and new data flow
- Update formato_datos.md to reference formatos.md
2026-05-17 16:27:38 -04:00
lite 74487015df docs: reorganize documentation and add prerequisites guide
- Move ERRORES.md to documentacion/
- Add PREREQUISITES.md with system requirements and setup steps
- Update documentacion/README.md as documentation index
- Simplify root README.md as project summary
2026-05-17 16:27:18 -04:00
admin 4225af5b05 Update documentation and organize test files
- Fix JSON syntax errors in api.md
- Fix typos in verifactu.md and formato_datos.md
- Update README.md with current status (anulation implemented)
- Move all Python test files to test/ folder
- Remove certificates from data/certs/ and test/certs/
2026-05-14 20:50:55 +02:00
admin 1ad84a3b14 Fix integración VeriFactu AEAT: XML, hash y encadenamiento
Bugs corregidos tras validación directa contra la plataforma de pruebas:

- Hash: formato key=valor& en lugar de separador |
- TipoHuella: código 01 en lugar de literal SHA-256
- FechaHoraHusoGenRegistro: formato ISO 8601 con huso horario
- IdSistemaInformatico: 2 caracteres (01)
- Namespaces SOAP: URLs correctas de www2.agenciatributaria.gob.es
- Estructura XML: eliminados wrappers Content/AltaReq sobrantes
- Encadenamiento: xs:choice correcto (PrimerRegistro XOR RegistroAnterior)
- RegistroAnterior: referencia datos de la factura anterior, no la actual
- Destinatarios: bloque obligatorio para facturas F1/F3/rectificativas
- wsu:Id: eliminado atributo con namespace no declarado
- Parser respuesta: mapeado a RespuestaRegFactuSistemaFacturacion real
- Campo emisor_nombre añadido al input de factura

La API envía y recibe correctamente contra prewww1.aeat.es
con respuesta EstadoEnvio=Correcto y CSV asignado por la AEAT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 01:13:09 +02:00
admin b9899684cc Add FNMT certificate for entities without legal personality 2026-04-17 13:23:52 +02:00
admin ecc8ce475d Add FNMT valid certificates URL to documentation 2026-04-17 13:08:22 +02:00
admin 4ab7670232 Implement VeriFactu API with certificate management, invoice submission and local fallback
- Add API handlers for facturas (alta/anulacion)
- Implement certificate storage with temp/permanent flow
- Add token generation for authenticated sessions
- Add fallback to local storage when AEAT unavailable
- Update config with certificate path/password
- Add client certificate conversion for TLS
- Add comprehensive documentation
2026-04-17 13:03:06 +02:00