implement currency and report

This commit is contained in:
2025-09-10 11:12:49 +03:00
parent 106045d72a
commit 3d5f769b52
22 changed files with 1290 additions and 100 deletions

View File

@@ -83,10 +83,10 @@ class Users:
returning = "RETURNING id" if is_postgres() else ""
query = f"""
INSERT INTO users (
name, email, password_hash, created_at, user_role, company_id
) VALUES ({self.ph}, {self.ph}, {self.ph}, {self.ph}, {self.ph}, {self.ph}) {returning}
name, email, password_hash, created_at, user_role, company_id, temporary_password
) VALUES ({self.ph}, {self.ph}, {self.ph}, {self.ph}, {self.ph}, {self.ph}, {self.ph}) {returning}
"""
cursor.execute(query, (name, email, password_hash, created_at, user_role, company_id))
cursor.execute(query, (name, email, password_hash, created_at, user_role, company_id, 1))
inserted_id = None
if is_postgres():
inserted_id = cursor.fetchone()[0]