mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Improve reconciliation validation by checking invoice verification status
Update the reconciliation validation button logic to conditionally enable based on invoice verification results, displaying green for verified, red for unverified invoices, and disabling when verification is pending or unavailable. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/h3gJlye
This commit is contained in:
1 parent
704cb65e6a
commit
6d403ee9a4
1 file changed
+24
-4
@@ -965,17 +965,37 @@ export default function BLReconciliation() {
|
||||
</Button>
|
||||
{!delivery.reconciled ? (
|
||||
<>
|
||||
{permissions.canValidate('reconciliation') && (
|
||||
{permissions.canValidate('reconciliation') && verificationResults[delivery.id]?.exists === true ? (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => handleQuickValidate(delivery)}
|
||||
className="h-8 w-8 p-0"
|
||||
title="Valider le rapprochement"
|
||||
className="h-8 w-8 p-0 text-green-600 hover:text-green-700"
|
||||
title="Valider le rapprochement (facture vérifiée)"
|
||||
>
|
||||
<Check className="w-4 h-4" />
|
||||
</Button>
|
||||
)}
|
||||
) : permissions.canValidate('reconciliation') && verificationResults[delivery.id]?.exists === false ? (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
disabled
|
||||
className="h-8 w-8 p-0 text-gray-400 cursor-not-allowed"
|
||||
title="Validation impossible : la facture n'a pas été trouvée (coche rouge). Vérifiez la référence de facture."
|
||||
>
|
||||
<Check className="w-4 h-4" />
|
||||
</Button>
|
||||
) : permissions.canValidate('reconciliation') ? (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
disabled
|
||||
className="h-8 w-8 p-0 text-gray-400 cursor-not-allowed"
|
||||
title="Validation impossible : veuillez d'abord vérifier la facture en cliquant sur l'icône de recherche"
|
||||
>
|
||||
<Check className="w-4 h-4" />
|
||||
</Button>
|
||||
) : null}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
|
||||
Reference in new issue
Block a user