Repository navigation
fix(cierre): identificar gastos retroactivos posteriores al cierre (#753) - #969
Closed
casasleonj wants to merge 12 commits into
Closed
casasleonj wants to merge 12 commits into
casasleonj wants to merge 12 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 22, 2026
This was referenced Nov 22, 2026
Owner
Author
|
Saneamiento contra |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#753 · Alerta informativa de gastos retroactivos tras cierre (sin alterar caja)
Refs #753, #755. Resuelve la brecha auditada: un gasto registrado después de cerrar la jornada con fecha efectiva anterior a la hora del cierre no aparecía en «post-cierre» porque el filtro solo usaba
Gasto.fecha >= CierreDia.horaCierre.Implementación
src/lib/cierre-gastos-retroactivos.ts. Filtro combinado del mismo día de Bogotá:fecha efectiva < corteycreatedAt > horaCierre(fallback aCierreDia.createdAtsi no hayhoraCierre).postCierre.gastosRetroactivoscon origen (NOMINA,EMBARQUES,GASTOS), concepto, importe, fecha efectiva y fecha de registro.netoCaja, inventario, sumas de ventas nocturnas ni movimientos del ERP. Es información de conciliación, no corrección financiera automática.Alcance y dependencias
main. PR draft; no merge ni despliegue sin validación.Estado: código y tests escritos en GitHub, tests todavía no ejecutados localmente, CI por iniciar con este PR.
Actualización de trazabilidad #755
Se añadieron también: lectura explícita de origen (
NOMINA/EMBARQUES/GASTOS) engastosDelDia; distinción entre «responsable» y «registró» con marcaregistroConfiablepara no atribuir autoría inventada a cierres anteriores; enlaces desde el desglose de Cierre al módulo de origen (Nómina, Embarques o detalle Gastos). El enlace a Gastos solo se ofrece a roles autorizados, sin saltarse la protección del endpoint. Test unitario adicional para atribución/origen. Dependencia:?openGasto=idrequiere la UI del PR #965 yGET /api/gastos/[id]del PR #968; no fusionar este flujo aislado antes de integrar sus consumidores. El cierre histórico permanece intacto.