mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
An estimate that's Converted or Closed in QuickBooks, or linked to an invoice, opens read-only and is refused on save (this includes redmine_qbo_lineitems' estimates once invoiced). Its page lists the invoices it's on. Estimates cache their status so lists show View instead of Edit for them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
9 lines
588 B
ERB
9 lines
588 B
ERB
<%# Billed estimates and estimates linked to an issue are read-only here, so they get a View link instead of Edit %>
|
|
<% if estimate.billed? || estimate.issues.exists? %>
|
|
<%= link_to sprite_icon('zoom-in', l(:button_view_estimate)), edit_qbo_estimate_path(estimate.id),
|
|
class: 'icon-only icon-zoom-in qbo-estimate-edit-link', title: l(:button_view_estimate) %>
|
|
<% else %>
|
|
<%= link_to sprite_icon('edit', l(:button_edit)), edit_qbo_estimate_path(estimate.id),
|
|
class: 'icon-only icon-edit qbo-estimate-edit-link', title: l(:button_edit_estimate) %>
|
|
<% end %>
|