Merge pull request #28 from R0m1k3/1.1

Align amounts to the right and remove debugging logs from reconciliation
This commit is contained in:
LogiFlow authored and GitHub committed 2025-08-12 14:46:48 +02:00
commit dded2da6fb
3 files changed
+200 -14

No files matched your search

@@ -0,0 +1,199 @@
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
📄 SPA: Serving index.html for /bl-reconciliation
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
GET /api/user 304 in 7ms
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
GET /api/user 304 in 8ms
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
GET /api/suppliers 304 in 31ms
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
GET /api/user 304 in 5ms
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
GET /api/user 304 in 9ms
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
Deliveries API called with: {
startDate: undefined,
endDate: undefined,
storeId: '1',
withBL: undefined,
userRole: 'admin'
}
Admin filtering deliveries with groupIds: [ 1 ]
Fetching all deliveries
Deliveries returned: 44 items
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
GET /api/deliveries 304 in 67ms
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
🔍 getUserWithGroups called for user: admin_local
🔍 Querying user_groups for user: admin_local
🔍 Found 0 group assignments for user admin_local
🔍 Raw query result: []
✅ Processed 0 groups for user admin_local
GET /api/groups 304 in 26ms
HEAD /api/health 200 in 0ms
Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

+1 -14
View File
@@ -78,19 +78,6 @@ export default function BLReconciliation() {
enabled: !!user
});
// Debug: vérifier les données des fournisseurs
console.log('🔍 Debug Filtrage Réconciliation:', {
totalDeliveries: deliveriesWithBL.length,
totalSuppliers: suppliers.length,
deliveriesWithSuppliers: deliveriesWithBL.map(d => ({
id: d.id,
supplierId: d.supplierId,
supplier: suppliers.find(s => s.id === d.supplierId),
supplierAuto: suppliers.find(s => s.id === d.supplierId)?.isAutoReconciliation
})),
suppliersAuto: suppliers.filter(s => s.isAutoReconciliation === true)
});
// Séparer les livraisons par mode de rapprochement
const manualReconciliationDeliveries = deliveriesWithBL.filter((delivery: any) => {
const supplier = suppliers.find(s => s.id === delivery.supplierId);
@@ -444,7 +431,7 @@ export default function BLReconciliation() {
}
</div>
</td>
<td className="px-3 py-2 text-sm text-left">
<td className="px-3 py-2 text-sm text-right">
{(() => {
const blAmount = delivery.blAmount ? parseFloat(delivery.blAmount) : 0;
const invoiceAmount = delivery.invoiceAmount ? parseFloat(delivery.invoiceAmount) : 0;