From 768d2d55f66f221a93f10e8abad43450f83ae863 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Mon, 2 Jan 2012 14:05:03 +0100 Subject: [PATCH] Allow for modification of the invoice comment (refs: #69f890) --- stoptime.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stoptime.rb b/stoptime.rb index 641e035..40c3868 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -795,7 +795,10 @@ module StopTime::Controllers @task = Task.find(task_id) if @input.has_key? "update" @task["customer"] = Customer.find(@input["customer"]) - @task["name"] = @input["name"] unless @input["name"].blank? + @task.name = @input["name"] unless @input["name"].blank? + if @task.billed? and @input["invoice_comment"].present? + @task.invoice_comment = @input["invoice_comment"] + end case @input.type when "fixed_cost" @task.fixed_cost = @input.fixed_cost