Merge pull request 'fix(tradein): trade-in PDF cover uses estimate.expires_at, not hardcoded +30d (#1530)' (#1676) from fix/pdf-expires-at-1530 into main
Some checks are pending
Deploy Trade-In / changes (push) Waiting to run
Deploy Trade-In / test (push) Blocked by required conditions
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / build-frontend (push) Blocked by required conditions
Deploy Trade-In / build-browser (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
Some checks are pending
Deploy Trade-In / changes (push) Waiting to run
Deploy Trade-In / test (push) Blocked by required conditions
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / build-frontend (push) Blocked by required conditions
Deploy Trade-In / build-browser (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
This commit is contained in:
commit
3dcddae647
1 changed files with 6 additions and 1 deletions
|
|
@ -449,7 +449,12 @@ def _dual_price_block(estimate: AggregatedEstimate, brand) -> str: # type: igno
|
|||
|
||||
def _build_cover(estimate: AggregatedEstimate, input_snapshot: dict, brand) -> str: # type: ignore[no-untyped-def,type-arg]
|
||||
today = dt.date.today()
|
||||
expires = today + dt.timedelta(days=30)
|
||||
# Используем реальное поле expires_at из оценки; fallback на +30 дней если None.
|
||||
expires = (
|
||||
estimate.expires_at.date()
|
||||
if estimate.expires_at is not None
|
||||
else today + dt.timedelta(days=30)
|
||||
)
|
||||
report_num = _report_number(estimate.estimate_id)
|
||||
|
||||
# Короткий адрес (для cover): берём первую часть до запятой
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue