62 lines
4.8 KiB
Markdown
62 lines
4.8 KiB
Markdown
# Redmine QBO Commission
|
|
|
|
The monthly sales commission for sales reps, service advisors and counter sales staff (SOP-OPS-013, *Monthly Sales Commission & Revenue Bonus*). The month's paid sales are read from QuickBooks Online and the commission pool is worked out. Management then approves the month, and each rep's payout is recorded for payroll.
|
|
|
|
* **Threshold**: no commission for a month below $100,000 of sales. At or above it, the whole month counts, from the first dollar.
|
|
* **Rates** (marginal): 0.5% of sales up to $125,000, 0.75% from $125,000 to $150,000, and 1% above $150,000. A $150,000 month pays $625.00 + $187.50 = $812.50.
|
|
* **Payouts**: every eligible rep is paid the whole commission. A rep isn't paid for a month if they're inactive, or if any day of the month falls in their 90-day probation. The approver can also untick a rep for the month.
|
|
|
|
All the numbers can be changed in the settings.
|
|
|
|
## What counts as a sale
|
|
|
|
* **Invoices paid in full in the month.** An invoice is paid in full on the later of its own date and the date of the last payment or credit memo applied to it. A deposit taken months before the work counts in the month the job was invoiced and the last of it paid. These come from Redmine's own copy of the invoices: redmine_qbo keeps each invoice's sales tax and the day it was paid in full, up to date through QuickBooks' webhooks, so a month opens without reading its invoices from QuickBooks.
|
|
* **Sales receipts dated in the month** (counter sales paid on the spot). These can be turned off in the settings.
|
|
|
|
Amounts are without sales tax: the page shows each transaction's total, tax and the amount that counts. Voided transactions ($0) don't count.
|
|
|
|
## Deductions
|
|
|
|
Returns, canceled orders and refunded deposits are deducted from the month's sales (SOP-OPS-013 §4):
|
|
|
|
* **Refund receipts and credit memos dated in the month** are listed and ticked. Untick one that isn't a return. Credit memos made only of the products/services picked in the settings aren't listed. The tech bonus credit memos from [redmine_qbo_bonus](https://gitea.rickbarrette.org/ricky/redmine_qbo_bonus) are always left out.
|
|
* **Adjustments** cover anything QuickBooks doesn't show as a refund, such as a return refunded by company check. A negative adjustment adds sales back.
|
|
|
|
## Approving a month
|
|
|
|
**Sales commission** in the top menu opens this month, so far. It shows the month's sales, how far they are from the threshold, the pool, and each rep's payout. The sales receipts, refund receipts and credit memos are read from QuickBooks, all three at once, and kept for 15 minutes. **Read from QuickBooks** brings everything up to date now: it syncs the invoices changed in QuickBooks since the last sync, and reads the receipts and credit memos again.
|
|
|
|
Once the month is over, **Approve for payroll** does the same 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 invoice linked to its page in Redmine (or its PDF without the Write invoices permission), each sales receipt, refund receipt and credit memo linked to QuickBooks' PDF of it (opened through Redmine, without signing in to QuickBooks), and the list of months with the month picker.
|
|
|
|
## Requirements
|
|
|
|
* Redmine 7
|
|
* redmine_qbo 2026.11.21 or later, connected to QuickBooks Online, with its webhook set up (so invoices and payments stay up to date)
|
|
|
|
## Installation
|
|
|
|
```
|
|
cd /path/to/redmine/plugins
|
|
git clone https://gitea.rickbarrette.org/ricky/redmine_qbo_commission.git
|
|
cd ..
|
|
bundle exec rake redmine:plugins:migrate
|
|
```
|
|
|
|
Restart Redmine, then:
|
|
|
|
1. **Administration » Commission reps**: add each sales rep, with the last day of their probation if they're in it.
|
|
2. **Administration » Plugins » Redmine QBO Commission plugin » Configure**: check the threshold, rates and what counts.
|
|
3. **Administration » Roles and permissions**: give **Approve sales commission** to Management and Bookkeeping. Give **View sales commission** to the sales reps, so they can follow the month toward the threshold. Both are global permissions, so they apply to any role the user has in any project.
|
|
|
|
After upgrading redmine_qbo to 2026.11.21, run a **Full sync** once (**Administration » Plugins » QuickBooks**), so invoices paid before the upgrade get the day they were paid in full. Until then, approvers see a warning on the month's page, and those invoices aren't counted.
|
|
|
|
**View sales commission** shows a month's sales, pool and payouts, read-only. It doesn't link to QuickBooks, list the months, change or approve a month, or download the payroll CSV.
|
|
|
|
## Tests
|
|
|
|
```
|
|
RAILS_ENV=test bundle exec rake redmine:plugins:test NAME=redmine_qbo_commission
|
|
```
|