# Admin reports and audit work

## What report and audit work is for

Administrative report work brings together the definitions, options, outputs, margins, cash-flow
forecasts, audit records, and accounting tests used to review financial activity and maintain the
reporting setup.

Use this page when you need to:

| If you need to… | Go to |
|---|---|
| Find a report or administration surface | [Find the report work](#find-the-report-work) |
| Set up a report definition or accounting test | [Configure report definitions and tests](#configure-report-definitions-and-tests) |
| Request a financial, daily, partner, tax, or journal report | [Run financial, daily, partner, tax, and journal reports](#run-financial-daily-partner-tax-and-journal-reports) |
| Review cash flow, margins, generated reports, or audit records | [Review management, cash-flow, margin, generated, and audit outputs](#review-management-cash-flow-margin-generated-and-audit-outputs) |
| Understand a hidden field or a stopped report flow | [Handle report branches and loading failures](#handle-report-branches-and-loading-failures) |
| Continue with report use or accounting setup | [Reports and audit work](doc:reports-and-audit-work) or [Accounting dashboard](doc:accounting-dashboard) |
| Resolve a general application message | [General error messages](doc:general-error-messages) or [Common issues and solutions](doc:common-issues-and-solutions) |

This page covers management, financial, daily, partner, tax, journal, audit, margin, cash-flow,
and test reports.

## Prerequisites for report administration

Before changing or running a report, prepare the accounting data and access needed by the report
family. The shared report options use **Journals**, **Start Date**, **End Date**, and **Target
Moves**. **Journals** and **Target Moves** are required. **Target Moves** starts with a default
value.

| Prepare | Why it matters |
|---|---|
| The journals to include | The report uses the selected journals as part of its report context. |
| Reporting period | The report applies the dates you enter to the period being reviewed. |
| The target entry scope | **Target Moves** distinguishes **All Posted Entries** from **All Entries**. |
| The company context | Some company fields and filters are restricted to multi-company access. |
| The report's current option state | Comparison fields, account fields, and cash-flow panels appear according to their conditions. |

The listed fields do not show a required marker. **Journals** and **Target Moves** are required, so
check those fields first when a report cannot be prepared.

## Find the report work

The Accounting reporting and configuration entries lead to the report definitions, report
wizards, generated outputs, audit records, product margins, cash-flow forecasts, and accounting
tests. Choose the destination by the work you need to do.

| If you need to… | Open |
|---|---|
| Review invoice or cash-flow management information | **Invoice Analysis** or **Cash Flow Forecast** |
| Review a saved report output or define its template | **Generated Reports** or **Custom Report Templates** |
| Review financial report definitions | **Account Reports** |
| Run a daily report | **Bank Book**, **Cash Book**, or **Day Book** |
| Run a partner, tax, journal, or balance report | **Aged Partner Balance**, **Partner Ledger**, **Tax Report**, **Journals Audit**, **General Ledger**, or **Trial Balance** |
| Review margins or accounting tests | **Product Margins** or **Accounting Tests** |
| Review audit records | **Audit Trail** |

## Configure report definitions and tests

A report definition describes the accounts, hierarchy, formulas, formatting, and filters that make
up a report. A custom template packages those choices for repeated generation. An accounting test
holds a named expression that can be reviewed with its description and code.

**Prerequisites**

- You know whether you are changing an **Account Report**, a **Report Template**, or an
  **Accounting Test**.
- You have the report name, code, account selection, formula, or test expression to enter.

**Steps**

1. Open **Account Reports** to create or adjust the report hierarchy, report type, sign, display
   detail, account report, accounts, or account type.
2. Open **Custom Report Templates** to set the template name, code, sequence, company, public
   setting, date range, comparison, display options, and default filters.

   | Template area | Fields to review |
   |---|---|
   | Ownership and use | `Public`, `Created By`, `Usage Count`, and `Last Generated Date` |
   | Report lines | `Report Lines`, `Line Type`, `Parent`, `Account Group`, and `Formula` |
   | Date and comparison | `Date & Comparison`, `Date Range`, `Comparison`, and `Comparison Type` |
   | Visual settings | `Visual Settings`, `Display Options`, and `Default Filters` |
3. Choose the configuration branch that matches your work:

   | If you need to… | Use |
   |---|---|
   | Set a template comparison type | **Comparison Type** when comparison is enabled |
   | Select accounts by report type | **Accounts** for `accounts`, or **Account Type** for `account_type` |
   | Generate a report from the template | **Generate Report** |
   | Open the visual report builder | **Open Visual Builder** |

4. Open **Accounting Tests** and enter the test's **Name**, **Sequence**, **Description**, and
   **Python Code**. Review **Active**, **Expression**, and **Code Help** when maintaining the test.

**Result:** The report definition, template, or accounting test contains the configuration entered
for its selected report type or test.

## Run financial, daily, partner, tax, and journal reports

Report wizards collect a period, journal scope, entry scope, and report-specific selections before
you request a report or PDF.

**Prerequisites**

- You know the report family and the period it must cover.
- You know which journals, accounts, partners, analytic accounts, or entry scope to include.

**Steps**

1. Open the report family you need.
2. Enter **Start Date** and **End Date** where the report uses a date range.
3. Select the journals in **Journals**.
4. Select the entry scope in **Target Moves**.
5. Apply the report-specific options:

   | If you are running… | Set the report-specific options |
   |---|---|
   | **Bank Book** or **Cash Book** | **Sort By**, **Initial Balance**, **Accounts**, and **Journals** |
   | **Day Book** | **Journals** |
   | **Aged Partner Balance** | **Period Length**, **Result Selection**, and **Partners** |
   | **General Ledger** | **Analytic Accounts**, **Accounts**, **Partners**, **Sort By**, **Display Account**, and **Initial Balance** |
   | **Partner Ledger** | **Partners**, **Result Selection**, **Amount Currency**, and **Reconciled** |
   | **Journals Audit** | **Amount Currency** and **Sort Selection** |
   | **Trial Balance** | **Display Account** and **Analytic Accounts** |
   | **Balance Sheet** | **Account Report**, **Enable Filter**, **Debit Credit**, **Label Filter**, **Filter Comparison**, and comparison dates |
   | **Tax Reports** | **Start Date** and **End Date** |

6. Choose the output action that matches your need:

   | If you need to… | Select |
   |---|---|
   | View the report on screen | **View Report** |
   | Keep a PDF copy | **Download PDF** |
   | Print a daily report | **Print** |

**Result:** The selected report request uses the options entered for its report family.

## Review management, cash-flow, margin, generated, and audit outputs

Management outputs help you compare activity, inspect calculated balances, review margins, and
trace changes. Use the fields and tabs that match the question you are answering.

| If you need to… | Review |
|---|---|
| Inspect a forecast | **Forecast Name**, **Forecast Date**, **Forecast Horizon**, **Opening Balance**, **Total Inflow**, **Total Outflow**, **Net Cashflow**, and **Closing Balance** |
| Inspect forecast detail | **Forecast Lines**, **Breakdown by Source**, and **Forecast vs Actual** |
| Inspect a generated report | `Name`, `Template`, `Date From`, `Date To`, **Company**, `Total Balance`, `Comparison Period`, `Comparison Date From`, `Comparison Date To`, `Report Lines`, `Code`, **Balance**, `Balance Comparison`, `Variance`, and `Var %` |
| Inspect product performance | **Product**, **Internal Reference**, **Analysis Criteria**, **Start Date**, **End Date**, **Invoice State**, **Sales**, **Purchases**, and **Margins** |
| Inspect margin values | **Avg. Unit Price**, **Catalog Price**, **Sales Gap**, **Turnover**, **Standard Price**, **Purchase Gap**, **Total Cost**, **Normal Cost**, **Total Margin**, and **Expected Margin** |
| Inspect audit activity | `Name`, `Date`, `Author`, `Preview`, and the audit search fields for `Journal Entry`, `Account`, `Taxes`, `Partners`, and `Company` |

Cash-flow panels change with the forecast state. **Algorithm Metadata** appears after the forecast
leaves `draft`; **Error Details** appears when the forecast is in `error`; and **Forecast vs
Actual** appears when the forecast is `done`.

## Handle report branches and loading failures

Use the option conditions to decide which fields belong to the current branch, then use the exact
message on screen when the application stops the flow.

| What you see | What it means | What to do |
|---|---|---|
| **Algorithm Metadata** | The cash-flow forecast is no longer in `draft`. | Review **Algorithm Version** and **Computation Time**. |
| **Error Details** | The cash-flow forecast is in `error`. | Read **Error Details** before continuing. |
| **Forecast vs Actual** | The cash-flow forecast is in `done`. | Review the forecast and actual values together. |
| The comparison area is hidden | Balance Sheet comparison is disabled. | Enable **Filter Comparison** before entering comparison dates. |
| **Comparison Type** is hidden | Template comparison is not enabled. | Enable comparison before choosing its type. |
| Account fields differ by report type | The report type controls the account selection fields. | Use **Accounts** for `accounts` or **Account Type** for `account_type`. |
| `Sherkety ERP Session Expired` | The session has expired. | Select **Close**. |
| `Your Sherkety ERP session expired. The current page is about to be refreshed.` | The application is about to refresh the current page. | Wait for the refresh, then return to the report route. |

The **Update Only** and **Create Only** audit filters are restricted to system access. Multi-company
fields and filters are restricted where the report view applies multi-company access.

## Know what to do next

Report administration ends after the definition, options, output, or diagnosis is complete. To use
reports and audit work, continue to [Reports and audit work](doc:reports-and-audit-work).
For the accounting starting point, continue to [Accounting dashboard](doc:accounting-dashboard).
For a session or application message, use [General error messages](doc:general-error-messages).
For cross-application recovery, use [Common issues and solutions](doc:common-issues-and-solutions).
