Added Estimate & Invoice List to Customer view

This commit is contained in:
2022-02-19 21:19:08 -05:00
parent 49d2ed8244
commit a459d84b00
4 changed files with 40 additions and 2 deletions

View File

@@ -2,14 +2,27 @@
<br/> <br/>
<div class="subject"> <div class="subject">
<div><h3><%=t(:label_details)%>:</h3></div> <div><h4><%=t(:label_details)%>:</h4></div>
</div> </div>
<div class="attributes"> <div class="attributes">
<div class="splitcontent"> <div class="splitcontent">
<div class="splitcontentleft"> <div class="splitcontentleft">
<%= render :partial => 'customers/details', locals: {customer: @customer} %> <%= render :partial => 'customers/details', locals: {customer: @customer} %>
<div class="splitcontent">
<div class="splitcontentleft">
<h4><%=t(:estimates)%>:</h4>
<%= render :partial => 'estimates/list', locals: {customer: @customer} %>
</div>
<div class="splitcontentleft">
<h4><%=t(:label_invoices)%>:</h4>
<%= render :partial => 'invoices/list', locals: {customer: @customer} %>
</div>
</div>
</div> </div>
<div class="splitcontentleft"> <div class="splitcontentleft">
<h4><%=t(:field_vehicles)%>:</h4> <h4><%=t(:field_vehicles)%>:</h4>

View File

@@ -0,0 +1,11 @@
<% if @customer.present? %>
<% @customer.qbo_estimates.each do |estimate| %>
<div class="row">
<b><%= link_to "##{estimate.doc_number}", estimate_path(estimate) %> </b>
</div>
<% end %>
<% else %>
<p><%=t(:label_no_estimates)%>.</p>
<% end %>

View File

@@ -0,0 +1,11 @@
<% if @customer.present? %>
<% @customer.qbo_invoices.each do |invoice| %>
<div class="row">
<b><%= link_to "##{invoice.doc_number}", invoice_path(invoice) %> </b>
</div>
<% end %>
<% else %>
<p><%=t(:label_no_invoices)%>.</p>
<% end %>

View File

@@ -74,3 +74,6 @@ en:
label_oauth_expires: "OAuth2 Access Token Expires At" label_oauth_expires: "OAuth2 Access Token Expires At"
label_oauth_note: "Note: You need to authenticate with Quickbooks after saving your key and secret above" label_oauth_note: "Note: You need to authenticate with Quickbooks after saving your key and secret above"
field_customers: "Customers" field_customers: "Customers"
label_no_estimates: "No Estimates"
label_no_invoices: "No Invoices"
label_invoices: "Invoices"