summaryrefslogtreecommitdiff
path: root/internal/database
diff options
context:
space:
mode:
authorT <t@tjp.lol>2025-08-08 10:57:56 -0600
committerT <t@tjp.lol>2025-08-12 14:45:56 -0600
commitdaea67322cd387c2caf8f1a326c90b4276c6e9bc (patch)
treeda1d2a85e530640a1ed804fece38da30940e7dd5 /internal/database
parent54c791927b2851fb6739ed75897090c3c39ecca1 (diff)
bugfixes
Diffstat (limited to 'internal/database')
-rw-r--r--internal/database/queries.sql18
1 files changed, 5 insertions, 13 deletions
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,