Subscriptions: «Оплачено?» → paid status → «repeat?»; edit and create everything
- ops: paying marks the current charge paid (paid_for, persisted) instead of jumping to the next date; repeat_sub moves to the next period or closes the subscription. Paid-and-undecided subscriptions leave reminders and show in agenda['paid']. update_sub can set paid; tasks reopen when their status goes back; delete for subs and routines (BroV only, /api/delete); /api/tasks?all=1 and /api/subs?all=1. - Bot: «₽ Оплачено?» on reminders, then «🔁 Да, <date> / Нет, закрыть»; after paying by text it asks the same with buttons. - BroV: «Оплачено?» everywhere; «Оплачено — повторить?» section under the notch; «Весь план»: forms to edit or create tasks (title, description, status, due, company), subscriptions (amount, currency, period, date, reminder, company, paid, active) and routines, delete with confirmation, «+» per list, done tasks on demand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -31,7 +31,8 @@ CREATE TABLE IF NOT EXISTS subscriptions (
|
||||
remind_days INTEGER NOT NULL DEFAULT 3,
|
||||
notes TEXT NOT NULL DEFAULT '',
|
||||
active INTEGER NOT NULL DEFAULT 1,
|
||||
client TEXT NOT NULL DEFAULT '' -- company it's paid for: saga / planet9 / home / …
|
||||
client TEXT NOT NULL DEFAULT '', -- company it's paid for: saga / planet9 / home / …
|
||||
paid_for TEXT -- = next_date once that charge is paid (until «repeat?» is answered)
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS payments (
|
||||
id INTEGER PRIMARY KEY,
|
||||
@@ -76,4 +77,6 @@ def connect(path: str) -> sqlite3.Connection:
|
||||
cols = {r["name"] for r in con.execute("PRAGMA table_info(subscriptions)")}
|
||||
if "client" not in cols:
|
||||
con.execute("ALTER TABLE subscriptions ADD COLUMN client TEXT NOT NULL DEFAULT ''")
|
||||
if "paid_for" not in cols:
|
||||
con.execute("ALTER TABLE subscriptions ADD COLUMN paid_for TEXT")
|
||||
return con
|
||||
|
||||
Reference in New Issue
Block a user