diff --git a/Screenshots/issue.png b/Screenshots/issue.png deleted file mode 100644 index b5f3e5a..0000000 Binary files a/Screenshots/issue.png and /dev/null differ diff --git a/Screenshots/issue_form.png b/Screenshots/issue_form.png deleted file mode 100644 index 34a373d..0000000 Binary files a/Screenshots/issue_form.png and /dev/null differ diff --git a/Screenshots/plugin_config.png b/Screenshots/plugin_config.png deleted file mode 100644 index 55729c4..0000000 Binary files a/Screenshots/plugin_config.png and /dev/null differ diff --git a/Screenshots/plugin_cusomer_search.png b/Screenshots/plugin_cusomer_search.png deleted file mode 100644 index 2f97bb6..0000000 Binary files a/Screenshots/plugin_cusomer_search.png and /dev/null differ diff --git a/Screenshots/plugin_customer_detail.png b/Screenshots/plugin_customer_detail.png deleted file mode 100644 index edeb76a..0000000 Binary files a/Screenshots/plugin_customer_detail.png and /dev/null differ diff --git a/Screenshots/plugin_user_edit.png b/Screenshots/plugin_user_edit.png deleted file mode 100644 index 3dadac5..0000000 Binary files a/Screenshots/plugin_user_edit.png and /dev/null differ diff --git a/app/views/customers/_details.html.erb b/app/views/customers/_details.html.erb index 57f8d60..c727c09 100644 --- a/app/views/customers/_details.html.erb +++ b/app/views/customers/_details.html.erb @@ -1,3 +1,5 @@ +<%# Phone numbers as (401) 555-0101, left blank when the customer has none %> +<% phone = ->(number) { digits = number.to_s.gsub(/\D/, ''); digits.present? ? number_to_phone(digits.to_i, area_code: true) : '' } %>
| <%= t(:label_primary_phone) %> | -<%= number_to_phone(customer&.primary_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %> | +<%= phone.call(customer&.primary_phone) %> |
|---|---|---|
| <%= t(:label_mobile_phone) %> | -<%= number_to_phone(customer&.mobile_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %> | +<%= phone.call(customer&.mobile_phone) %> |
| <%= t(:label_billing_address) %> | -<%= @billing_address %> |
+ <%= RedmineQboBilling::EstimateWriter.format_address(customer.billing_address) %> |
| <%= t(:label_shipping_address) %> | -<%= @shipping_address %> |
+ <%= RedmineQboBilling::EstimateWriter.format_address(customer.shipping_address) %> |
| <%= t(:label_account_balance) %> | -$<%= customer.balance %> | +<%= number_to_currency(customer.balance || 0) %> |