Invoice page hook for plugin actions

:view_qbo_invoice_contextual, { invoice_id:, customer_id:, doc_number: }
in the invoice page's top-right actions, like the estimate page's hook
(used by redmine_qbo_labels' Print label).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-16 08:42:08 -05:00
1 parent 90adb96d54
commit 5c48646041
2 files changed
+3

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
<% html_title "#{l(:label_invoice)} ##{@form.doc_number}" %>
<div class="contextual">
<%# Plugins add invoice actions here (e.g. redmine_qbo_labels' Print label) %>
<%= call_hook :view_qbo_invoice_contextual, { invoice_id: @form.id, customer_id: @form.customer_id, doc_number: @form.doc_number } %>
<% if RedmineQboBilling.payment_receiver? && @form.balance.to_d > 0 %>
<%= link_to sprite_icon('add', l(:button_receive_payment)), new_qbo_payment_path(customer_id: @form.customer_id), class: 'icon icon-add' %>
<% end %>