mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 08:21:57 -04:00
Fix: Update last_update query to use correct timestamp field for employee sync
This commit is contained in:
@@ -56,7 +56,7 @@ class EmployeeSyncService
|
|||||||
if full_sync
|
if full_sync
|
||||||
service.query("SELECT * FROM Employee STARTPOSITION #{start_position} MAXRESULTS #{PAGE_SIZE}")
|
service.query("SELECT * FROM Employee STARTPOSITION #{start_position} MAXRESULTS #{PAGE_SIZE}")
|
||||||
else
|
else
|
||||||
last_update = Employee.maximum(:qbo_updated_at) || 1.year.ago
|
last_update = Employee.maximum(:updated_at) || 1.year.ago
|
||||||
service.query(<<~SQL.squish)
|
service.query(<<~SQL.squish)
|
||||||
SELECT * FROM Employee
|
SELECT * FROM Employee
|
||||||
WHERE MetaData.LastUpdatedTime > '#{last_update.utc.iso8601}'
|
WHERE MetaData.LastUpdatedTime > '#{last_update.utc.iso8601}'
|
||||||
|
|||||||
Reference in New Issue
Block a user