Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9501216525 | ||
|
|
73e643a6f9 |
No files matched your search
@@ -28,7 +28,7 @@ Returns, canceled orders and refunded deposits are deducted from the month's sal
|
||||
|
||||
Once the month is over, **Approve for payroll** reads QuickBooks one last time. It records the sales, deductions, threshold, rates and payouts, so the month no longer changes with QuickBooks or the settings. **Payroll CSV** downloads each rep's payout. **Reopen** puts an approved month back to being worked out from QuickBooks; the unticked items, adjustments and notes are kept.
|
||||
|
||||
Approvers see each transaction linked to QuickBooks, and the list of months with the month picker.
|
||||
Approvers see each invoice linked to its page in Redmine (or its PDF without the Write invoices permission), the sales receipts, refund receipts and credit memos linked to QuickBooks, and the list of months with the month picker.
|
||||
|
||||
## Requirements
|
||||
|
||||
|
||||
@@ -17,10 +17,17 @@ module SalesCommissionsHelper
|
||||
RedmineQboCommission.format_rate(rate)
|
||||
end
|
||||
|
||||
# The transaction's number, linked to it in QuickBooks for those who approve
|
||||
# The transaction's number, linked for those who approve: an invoice opens in Redmine (its invoice page, or its
|
||||
# PDF without the Write invoices permission); the others, which Redmine has no page for, open in QuickBooks
|
||||
def commission_txn_link(txn, can_approve)
|
||||
label = txn.doc_number.present? ? "##{txn.doc_number}" : txn.kind_name
|
||||
can_approve ? link_to(label, txn.qbo_url, target: '_blank', rel: 'noopener') : label
|
||||
return label unless can_approve
|
||||
|
||||
if txn.kind == 'invoice'
|
||||
link_to(label, RedmineQboBilling.invoice_writer? ? edit_qbo_invoice_path(txn.txn_id) : invoice_path(txn.txn_id))
|
||||
else
|
||||
link_to(label, txn.qbo_url, target: '_blank', rel: 'noopener')
|
||||
end
|
||||
end
|
||||
|
||||
# "Approved by Jane Smith on 12/03/2026 09:15 AM"
|
||||
|
||||
@@ -15,7 +15,7 @@ Redmine::Plugin.register :redmine_qbo_commission do
|
||||
author 'Rick Barrette'
|
||||
description 'Monthly sales commission (SOP-OPS-013): totals the month\'s paid sales from QuickBooks Online, ' \
|
||||
'works out the commission pool, and records each sales rep\'s payout for payroll'
|
||||
version '2026.11.0'
|
||||
version '2026.11.1'
|
||||
url 'https://gitea.rickbarrette.org/ricky/redmine_qbo_commission'
|
||||
author_url 'https://barrettefabrication.com'
|
||||
requires_redmine version_or_higher: '7.0.0'
|
||||
|
||||
@@ -57,6 +57,10 @@ class SalesCommissionsTest < Redmine::IntegrationTest
|
||||
assert_select 'input[name=?][value=?][checked]', 'included[]', 'refund_receipt:3'
|
||||
assert_select 'input[name=?][value="2"][checked]', 'eligible[]'
|
||||
assert_select 'input[name=approve]'
|
||||
# Invoices open in Redmine, the refund receipt (no Redmine page) in QuickBooks
|
||||
assert_select '#sales-commission-sales a[href=?]', '/qbo_invoices/1/edit'
|
||||
assert_select '#sales-commission-sales a[href*="qbo.intuit.com"]', count: 0
|
||||
assert_select '#sales-commission-deductions a[href*="qbo.intuit.com/app/refundreceipt?txnId=3"]'
|
||||
end
|
||||
|
||||
def test_view_only
|
||||
|
||||
Reference in new issue
Block a user