diff --git a/app/models/audit.rb b/app/models/audit.rb index ab0634915f..3c8a613cf2 100644 --- a/app/models/audit.rb +++ b/app/models/audit.rb @@ -41,7 +41,7 @@ def self.finalized_since?(itemizable, *location_ids) item_ids = itemizable.line_items.pluck(:item_id) where(status: "finalized") .where(storage_location_id: location_ids) - .where(created_at: itemizable.created_at..) + .where(updated_at: itemizable.created_at..) .joins(:line_items) .where(line_items: {item_id: item_ids}) .exists?