Refunds for canceled orders and returned parts (SOP-OPS-014)

A Refund page on the customer: the canceled order's estimate fills in
the parts the 30% restocking fee is worked out on. Refunding makes the
fee invoice, pays it from the customer's credit, records the rest as a
Check (company check) or Expense (card refund on the terminal) with the
category Accounts Receivable, applies the credit to it so the balance
comes back to $0.00, and optionally marks the estimate Rejected,
cancels its work orders with the reason as a note and emails the
customer. Each refund has a page with a PDF of it.

New permission: Issue refunds. New settings under Billing » Refunds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-16 20:43:36 -05:00
1 parent 16f9441568
commit 9fa199aa98
21 files changed
+1737

No files matched your search

+5
View File
@@ -83,6 +83,11 @@ module RedmineQboBilling
user.allowed_to?(:receive_payments, nil, global: true)
end
# True when the user may refund customers' credit (SOP-OPS-014)
def self.refunder?(user = User.current)
user.allowed_to?(:issue_refunds, nil, global: true)
end
# True when the user may see customer payments (receiving them includes seeing them)
def self.payment_viewer?(user = User.current)
user.allowed_to?(:view_payments, nil, global: true) || payment_receiver?(user)