fixed estimate#sync

This commit is contained in:
2026-03-17 23:31:42 -04:00
parent f60e507029
commit 7d3908ec41
2 changed files with 1 additions and 8 deletions

View File

@@ -77,13 +77,6 @@ class EstimateController < ApplicationController
redirect_back fallback_location: root_path, flash: { error: I18n.t(:notice_estimate_not_found) } redirect_back fallback_location: root_path, flash: { error: I18n.t(:notice_estimate_not_found) }
end end
def sync
Estimate.sync
redirect_to :home, flash: { notice: I18n.t(:label_syncing) }
end
private
# Logs messages with a consistent prefix for easier debugging. # Logs messages with a consistent prefix for easier debugging.
def log(msg) def log(msg)
Rails.logger.info "[EstimateController] #{msg}" Rails.logger.info "[EstimateController] #{msg}"

View File

@@ -23,7 +23,7 @@ get 'estimates/sync', to: 'estimate#sync'
post 'qbo/webhook', to: 'qbo#webhook' post 'qbo/webhook', to: 'qbo#webhook'
# Estimate & Invoice PDF # Estimate & Invoice PDF
get 'estimates/:id', to: 'estimate#show', as: :estimate get 'estimates/sync', to: 'estimate#sync'
get 'estimates/doc/', to: 'estimate#doc', as: :estimate_doc get 'estimates/doc/', to: 'estimate#doc', as: :estimate_doc
get 'invoices/:id', to: 'invoice#show', as: :invoice get 'invoices/:id', to: 'invoice#show', as: :invoice