Commit Graph

4 Commits

Author SHA1 Message Date
Дмитрий 36d7fd1923 feat(billing): R-03 — LedgerService rejects frozen tenants
Stage 3 Task 3.1. Add frozen_by_balance_at guard in chargeForDelivery() before
bcmath arithmetic. Even if balance_rub > 0, a tenant flagged by
BalancePreflightSweepJob must not be charged for new lead deliveries. The
InsufficientBalanceException throw triggers the existing auto-pause flow
(RouteSupplierLeadJob::handleInsufficientBalance → projects.is_active=false +
ZeroBalancePausedMail rate-limited). Spec §4.3.1.
2026-05-28 15:33:36 +03:00
Дмитрий 0b2e5edf34 refactor(billing-v2): LedgerService — drop prepaid branch, always rub 2026-05-23 18:46:12 +03:00
Дмитрий 4bf2c51b93 refactor(billing-v2): drop ChargeResult::source (always rub now) 2026-05-23 18:46:11 +03:00
Дмитрий d2030f9121 feat(billing): Plan 4 Task 3 — LedgerService::chargeForDelivery (dual-balance + lead_charges/supplier_lead_costs INSERT) 2026-05-11 09:42:29 +03:00