From daea67322cd387c2caf8f1a326c90b4276c6e9bc Mon Sep 17 00:00:00 2001
From: T <t@tjp.lol>
Date: Fri, 8 Aug 2025 10:57:56 -0600
Subject: bugfixes

---
 internal/database/queries.sql | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

(limited to 'internal/database/queries.sql')

diff --git a/internal/database/queries.sql b/internal/database/queries.sql
index 8eda5f4..969119a 100644
--- a/internal/database/queries.sql
+++ b/internal/database/queries.sql
@@ -25,11 +25,7 @@ values (
     @description, 
     @client_id, 
     @project_id,
-    coalesce(
-        @billable_rate,
-        (select p.billable_rate from project p where p.id = @project_id),
-        (select c.billable_rate from client c where c.id = @client_id)
-    )
+    @billable_rate
 )
 returning *;
 
@@ -127,16 +123,12 @@ values (
     @description, 
     @client_id, 
     @project_id,
-    coalesce(
-        @billable_rate,
-        (select p.billable_rate from project p where p.id = @project_id),
-        (select c.billable_rate from client c where c.id = @client_id)
-    )
+    @billable_rate
 )
 returning *;
 
 -- name: GetInvoiceDataByClient :many
-select 
+select
     te.id as time_entry_id,
     te.start_time,
     te.end_time,
@@ -321,8 +313,8 @@ where id = (
 -- name: EditTimeEntry :exec
 update time_entry
 set
-	start_time = @start_time,
-	end_time = @end_time,
+	start_time = datetime(@start_time),
+	end_time = datetime(@end_time),
 	description = @description,
 	client_id = @client_id,
 	project_id = @project_id,
-- 
cgit v1.2.3

