mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-04 17:21:57 -04:00
Compare commits
4 Commits
b95a3b6623
...
485a977d1a
| Author | SHA1 | Date | |
|---|---|---|---|
| 485a977d1a | |||
| 03d5a5d148 | |||
| 0deab9dbd3 | |||
| 899c9878c4 |
@@ -109,10 +109,10 @@ class SyncServiceBase
|
|||||||
if local.changed?
|
if local.changed?
|
||||||
local.save!
|
local.save!
|
||||||
log "Updated #{@entity.name} #{remote.id}"
|
log "Updated #{@entity.name} #{remote.id}"
|
||||||
end
|
|
||||||
|
|
||||||
# Handle attaching documents if applicable to invoices
|
# Handle attaching documents if applicable to invoices
|
||||||
attach_documents(local, remote)
|
attach_documents(local, remote)
|
||||||
|
end
|
||||||
|
|
||||||
rescue => e
|
rescue => e
|
||||||
log "Failed to sync #{@entity.name} #{remote.id}: #{e.message}"
|
log "Failed to sync #{@entity.name} #{remote.id}: #{e.message}"
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%=t(:label_primary_phone)%></th>
|
<th><%=t(:label_primary_phone)%></th>
|
||||||
<td><%= number_to_phone(customer.primary_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.primary_phone %></td>
|
<td><%= number_to_phone(customer&.primary_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%=t(:label_mobile_phone)%></th>
|
<th><%=t(:label_mobile_phone)%></th>
|
||||||
<td><%= number_to_phone(customer.mobile_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.mobile_phone %></td>
|
<td><%= number_to_phone(customer&.mobile_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<b><%=t(:label_last_sync)%>: </b> <%= Qbo.last_sync if Qbo.exists? %>
|
<b><%=t(:label_last_sync)%>: </b> <%= Qbo.last_sync %>
|
||||||
|
|||||||
@@ -66,12 +66,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%=t(:label_oauth_expires)%></th>
|
<th><%=t(:label_oauth_expires)%></th>
|
||||||
<td><%= if Qbo.exists? then QboConnectionService.current!.oauth2_access_token_expires_at end %>
|
<td><%= QboConnectionService.current!&.oauth2_access_token_expires_at %>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%=t(:label_oauth2_refresh_token_expires_at)%></th>
|
<th><%=t(:label_oauth2_refresh_token_expires_at)%></th>
|
||||||
<td><%= if Qbo.exists? then QboConnectionService.current!.oauth2_refresh_token_expires_at end %>
|
<td><%= QboConnectionService.current!&.oauth2_refresh_token_expires_at %>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
2
init.rb
2
init.rb
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo do
|
|||||||
name 'Redmine QBO plugin'
|
name 'Redmine QBO plugin'
|
||||||
author 'Rick Barrette'
|
author 'Rick Barrette'
|
||||||
description 'A pluging for Redmine to connect with QuickBooks Online to create Time Activity Entries for billable hours logged when an Issue is closed'
|
description 'A pluging for Redmine to connect with QuickBooks Online to create Time Activity Entries for billable hours logged when an Issue is closed'
|
||||||
version '2026.2.16'
|
version '2026.3.0'
|
||||||
url 'https://github.com/rickbarrette/redmine_qbo'
|
url 'https://github.com/rickbarrette/redmine_qbo'
|
||||||
author_url 'https://barrettefabrication.com'
|
author_url 'https://barrettefabrication.com'
|
||||||
settings default: {empty: true}, partial: 'qbo/settings'
|
settings default: {empty: true}, partial: 'qbo/settings'
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module RedmineQbo
|
|||||||
#Employee.update_all
|
#Employee.update_all
|
||||||
|
|
||||||
# Check to see if there is a quickbooks user attached to the issue
|
# Check to see if there is a quickbooks user attached to the issue
|
||||||
@selected = context[:user].employee.id if context[:user].employee
|
@selected = context[:user]&.employee&.id
|
||||||
|
|
||||||
# Generate the drop down list of quickbooks contacts
|
# Generate the drop down list of quickbooks contacts
|
||||||
return "<p>#{context[:form].select :employee_id, Employee.all.pluck(:name, :id), selected: @selected, include_blank: true}</p>"
|
return "<p>#{context[:form].select :employee_id, Employee.all.pluck(:name, :id), selected: @selected, include_blank: true}</p>"
|
||||||
|
|||||||
Reference in New Issue
Block a user