%# One row of the line table. key is the row's params key; rows are posted in table order. %>
<% name = "estimate[lines][#{key}]" %>
| <%= sprite_icon('reorder') %> |
<%= number %> |
<%= hidden_field_tag "#{name}[id]", line.id, id: nil %>
<%= hidden_field_tag "#{name}[item_id]", line.item_id, id: nil, class: 'qbo-line-item-id' %>
<%# Invoices: the QuickBooks time activity this line bills %>
<%= hidden_field_tag "#{name}[time_activity_id]", line.time_activity_id, id: nil, class: 'qbo-line-time-id' %>
<%= text_field_tag "#{name}[item_name]", line.item_name, id: nil, class: 'qbo-line-item-name',
autocomplete: 'off', aria: { label: l(:label_product_service) } %>
|
<%= l(:label_time_badge) %>
<%= text_area_tag "#{name}[description]", line.description, id: nil, rows: 1, class: 'qbo-line-description-input',
aria: { label: l(:field_description) } %>
|
<%= text_field_tag "#{name}[quantity]", line.quantity, id: nil, class: 'qbo-line-qty-input', inputmode: 'decimal',
autocomplete: 'off', aria: { label: l(:label_qty) } %>
|
<%= text_field_tag "#{name}[rate]", line.rate, id: nil, class: 'qbo-line-rate-input', inputmode: 'decimal',
autocomplete: 'off', aria: { label: l(:label_rate) } %>
|
<%# Typing an amount works out the rate, like QuickBooks; only qty and rate are posted %>
|
<%= hidden_field_tag "#{name}[taxable]", '0', id: nil %>
<%= check_box_tag "#{name}[taxable]", '1', line.taxable?, id: nil, class: 'qbo-line-taxable', aria: { label: l(:label_tax) } %>
|
|