mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Temporarily disable auto-filling of invoice amounts for debugging purposes
Temporarily disable the auto-filling functionality for invoice amounts in the Avoirs page to aid in debugging production server issues. Added console logs to provide visibility into the verification process. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/H30E1Dv
This commit is contained in:
1 parent
cecd2e6031
commit
e707fe8ec6
2 files changed
+7
-24
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 191 KiB |
@@ -441,30 +441,13 @@ export default function Avoirs() {
|
||||
[variables.avoirId]: result
|
||||
}));
|
||||
|
||||
// Auto-remplissage si facture trouvée et montant disponible
|
||||
if (result?.exists && result?.invoiceAmount !== undefined && result?.invoiceAmount !== null) {
|
||||
// Auto-remplir le montant dans l'avoir via API
|
||||
const avoir = avoirs?.find(a => a?.id === variables.avoirId);
|
||||
if (avoir && avoir.supplierId && avoir.groupId) {
|
||||
try {
|
||||
editAvoirMutation.mutate({
|
||||
id: variables.avoirId,
|
||||
data: {
|
||||
supplierId: avoir.supplierId,
|
||||
groupId: avoir.groupId,
|
||||
invoiceReference: avoir.invoiceReference || "",
|
||||
amount: result.invoiceAmount, // Auto-remplissage du montant
|
||||
comment: avoir.comment || "",
|
||||
commercialProcessed: avoir.commercialProcessed || false,
|
||||
status: avoir.status as "En attente de demande" | "Demandé" | "Reçu",
|
||||
}
|
||||
});
|
||||
} catch (autoFillError) {
|
||||
console.error('Erreur auto-remplissage montant:', autoFillError);
|
||||
// Ne pas faire échouer la vérification si l'auto-remplissage échoue
|
||||
}
|
||||
}
|
||||
}
|
||||
// DÉSACTIVÉ TEMPORAIREMENT : Auto-remplissage pour debug
|
||||
// TODO: Réactiver une fois le problème identifié
|
||||
console.log('✅ Vérification terminée sans auto-remplissage:', {
|
||||
exists: result?.exists,
|
||||
invoiceAmount: result?.invoiceAmount,
|
||||
avoirId: variables.avoirId
|
||||
});
|
||||
|
||||
setVerifyingAvoirs(prev => {
|
||||
const newSet = new Set(prev);
|
||||
|
||||
Reference in new issue
Block a user