mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-20 13:38:15 +02:00
Improve NocoDB invoice verification and error handling
Enhance NocoDB invoice verification logic in the client and server to handle missing configurations and provide better debugging information. Update schema definitions to reflect changes in NocoDB configuration handling. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
1 parent
955f3d3b3d
commit
19ed96e48c
4 files changed
+50
-26
No files matched your search
@@ -862,9 +862,24 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
const { invoiceReference, blNumber } = req.body;
|
||||
|
||||
if (!delivery.supplier || !delivery.group) {
|
||||
console.log('❌ Livraison manque informations:', {
|
||||
deliveryId,
|
||||
hasSupplier: !!delivery.supplier,
|
||||
hasGroup: !!delivery.group,
|
||||
delivery: delivery
|
||||
});
|
||||
return res.status(400).json({ message: "Delivery missing supplier or group information" });
|
||||
}
|
||||
|
||||
console.log('🔍 Tentative de vérification facture:', {
|
||||
deliveryId,
|
||||
invoiceReference: invoiceReference || delivery.invoiceReference,
|
||||
blNumber: blNumber || delivery.blNumber,
|
||||
supplierName: delivery.supplier.name,
|
||||
groupId: delivery.groupId,
|
||||
groupData: delivery.group
|
||||
});
|
||||
|
||||
const result = await invoiceVerificationService.verifyInvoiceReference(
|
||||
invoiceReference || delivery.invoiceReference || '',
|
||||
blNumber || delivery.blNumber || '',
|
||||
|
||||
Reference in new issue
Block a user