Show estimate, invoice and payment activity on the activity page

Each type appears only on the overall activity page, and only for users who may see it:
estimates need View customers or Write estimates, invoices View customers or Write invoices,
and payments View or Receive payments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-03 21:53:13 -05:00
1 parent dbee228cdf
commit 159420fac1
10 files changed
+185

No files matched your search

+6
View File
@@ -17,6 +17,12 @@ class Estimate < QboBaseModel
self.primary_key = :id
qbo_sync push: false
include QboActivity
qbo_activity 'qbo_estimates', icon: 'qbo-estimate', permissions: %i[view_customers write_estimates],
title: ->(e) { I18n.t(:label_activity_estimate, number: e.doc_number, customer: e.activity_customer) },
description: ->(e) { [e.activity_money(e[:total_amount]), e[:txn_status]].compact.join(' · ') },
url: ->(e) { { controller: 'estimates', action: 'show', id: e.id } }
def name
to_s
end