Intranet · Sales status overview & Yardi export

Cross-store view of a month’s declaration status with totals, plus the Yardi integration: validate the export, generate it, upload it to Yardi and download it for inspection.

AreaIntranet
Routesintranet.sales.state
Centre modulesintranet · intranet-yardi
Staff levelsroot · admin · manager · scmanager
Modelsclosed-month · commerce · shop-property · yardi-upload
UI labeltitle.header.sales (state tab)
Coverage4 use cases · 1 happy · 4 failure

How it works

Yardi is a four-step flow — checkErrors → createYardi → uploadYardi → downloadYardi — with a dedicated errors modal (yardi-errors-modal) listing the stores that block the export and an exportYardi action to proceed anyway. The two blocking per-store conditions are explicit: a store must have a linked property (yardi.shop_property_error) and a specific tenant code (yardi.tenant_code_error). An important business rule is stated in the copy: only validated sales are uploaded, closed-but-unvalidated sales are not (yardi.warn_errors_validated_sales_upload). setDownloadDate scopes the download and filteredShops narrows the overview.

Use cases

Why someone opens this (4)

  • Seeing at a glance which stores have not yet closed the month.
  • Pushing the month’s validated sales into Yardi for rent and service-charge calculation.
  • Fixing the stores that block an export before running it.
  • Downloading the generated file to reconcile against Yardi.

Path map

flowchart LR
    F(["Sales status overview and Yardi export"]):::feat
    F --> H1["Month exported to Yardi"]:::ok
    F -.-> X1["Stores block the export"]:::bad
    F -.-> X2["Upload fails"]:::bad
    F -.-> X3["Unvalidated sales silently excluded"]:::bad
    F -.-> X4["Module or role missing"]:::bad
    classDef feat fill:#26688f,stroke:#26688f,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Month exported to Yardi

  1. Manager opens the state tab for the month and reviews the per-store status and totals.
  2. checkErrors runs and reports no blocking stores.
  3. createYardi generates the export from the validated sales.
  4. uploadYardi pushes it and informative-message.upload-yardi.success confirms.
  5. downloadYardi retrieves the file for the records.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Month exported to Yardi
  • ⛔ Stores block the export
  • ⛔ Upload fails
  • ⛔ Unvalidated sales silently excluded
  • ⛔ Module or role missing

Implementation


Generated from doc/feature-inventory.json · id intranet-sales-state · commit 276788ca6