From b80dbaa0152b32e308b82d611e746e0fe2551ca2 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sat, 28 Feb 2026 09:11:01 -0500 Subject: [PATCH] Fix: Update last_update query to use correct timestamp field for customer sync --- app/services/customer_sync_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/customer_sync_service.rb b/app/services/customer_sync_service.rb index 23919ee..78afc43 100644 --- a/app/services/customer_sync_service.rb +++ b/app/services/customer_sync_service.rb @@ -56,7 +56,7 @@ class CustomerSyncService if full_sync service.query("SELECT * FROM Customer STARTPOSITION #{start_position} MAXRESULTS #{PAGE_SIZE}") else - last_update = Customer.maximum(:qbo_updated_at) || 1.year.ago + last_update = Customer.maximum(:updated_at) || 1.year.ago service.query(<<~SQL.squish) SELECT * FROM Customer WHERE MetaData.LastUpdatedTime > '#{last_update.utc.iso8601}'