From d359b76209a4271f346496207932bf0799becc95 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 16 Jun 2013 23:29:33 +0200 Subject: [PATCH] Color invoice list rows based on due status (refs: #b4b365) What remains is to remove the hardcoding of 30 days. This should be moved to the config and Customer model (and then also be used in the template). --- stoptime.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stoptime.rb b/stoptime.rb index fba20c3..75b6b89 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -2238,7 +2238,9 @@ module StopTime::Views end tbody do invoices.each do |invoice| - tr do + due_class = invoice.past_due? ? "warning" : "" + due_class = "error" if invoice.way_past_due? + tr(:class => due_class) do td do a invoice.number, :href => R(CustomersNInvoicesX,