mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
Sync services and other items without a description or rate
QuickBooks only requires an item's name, but the local Item required a description and a rate, so services such as Labor (often with neither) failed validation and were silently skipped by the sync. Name is now the only requirement; a missing description syncs as blank and a missing rate as 0. Product/service pickers and the labor setting list sellable items only (no Categories or Bundles). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
6 files changed
+18
-6
No files matched your search
@@ -23,7 +23,7 @@ class ItemsController < ApplicationController
|
||||
term = ActiveRecord::Base.sanitize_sql_like(params[:q].to_s)
|
||||
|
||||
items = Item.where("description LIKE :t OR name LIKE :t OR sku LIKE :t", t: "%#{term}%")
|
||||
.where(active: true)
|
||||
.merge(Item.sellable)
|
||||
.order(:description)
|
||||
.limit(20)
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class QboEstimatesController < ApplicationController
|
||||
def items
|
||||
|
||||
term = "%#{ActiveRecord::Base.sanitize_sql_like(params[:q].to_s.strip)}%"
|
||||
items = Item.where(active: true)
|
||||
items = Item.sellable
|
||||
.where("name LIKE :t OR sku LIKE :t OR description LIKE :t", t: term)
|
||||
.order(:name)
|
||||
.limit(25)
|
||||
|
||||
Reference in new issue
Block a user