mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
Replaceable Create Payment link on the customer page
view_customers_show_payment_link lets a plugin replace the link that opens QuickBooks' receive payment screen (redmine_qbo_billing receives payments in Redmine). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
2 files changed
+9
-2
No files matched your search
@@ -110,6 +110,7 @@ Available hooks:
|
|||||||
|--|--|--|
|
|--|--|--|
|
||||||
View Hook|:view_customers_show_contextual, { customer: @customer } | Used to add action links to the customer page's top-right action area (return links styled like Redmine's, e.g. `link_to sprite_icon('add', 'Label'), path, class: 'icon icon-add'`). Replaces `customer_actions_top` / `customer_actions_bottom`
|
View Hook|:view_customers_show_contextual, { customer: @customer } | Used to add action links to the customer page's top-right action area (return links styled like Redmine's, e.g. `link_to sprite_icon('add', 'Label'), path, class: 'icon icon-add'`). Replaces `customer_actions_top` / `customer_actions_bottom`
|
||||||
View Hook|:view_customers_show_estimate_link, { customer: @customer } | Replaces the customer page's Create Estimate link (which opens QuickBooks) with the link a plugin returns
|
View Hook|:view_customers_show_estimate_link, { customer: @customer } | Replaces the customer page's Create Estimate link (which opens QuickBooks) with the link a plugin returns
|
||||||
|
View Hook|:view_customers_show_payment_link, { customer: @customer } | Replaces the customer page's Create Payment link (which opens QuickBooks) with the link a plugin returns
|
||||||
View Hook|:view_invoice_actions, { invoice: invoice } | Used to add small action links after an invoice on the customer page's invoice list (e.g. an Edit link)
|
View Hook|:view_invoice_actions, { invoice: invoice } | Used to add small action links after an invoice on the customer page's invoice list (e.g. an Edit link)
|
||||||
View Hook|:view_estimate_actions, { estimate: estimate } | Used to add small action links after an estimate on the customer page's estimate list and the issue page (e.g. an Edit link)
|
View Hook|:view_estimate_actions, { estimate: estimate } | Used to add small action links after an estimate on the customer page's estimate list and the issue page (e.g. an Edit link)
|
||||||
View Hook|:pdf_left, { issue: issue } | Used to add text to left side of PDF
|
View Hook|:pdf_left, { issue: issue } | Used to add text to left side of PDF
|
||||||
|
|||||||
@@ -12,8 +12,14 @@
|
|||||||
<%= link_to sprite_icon('document', l(:label_create_estimate)), "https://qbo.intuit.com/app/estimate?nameId=#{@customer.id}",
|
<%= link_to sprite_icon('document', l(:label_create_estimate)), "https://qbo.intuit.com/app/estimate?nameId=#{@customer.id}",
|
||||||
class: 'icon icon-document', target: :_blank %>
|
class: 'icon icon-document', target: :_blank %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to sprite_icon('add', l(:label_create_payment)), "https://qbo.intuit.com/app/recvpayment?nameId=#{@customer.id}",
|
<%# A plugin can replace the Create Payment link (e.g. redmine_qbo_billing receives payments in Redmine) %>
|
||||||
class: 'icon icon-add', target: :_blank %>
|
<% payment_link = call_hook(:view_customers_show_payment_link, { customer: @customer }) %>
|
||||||
|
<% if payment_link.present? %>
|
||||||
|
<%= payment_link %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to sprite_icon('add', l(:label_create_payment)), "https://qbo.intuit.com/app/recvpayment?nameId=#{@customer.id}",
|
||||||
|
class: 'icon icon-add', target: :_blank %>
|
||||||
|
<% end %>
|
||||||
<% if User.current.allowed_to?(:edit_customers, nil, global: true) %>
|
<% if User.current.allowed_to?(:edit_customers, nil, global: true) %>
|
||||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_customer_path(@customer),
|
<%= link_to sprite_icon('edit', l(:button_edit)), edit_customer_path(@customer),
|
||||||
class: 'icon icon-edit', accesskey: accesskey(:edit) %>
|
class: 'icon icon-edit', accesskey: accesskey(:edit) %>
|
||||||
|
|||||||
Reference in new issue
Block a user