fix: update database sync process to improve record filtering and logging details
Deploy Application / deploy (push) Successful in 36s Details

This commit is contained in:
faisolavolut 2025-11-20 14:47:49 +07:00
parent 1ee8c91611
commit 2425144d6c
1 changed files with 1 additions and 2 deletions

View File

@ -137,7 +137,6 @@ async function processDatabaseSync(database: any) {
const invoiceIds = ops.map((op) => op.c_invoice_id).filter(Boolean);
const existingRecords = await db.rv_openitem.findMany({
where: {
c_invoice_id: { in: invoiceIds },
db_id: database.db_id,
},
select: { id: true, c_invoice_id: true },
@ -204,7 +203,7 @@ async function processDatabaseSync(database: any) {
action: "sync_rv_openitem",
status: "success",
message: `Completed sync for database ${database.name} (${database.db_id})`,
extra_json: database,
extra_json: { database, inserted: dbInserted, updated: dbUpdated },
},
});