Проводка в QuickBooks после Done по категоризации: задание categorize-post (агент, результат в истории), миграция 076, processes.md
Some checks failed
ci / test (push) Failing after 57s
ci / deploy (push) Has been skipped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 17:02:00 +03:00
parent 4fe1f36063
commit 77deeab702
7 changed files with 234 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
-- Проводка в QuickBooks после Done по категоризации (задание categorize-post, 2026-11-30): результат проводки хранится в истории.
alter table acc_categorization_review_history add column if not exists qbo_posted_at timestamptz;
alter table acc_categorization_review_history add column if not exists qbo_txn_id text;
alter table acc_categorization_review_history add column if not exists qbo_post_error text;
alter table acc_categorization_review_history add column if not exists qbo_post_attempts int default 0; -- без not null: перенос в историю идёт через jsonb_populate_record (отсутствующие поля = null)
-- всё, что закрыто до включения автопроводки, считается проведённым (разнесено вручную или помечено auto:), повторно не проводим
update acc_categorization_review_history set qbo_posted_at = coalesce(closed_at, now()) where qbo_posted_at is null;
-- Zoom 2026-11-27 $16.99 проведён вручную через Claude (Purchase 4174)
update acc_categorization_review_history set qbo_txn_id = '4174' where feed_txn_id::text = '4461' and qbo_txn_id is null;