From 3016b301ab93c2c406c2d85d04751f9c71661e2d Mon Sep 17 00:00:00 2001 From: Yuri Yaryshev Date: Sun, 6 Dec 2026 17:48:56 +0300 Subject: [PATCH] =?UTF-8?q?invoice-filing:=20=D0=BF=D1=80=D0=BE=D0=BF?= =?UTF-8?q?=D1=83=D1=81=D0=BA=D0=B0=D1=82=D1=8C=20=D0=B8=D0=BD=D0=B2=D0=BE?= =?UTF-8?q?=D0=B9=D1=81=D1=8B=20=D0=B1=D0=B5=D0=B7=20drive=5Ffile=5Fid=20(?= =?UTF-8?q?=D0=B8=D0=BC=D0=BF=D0=BE=D1=80=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=B8=D0=B7=20Excel),=20?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=D1=87=D0=B5=20Drive=20404=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=B6=D0=B4=D1=8B=D0=B5=2010=20=D0=BC=D0=B8=D0=BD=D1=83=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- packages/accounting_automation/src/invoice-filing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounting_automation/src/invoice-filing.ts b/packages/accounting_automation/src/invoice-filing.ts index afd49f5..9752099 100644 --- a/packages/accounting_automation/src/invoice-filing.ts +++ b/packages/accounting_automation/src/invoice-filing.ts @@ -48,7 +48,7 @@ export async function runInvoiceFiling(deps: { pool: Pool; drive: FilingDrive; l const { rows } = await pool.query<{ id: string; drive_file_id: string; vendor_name: string; amount: string; paid_on: string; account_name: string }>( `select i.id, i.drive_file_id, i.vendor_name, i.amount::text, i.paid_on::text, p.account_name from acc_invoices i join qbo_purchase p on p.id = i.qbo_txn_id - where i.paid_on is not null and p.account_name is not null + where i.paid_on is not null and p.account_name is not null and i.drive_file_id is not null and (i.drive_folder is null or i.drive_folder like 'Инвойсы/${UNPAID_FOLDER}/%') order by i.paid_on limit ${BATCH}`, );