mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-12-29 14:11:00 -05:00
Estimates are now attached to issues and displayed on the issue
This commit is contained in:
@@ -69,6 +69,7 @@ class QboController < ApplicationController
|
||||
QboCustomers.update_all
|
||||
QboItem.update_all
|
||||
QboEmployee.update_all
|
||||
QboEstimate.update_all
|
||||
end
|
||||
|
||||
redirect_to qbo_path(:redmine_qbo), :flash => { :notice => "Successfully synced to Quickbooks" }
|
||||
|
||||
@@ -21,8 +21,8 @@ class QboEstimate < ActiveRecord::Base
|
||||
def self.update_all
|
||||
# Update the item table
|
||||
get_base.service.all.each { |estimate|
|
||||
qbo_estimate = QboItem.find_or_create_by(id: estimate.id)
|
||||
qbo_estimate.name = estimate.doc_number
|
||||
qbo_estimate = QboEstimate.find_or_create_by(id: estimate.id)
|
||||
qbo_estimate.doc_number = estimate.doc_number
|
||||
qbo_estimate.id = estimate.id
|
||||
qbo_estimate.save!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user