Also color customer names based on invoice status in the overview view
This commit is contained in:
parent
d359b76209
commit
ba5fd086b5
1 changed files with 6 additions and 1 deletions
|
@ -1455,7 +1455,12 @@ module StopTime::Views
|
|||
else
|
||||
div.span6 do
|
||||
@tasks.keys.sort_by { |c| c.name }.each do |customer|
|
||||
h3 { a customer.name, :href => R(CustomersN, customer.id) }
|
||||
inv_klass = "text_info"
|
||||
inv_klass = "text_warning" if customer.invoices.any? { |inv| inv.past_due? }
|
||||
inv_klass = "text_error" if customer.invoices.any? { |inv| inv.way_past_due? }
|
||||
h3 { a customer.name,
|
||||
:class => inv_klass,
|
||||
:href => R(CustomersN, customer.id) }
|
||||
if @tasks[customer].empty?
|
||||
p do
|
||||
text! "No projects/tasks found! Create one " +
|
||||
|
|
Loading…
Reference in a new issue