Repository navigation
feat(pedidos): el ADMIN registra quién recibió el cobro de un fiado y cuándo — PR-3 de #472 - #489
Merged
Merged
Conversation
… cuándo — PR-3 de #472 pagar-fiado acepta recibioDinero/repartidorId/fechaRecepcion solo del ADMIN con la gestión temporal encendida: el pago guarda recibidoPorId y ocurridoAt. La regla de fecha (no futura, hasta 7 días, día no cerrado) se comparte con la entrega de oficina. Pantalla de Fiados con las dos preguntas nuevas (la opción 'quién recibió' no viene marcada). Refs #472 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012bPJbVok2oF4zHZjCTqfKA
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
E2E: 64 specs distintos fallan en el PR y los 64 ya fallan en En verde: Typecheck + Tests, Lint, Integration (incluida Generated by Claude Code |
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.
Refs #472
Objetivo
Que el cobro posterior de un fiado deje constancia de quién recibió el dinero y cuándo, mientras Embarques no funciona (sin un repartidor en ruta que lo capture).
Resumen de cambios
POST /api/pedidos/pagar-fiadoaceptarecibioDinero(OFICINA|REPARTIDOR),repartidorIdyfechaRecepcion. Solo del ADMIN y conGESTION_ADMIN_SIN_EMBARQUEencendida (SOLO_ADMIN/FUNCION_DESACTIVADAsi no). Sin estos campos el cobro no cambia (también para la ASISTENTE).Pago.recibidoPorId(vacío = oficina) yPago.ocurridoAtsolo si la fecha no es hoy ([Funcionalidad] Pago con tres fechas (hecho, registro, regularización) y tabla Regularizacion #402). Columnas que ya existen desde feat(pedidos): el ADMIN registra la entrega de un pedido sin embarque — PR-1 de #472 (interruptor apagado) #482: sin migración.NOMINA_EXISTENTE). Un reintento ya aplicado (misma clave) no se re-valida.src/lib/gestion-admin-fecha.tsy la comparten la entrega de oficina y este cobro (mensajes de la entrega sin cambios). El mapa de estados HTTP de los errores también quedó compartido.docs/pedidos/GESTION_TEMPORAL_SIN_EMBARQUE.mdactualizado.Criterios de aceptación
recibidoPorId, saldo/estado de pago/factura correctos.ocurridoAt= esa fecha ycreatedAt= ahora.Validaciones ejecutadas (tras rebase sobre
main)tsc,eslintynpm run test(4188) en verde; integración con Postgres real (pagar-fiado-oficina8/8, más entrega de oficina, nómina y abonos) con el verificador V1–V15 sobre el pedido.gestion-admin-sin-embarque.spec.ts, escritorio y móvil): sin decir quién recibió no se cobra; con repartidor queda en la base. Encontró y corrigió un fallo real: las vistas de escritorio y móvil se montan a la vez y compartían el grupo de opciones, así que el navegador desmarcaba la visible; cada copia usa ahora su propiouseId.Limitaciones conocidas
fetchResilient: sin red, la orden se encola con su fecha original y el servidor la valida al llegar (si ya pasó la ventana de 7 días, o el día se cerró, se rechaza).Info para QA
Con el interruptor encendido, como ADMIN: Pedidos → Fiados → Pagar. Probar «oficina», «repartidor» y una fecha de hace unos días.
🤖 Generated with Claude Code
https://claude.ai/code/session_012bPJbVok2oF4zHZjCTqfKA