mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-16 11:46:21 +02:00
fix(reconciliation): auto-reconcile deliveries from automatic suppliers on validation
POST /api/deliveries/:id/validate never set reconciled=true for suppliers in automatic reconciliation mode, so their deliveries showed in neither the Manuels tab (auto suppliers excluded) nor Validées (reconciled=false). - validate endpoint now marks reconciled + validatedAt for auto suppliers - Validées tab includes all deliveries from auto suppliers - migration backfills reconciled for existing delivered deliveries with BL Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
944d99733c
commit
2274c9bb4a
3 files changed
+41
-1
No files matched your search
@@ -497,8 +497,11 @@ export default function BLReconciliation() {
|
||||
return isManual && isNotValidated;
|
||||
}), [deliveriesWithBL]);
|
||||
|
||||
// Fournisseurs en rapprochement automatique : toujours considérés validés,
|
||||
// même si reconciled n'a pas été posé (livraisons antérieures au passage en mode auto)
|
||||
const allValidatedDeliveries = useMemo(() => deliveriesWithBL.filter((delivery: any) => {
|
||||
return delivery.reconciled === true || delivery.reconciled === 1;
|
||||
const isAutomatic = delivery.supplier?.automaticReconciliation === true;
|
||||
return isAutomatic || delivery.reconciled === true || delivery.reconciled === 1;
|
||||
}), [deliveriesWithBL]);
|
||||
|
||||
// Fonctions de gestion
|
||||
|
||||
Reference in new issue
Block a user