This commit is contained in:
FNOS-WIN11ENT\choshoukaku
2025-12-18 15:30:39 +09:00
parent 88163423e0
commit 87fa1aaa1f
12 changed files with 742 additions and 192 deletions

View File

@@ -0,0 +1,17 @@
from datetime import date
from app.core.database import get_connection
def is_month_locked(target_date: date) -> bool:
fiscal_year = target_date.year
month = target_date.month
with get_connection() as conn, conn.cursor() as cur:
cur.execute("""
SELECT 1
FROM month_locks
WHERE fiscal_year = %s
AND month = %s
AND is_locked = true
""", (fiscal_year, month))
return cur.fetchone() is not None