acc_invoices: сервис WebUI и бэкенд платёжного процесса (миграция 082, правила статусов, согласования, ручная отметка оплаты), статусы оплат, предложения к ТЗ
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,7 @@ export interface InvoicePaidResult {
|
||||
export async function runInvoicePaid(deps: { pool: Pool; realmId?: string | null }): Promise<InvoicePaidResult> {
|
||||
const res: InvoicePaidResult = { matched: 0, errors: [] };
|
||||
const { rows } = await deps.pool.query(
|
||||
"select id from acc_invoices where stage not in ('rejected', 'paid') and paid_on is null order by decided_at nulls last, created_at",
|
||||
"select id from acc_invoices where stage not in ('rejected', 'paid') and paid_on is null and not is_draft and not cancelled order by decided_at nulls last, created_at",
|
||||
);
|
||||
for (const { id } of rows as { id: string }[]) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user