mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-08-18 20:30:43 -04:00
Compare commits
4
Commits
b3c3006b56
...
938f9d9f3b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
938f9d9f3b | ||
|
|
f2b0186ee2 | ||
|
|
9373963c94 | ||
|
|
396a56ceec |
@@ -108,6 +108,8 @@ Available hooks:
|
|||||||
|
|
||||||
|Type|Hook|Note
|
|Type|Hook|Note
|
||||||
|--|--|--|
|
|--|--|--|
|
||||||
|
View Hook|:customer_actions_top, { customer: @customer }| Used to add action links to customer view
|
||||||
|
View Hook|:customer_actions_bottom, { customer: @customer} | Used to add action links to customer view
|
||||||
View Hook|:pdf_left, { issue: issue } | Used to add text to left side of PDF
|
View Hook|:pdf_left, { issue: issue } | Used to add text to left side of PDF
|
||||||
View Hook|:pdf_right, { issue: issue } | Used to add text to right side of PDF
|
View Hook|:pdf_right, { issue: issue } | Used to add text to right side of PDF
|
||||||
View Hook|:show_customer_view_right, { customer: customer } | Used to show partials on right side of customer view
|
View Hook|:show_customer_view_right, { customer: customer } | Used to show partials on right side of customer view
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
class Estimate < QboBaseModel
|
class Estimate < QboBaseModel
|
||||||
|
|
||||||
has_and_belongs_to_many :issues
|
has_many :issues
|
||||||
belongs_to :customer
|
belongs_to :customer
|
||||||
validates_presence_of :doc_number, :id
|
validates_presence_of :doc_number, :id
|
||||||
self.primary_key = :id
|
self.primary_key = :id
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#The MIT License (MIT)
|
||||||
|
#
|
||||||
|
#Copyright (c) 2016 - 2026 rick barrette
|
||||||
|
#
|
||||||
|
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
class EstimateService < ServiceBase
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
<%= link_to t(:label_appointment), "https://calendar.google.com/calendar/render?action=TEMPLATE&text=#{@customer.name}+-&details=#{ link_to t(:customer_details), "https://#{Setting.host_name}#{customer_path @customer.id}"}%0A#{@customer.primary_phone}%3Cbr/%3E+&dates=#{Time.now.strftime("%Y%m%d")}T090000/#{Time.now.strftime("%Y%m%d")}T170000", target: :_blank, id: :appointment_link %>
|
<%= call_hook :customer_actions_top, { customer: @customer } %>
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<%= link_to t(:label_create_estimate), "https://qbo.intuit.com/app/estimate?nameId=#{@customer.id}", target: :_blank %>
|
<%= link_to t(:label_create_estimate), "https://qbo.intuit.com/app/estimate?nameId=#{@customer.id}", target: :_blank %>
|
||||||
|
|
||||||
@@ -13,4 +10,6 @@
|
|||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
<%= call_hook :customer_actions_bottom, { customer: @customer } %>
|
||||||
|
|
||||||
<%= button_to t(:label_edit_customer), edit_customer_path(@customer), method: :get%>
|
<%= button_to t(:label_edit_customer), edit_customer_path(@customer), method: :get%>
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ module RedmineQbo
|
|||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
prepended do
|
prepended do
|
||||||
belongs_to :customer, class_name: 'Customer', foreign_key: :customer_id, optional: true
|
belongs_to :customer
|
||||||
belongs_to :customer_token, primary_key: :id, optional: true
|
belongs_to :customer_token
|
||||||
belongs_to :estimate, primary_key: :id, optional: true
|
belongs_to :estimate
|
||||||
has_and_belongs_to_many :invoices
|
has_and_belongs_to_many :invoices
|
||||||
|
|
||||||
before_save :titlize_subject
|
before_save :titlize_subject
|
||||||
|
|||||||
Reference in New Issue
Block a user