Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7029aa70dc | ||
|
|
ff9556e728 |
No files matched your search
@@ -285,6 +285,22 @@ Other plugins create estimates with `RedmineQboBilling::EstimateWriter.create_es
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
|
|
||||||
|
All names and figures are made up.
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr><td width="50%"><img src="Screenshots/issue.png" alt="An issue with its customer, estimate and invoice, and Bill Time / Share"><br><sub>An issue with its customer, estimate and invoice, and Bill Time / Share</sub></td><td width="50%"><img src="Screenshots/issue_form.png" alt="The customer and estimate on the issue form"><br><sub>The customer and estimate on the issue form</sub></td></tr>
|
||||||
|
<tr><td width="50%"><img src="Screenshots/issue_list.png" alt="The Customer column in issue lists"><br><sub>The Customer column in issue lists</sub></td><td width="50%"><img src="Screenshots/customers.png" alt="Customers, searchable by name or phone"><br><sub>Customers, searchable by name or phone</sub></td></tr>
|
||||||
|
<tr><td width="50%"><img src="Screenshots/customer.png" alt="A customer: QuickBooks details, estimates and invoices"><br><sub>A customer: QuickBooks details, estimates and invoices</sub></td><td width="50%"><img src="Screenshots/estimate_editor.png" alt="Writing an estimate"><br><sub>Writing an estimate</sub></td></tr>
|
||||||
|
<tr><td width="50%"><img src="Screenshots/estimate_linked_unlock.png" alt="An estimate linked to an issue, with Unlock to edit"><br><sub>An estimate linked to an issue, with Unlock to edit</sub></td><td width="50%"><img src="Screenshots/issues_from_estimate.png" alt="Creating issues from an estimate"><br><sub>Creating issues from an estimate</sub></td></tr>
|
||||||
|
<tr><td width="50%"><img src="Screenshots/invoice_editor.png" alt="Writing an invoice"><br><sub>Writing an invoice</sub></td><td width="50%"><img src="Screenshots/receive_payment.png" alt="Receiving a payment"><br><sub>Receiving a payment</sub></td></tr>
|
||||||
|
<tr><td width="50%"><img src="Screenshots/payment.png" alt="A payment and the invoices it paid"><br><sub>A payment and the invoices it paid</sub></td><td width="50%"><img src="Screenshots/business_report.png" alt="The business report"><br><sub>The business report</sub></td></tr>
|
||||||
|
<tr><td width="50%"><img src="Screenshots/plugin_config.png" alt="Plugin settings"><br><sub>Plugin settings</sub></td><td width="50%"><img src="Screenshots/user_edit.png" alt="Linking a user to a QuickBooks employee"><br><sub>Linking a user to a QuickBooks employee</sub></td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
|
|
||||||
Before installing the plugin:
|
Before installing the plugin:
|
||||||
|
|||||||
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 724 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 520 KiB After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 539 KiB |
|
Before Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 141 KiB |
@@ -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) : '' } %>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
@@ -13,27 +15,27 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t(:label_primary_phone) %></th>
|
<th><%= t(:label_primary_phone) %></th>
|
||||||
<td><%= number_to_phone(customer&.primary_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %></td>
|
<td><%= phone.call(customer&.primary_phone) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t(:label_mobile_phone) %></th>
|
<th><%= t(:label_mobile_phone) %></th>
|
||||||
<td><%= number_to_phone(customer&.mobile_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %></td>
|
<td><%= phone.call(customer&.mobile_phone) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t(:label_billing_address) %></th>
|
<th><%= t(:label_billing_address) %></th>
|
||||||
<td><pre><%= @billing_address %></pre></td>
|
<td><pre><%= RedmineQboBilling::EstimateWriter.format_address(customer.billing_address) %></pre></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t(:label_shipping_address) %></th>
|
<th><%= t(:label_shipping_address) %></th>
|
||||||
<td><pre><%= @shipping_address %></pre></td>
|
<td><pre><%= RedmineQboBilling::EstimateWriter.format_address(customer.shipping_address) %></pre></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t(:label_account_balance) %></th>
|
<th><%= t(:label_account_balance) %></th>
|
||||||
<td>$<%= customer.balance %></td>
|
<td><%= number_to_currency(customer.balance || 0) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% if customer.notes.present? %>
|
<% if customer.notes.present? %>
|
||||||
|
|||||||
@@ -72,6 +72,26 @@ class CustomersControllerTest < Redmine::IntegrationTest
|
|||||||
assert_response :not_found
|
assert_response :not_found
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_show_details_from_quickbooks
|
||||||
|
address = Quickbooks::Model::PhysicalAddress.new
|
||||||
|
address.line1 = '123 Main St'
|
||||||
|
address.city = 'Springfield'
|
||||||
|
address.country_sub_division_code = 'RI'
|
||||||
|
address.postal_code = '02900'
|
||||||
|
details = Quickbooks::Model::Customer.new(display_name: 'Jane Customer', balance: BigDecimal('125'))
|
||||||
|
details.billing_address = address
|
||||||
|
details.primary_phone = Quickbooks::Model::TelephoneNumber.new.tap { |t| t.free_form_number = '401-555-0101' }
|
||||||
|
@fake.customers['9101'] = details
|
||||||
|
grant(:view_customers)
|
||||||
|
get '/customers/9101'
|
||||||
|
rows = css_select('table tr').to_h { |tr| [tr.at('th')&.text.to_s.strip, tr.at('td')&.text.to_s.strip] }
|
||||||
|
assert_equal "123 Main St\nSpringfield, RI 02900", rows[I18n.t(:label_billing_address)]
|
||||||
|
assert_equal '(401) 555-0101', rows[I18n.t(:label_primary_phone)]
|
||||||
|
# No mobile number: blank, not "0"
|
||||||
|
assert_equal '', rows[I18n.t(:label_mobile_phone)]
|
||||||
|
assert_equal '$125.00', rows[I18n.t(:label_account_balance)]
|
||||||
|
end
|
||||||
|
|
||||||
def test_autocomplete
|
def test_autocomplete
|
||||||
grant(:view_customers)
|
grant(:view_customers)
|
||||||
get '/customers/autocomplete', params: { q: 'jane custmer' }
|
get '/customers/autocomplete', params: { q: 'jane custmer' }
|
||||||
|
|||||||