# Imprest Account (DW) BackOffice: `frmRptImprestAccount` Crystal: `ImprestAccount.rpt` OLTP SP: `RAC.dbo.RA_ImprestAccount` (+ form check-lag / FEE-offset post-process) ## Facts | Fact | Source | Grain | |------|--------|-------| | `FactImprestAccount` | RAC DOTA views via TE list from ReloAction | One cash line after BO transforms | | `FactImprestAccountBalance` | ReloAction `tblCorpAccountBalance` | One posted balance row | Loaded in `PrcPopulateDatawarehouseTables` / `myChangesFinancePopulate.sql`. ## BO transforms applied at populate 1. **Check lag** (default 6 days): Out checks (`InOut='O'`, `Source<>'GLP'`, `DocumentNo<>'CASH'`) → `TrxDate = SourceTrxDate + lag`, `IsCheck=1` 2. **FEE offset**: for each In FEE (`LEFT(PhsCtg,3)='FEE'`, `Source<>'GLR'`) insert Out row with `Amount * -1`, `IsFeeOffset=1` 3. **ISAG**: drop `EQU*` / `LON*` codes ## TE scope Clients in `tblCorpAccountBalance` **or** with any `ImprestAcct=1` file. For those clients: TEs where `DisplayType='C'` **or** `ImprestAcct=1` (DISTINCT). Transaction window: last **2 years**. Out sources also pull `CheckLag` days before the window start. ## Files | File | Purpose | |------|---------| | `01 Imprest Account Detail.sql` | Line detail with form filters | | `02 Imprest Account Daily Balance.sql` | Daily activity + beginning/ending balance | | `03 Imprest Account Fact Sample.sql` | Sample rows / source mix / balance snapshot | ## Notes - `Pm-ECR` / `Pm-TEDetail` / print options are Crystal UI — not stored on the fact. - Ending balance (BO): latest posted balance on/before start + `SUM(Amount)` in the date window. - Run on **DatawarehouseNCM** after populate.