From 7184248ccdf4e35390f0677d8bfeac9218c9883b Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 6 Mar 2016 15:01:14 +0100 Subject: [PATCH] Fix the last company info is used-check --- stoptime.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stoptime.rb b/stoptime.rb index a3bdfab..d44edb7 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -1727,7 +1727,7 @@ module StopTime::Controllers # If we are editing the current info and it is already associated # with some invoices, create a new revision. @history_warn = true if @company != CompanyInfo.last - if @company == CompanyInfo.last and @company.invoices.length > 0 + if @company.id == CompanyInfo.last.id and @company.invoices.length > 0 old_company = @company @company = old_company.dup @company.original = old_company