This commit is contained in:
admin
2026-02-21 10:51:25 +09:00
parent 584530937b
commit 3b028b8fc0
25 changed files with 1852 additions and 244 deletions

10
list_accounts.py Normal file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env python3
import psycopg
conn = psycopg.connect('host=localhost user=postgres password=postgres dbname=accounting')
cur = conn.cursor()
cur.execute('SELECT account_code, account_name FROM accounts WHERE is_active=true ORDER BY account_code')
for row in cur.fetchall():
print(f'{row[0]:3s} {row[1]}')
cur.close()
conn.close()