2 Commits

Author SHA1 Message Date
55d00f9005 Added sandbox to settings 2025-07-08 21:01:48 -04:00
eba3f529f8 Set version & requirements 2025-07-08 20:19:19 -04:00
4 changed files with 15 additions and 6 deletions

View File

@@ -72,6 +72,10 @@ module QuickbooksOauth
oauth_consumer_key = Setting.plugin_redmine_qbo['settingsOAuthConsumerKey']
oauth_consumer_secret = Setting.plugin_redmine_qbo['settingsOAuthConsumerSecret']
# Are we are playing in the sandbox?
Quickbooks.sandbox_mode = Setting.plugin_redmine_qbo['sandbox'] ? true : false
logger.info "Sandbox mode: #{Quickbooks.sandbox_mode}"
options = {
site: "https://appcenter.intuit.com/connect/oauth2",
authorize_url: "https://appcenter.intuit.com/connect/oauth2",

View File

@@ -57,6 +57,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
</td>
</tr>
<tr>
<th><%=t(:label_sandbox)%></th>
<td>
<%= check_box_tag 'settings[sandbox]', @settings['sandbox'], @settings['sandbox'] %>
</td>
</tr>
<tr>
<th><%=t(:label_oauth_expires)%></th>
<td><%= if Qbo.exists? then Qbo.first.oauth2_access_token_expires_at end %>

View File

@@ -93,3 +93,4 @@ en:
label_actions: "Actions"
label_create_estimate: "Create Estimate"
label_syncing: "Syncing Quickbooks"
label_sandbox: "Sandbox"

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2023 rick barrette
#Copyright (c) 2016-2025 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:
#
@@ -22,11 +22,11 @@ Redmine::Plugin.register :redmine_qbo do
name 'Redmine Quickbooks Online plugin'
author 'Rick Barrette'
description 'This is a plugin for Redmine to intergrate with Quickbooks Online to allow for seamless intergration CRM and invoicing of completed issues'
version '2.1.1'
version '2025.7.1'
url 'https://github.com/rickbarrette/redmine_qbo'
author_url 'https://barrettefabrication.com'
settings :default => {'empty' => true}, :partial => 'qbo/settings'
requires_redmine :version_or_higher => '5.1.0'
requires_redmine :version_or_higher => '6.0.0'
# Add safe attributes for core models
Issue.safe_attributes 'customer_id'
@@ -39,9 +39,6 @@ Redmine::Plugin.register :redmine_qbo do
Project.safe_attributes 'customer_id'
Project.safe_attributes 'vehicle_id'
# We are playing in the sandbox
#Quickbooks.sandbox_mode = true
# set per_page globally
WillPaginate.per_page = 20