%# Estimate and invoice drafts (QboDraft) with Continue and Delete. show_customer: false on a customer's page. %> <% show_customer = local_assigns.fetch(:show_customer, true) %>
| <%= l(:label_qbo_draft_document) %> | <% if show_customer %><%= l(:field_customer) %> | <% end %><%= l(:label_qbo_draft_lines) %> | <%= l(:label_subtotal) %> | <%= l(:label_qbo_draft_saved_by) %> | |
|---|---|---|---|---|---|
| <%= link_to l(draft.invoice? ? :label_qbo_invoice_draft : :label_qbo_estimate_draft), draft.invoice? ? new_qbo_invoice_path(draft_id: draft.id) : new_qbo_estimate_path(draft_id: draft.id) %> | <% if show_customer %><%= draft.customer ? link_to(draft.customer.name, customer_path(draft.customer)) : (draft.customer_name || '–') %> | <% end %><%= draft.line_count %> | <%= number_to_currency(draft.subtotal) %> | <%= l(:text_qbo_draft_saved_by, user: h(draft.user&.name || l(:label_user_anonymous)), age: time_tag(draft.updated_at)).html_safe %> | <%= link_to sprite_icon('edit', l(:button_qbo_continue_draft)), draft.invoice? ? new_qbo_invoice_path(draft_id: draft.id) : new_qbo_estimate_path(draft_id: draft.id), class: 'icon icon-edit' %> <%= link_to sprite_icon('del', l(:button_delete)), qbo_draft_path(draft), method: :delete, data: { confirm: l(:text_are_you_sure) }, class: 'icon icon-del' %> |