mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 01:14:23 -05:00
desc sort issues, estimates, & invoices
This commit is contained in:
@@ -89,7 +89,7 @@ class CustomersController < ApplicationController
|
|||||||
begin
|
begin
|
||||||
@customer = Customer.find_by_id(params[:id])
|
@customer = Customer.find_by_id(params[:id])
|
||||||
@vehicles = @customer.vehicles.paginate(:page => params[:page])
|
@vehicles = @customer.vehicles.paginate(:page => params[:page])
|
||||||
@issues = @customer.issues
|
@issues = @customer.issues.order(id: :desc)
|
||||||
@billing_address = address_to_s(@customer.billing_address)
|
@billing_address = address_to_s(@customer.billing_address)
|
||||||
@shipping_address = address_to_s(@customer.shipping_address)
|
@shipping_address = address_to_s(@customer.shipping_address)
|
||||||
@closed_issues = (@issues - @issues.open)
|
@closed_issues = (@issues - @issues.open)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<% if @customer.present? %>
|
<% if @customer.present? %>
|
||||||
|
|
||||||
<% @customer.qbo_estimates.each do |estimate| %>
|
<% @customer.qbo_estimates.order(doc_number: :desc).each do |estimate| %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<b><%= link_to "##{estimate.doc_number}", estimate_path(estimate), target: :_blank %></b> <%= estimate.txn_date %>
|
<b><%= link_to "##{estimate.doc_number}", estimate_path(estimate), target: :_blank %></b> <%= estimate.txn_date %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<% if @customer.present? %>
|
<% if @customer.present? %>
|
||||||
|
|
||||||
<% @customer.qbo_invoices.each do |invoice| %>
|
<% @customer.qbo_invoices.order(doc_number: :desc).each do |invoice| %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<b><%= link_to "##{invoice.doc_number}", invoice_path(invoice), target: :_blank %></b> <%= invoice.txn_date %>
|
<b><%= link_to "##{invoice.doc_number}", invoice_path(invoice), target: :_blank %></b> <%= invoice.txn_date %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user