diff --git a/src/controllers/syncController.ts b/src/controllers/syncController.ts index 44ba41a..fdb7e8c 100644 --- a/src/controllers/syncController.ts +++ b/src/controllers/syncController.ts @@ -144,7 +144,9 @@ async function processDatabaseSync(database: any) { for (const op of ops) { const existData = existingRecords.find( - (record) => record.c_invoice_id === op.c_invoice_id + (record) => + JSON.stringify(record.c_invoice_id) === + JSON.stringify(op.c_invoice_id) ); const existingId = existData ? existData.id : null; if (existingId) {