Очередь разбора: сумма/получатель/дата/адрес проекта, дата получения и дни; автоудаление уже проведённого; справочник проектов QuickBooks и закрытые проекты; запрос почты с Delivered-To (по встрече 2026-11-27)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { runFraudWeekly } from "./chargeback.js";
|
||||
import { manualMessenger, runCertificates } from "./certificates.js";
|
||||
import { makeClaudeRunner } from "./claude-runner.js";
|
||||
import { DriveClient } from "./drive.js";
|
||||
import { pruneBooked } from "./booked.js";
|
||||
import { runFinalize } from "./finalize.js";
|
||||
import { runFraudFlags } from "./fraud.js";
|
||||
import { runInvoiceCheck } from "./invoice-check.js";
|
||||
@@ -89,13 +90,18 @@ const app = buildApi({
|
||||
});
|
||||
return runInvoiceIngest({ pool, mail, drive, claude, now: () => new Date(), log });
|
||||
},
|
||||
finalize: () => runFinalize({
|
||||
finalize: async () => {
|
||||
// уже разнесённое в QuickBooks убираем из очереди до завершения разбора
|
||||
const booked = await pruneBooked(pool);
|
||||
const done = await runFinalize({
|
||||
pool,
|
||||
delaySeconds: s.finalizeDelaySeconds,
|
||||
noReceiptLimitUsd: s.receipts.noReceiptLimitUsd,
|
||||
notify,
|
||||
notifyPerson: slack ? async (slackUserId, text) => void (await slack.postMessage(slackUserId, text)) : undefined,
|
||||
}),
|
||||
});
|
||||
return booked.closed ? { ...done, booked } : done;
|
||||
},
|
||||
categorize: async () =>
|
||||
runCategorization({
|
||||
pool,
|
||||
|
||||
Reference in New Issue
Block a user