Files
redmine_qbo/app/views/customers/_details.html.erb
2024-08-21 21:39:50 -04:00

52 lines
1.4 KiB
Plaintext

<table>
<tbody>
<tr>
<th><%=t(:label_name)%></th>
<td><%= customer.name %></td>
</tr>
<tr>
<th><%=t(:label_email)%></th>
<td><%= customer.email %></td>
</tr>
<tr>
<th><%=t(:label_primary_phone)%></th>
<td><%= number_to_phone(customer.primary_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.primary_phone %></td>
</tr>
<tr>
<th><%=t(:label_mobile_phone)%></th>
<td><%= number_to_phone(customer.mobile_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.mobile_phone %></td>
</tr>
<tr>
<th><%=t(:label_billing_address)%></th>
<td><%= @billing_address %></td>
</tr>
<tr>
<th><%=t(:label_shipping_address)%></th>
<td><%= @shipping_address %></td>
</tr>
<tr>
<th><%=t(:label_account_balance)%></th>
<td>$<%= customer.balance %></td>
</tr>
<tr>
<th><%=t(:field_notes)%></th>
<td><%= customer.notes %></td>
</tr>
</tbody>
</table>
<div style="float: right;">
<%= button_to t(:label_edit_customer), edit_customer_path(customer), method: :get%>
<%= link_to t(:label_appointment), "https://calendar.google.com/calendar/render?action=TEMPLATE&text=#{customer.name}+-&details=#{customer.primary_phone}&dates=#{Time.now.strftime("%Y%m%d")}T090000/#{Time.now.strftime("%Y%m%d")}T170000", target: :_blank %>
</div>
<br/>
<br/>