mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-04-02 15:11:58 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1367937614 | |||
| 62adcb11cd | |||
| 896813983c | |||
| 89e3048c29 |
@@ -21,7 +21,7 @@ This plugin allows **billable line items** to be attached to a Redmine issue. Wh
|
||||
|
||||
| Plugin Version | Redmine Version | Ruby Version |
|
||||
| --- | --- | --- |
|
||||
| 2026.3.5+ | 6.1.x | 3.2+ |
|
||||
| 2026.3.6+ | 6.1.x | 3.2+ |
|
||||
|
||||
---
|
||||
|
||||
@@ -114,4 +114,4 @@ Before using this plugin:
|
||||
>
|
||||
> 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.
|
||||
> 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.
|
||||
|
||||
@@ -14,6 +14,7 @@ class Item < QboBaseModel
|
||||
validates_presence_of :id, :description
|
||||
validates :unit_price, numericality: { greater_than_or_equal_to: 0 }
|
||||
self.primary_key = :id
|
||||
qbo_sync push: true
|
||||
|
||||
# Updates Both local & remote DB description
|
||||
def description=(s)
|
||||
|
||||
@@ -22,19 +22,7 @@ class ItemSyncService < SyncServiceBase
|
||||
20
|
||||
end
|
||||
|
||||
# Map relevant attributes from the QBO Employee to the local Employee model
|
||||
def process_attributes(local, remote)
|
||||
log "Processing Item ##{remote.id}"
|
||||
local.id = remote.id
|
||||
local.description = remote.description
|
||||
local.unit_price = remote.unit_price
|
||||
local.active = remote.active?
|
||||
local.name = remote.name
|
||||
local.sku = remote.sku
|
||||
end
|
||||
|
||||
def log(msg)
|
||||
Rails.logger.info "[ItemSyncService] #{msg}"
|
||||
end
|
||||
|
||||
map_attribute :active, :active?
|
||||
map_attributes :description, :id, :name, :sku, :unit_price
|
||||
|
||||
end
|
||||
4
init.rb
4
init.rb
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
|
||||
name 'Redmine QBO Line Items plugin'
|
||||
author 'Rick Barrette'
|
||||
description 'A plugin for Redmine to extend the capabilitys of the Redmine QuickBooks Online plugin to attach billable line items to an isuue'
|
||||
version '2026.3.7'
|
||||
version '2026.3.8'
|
||||
url 'https://github.com/rickbarrette/redmine_qbo_lineitems'
|
||||
author_url 'https://barrettefabrication.com'
|
||||
requires_redmine version_or_higher: '6.1.0'
|
||||
@@ -22,7 +22,7 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
|
||||
|
||||
# Ensure redmine_qbo is installed
|
||||
begin
|
||||
requires_redmine_plugin :redmine_qbo, version_or_higher: '2026.3.6'
|
||||
requires_redmine_plugin :redmine_qbo, version_or_higher: '2026.3.7'
|
||||
rescue Redmine::PluginNotFound
|
||||
raise 'Please install the redmine_qbo plugin (https://github.com/rickbarrette/redmine_qbo)'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user