Validate and Build Trial Balance
AI-generatedSummary
Validate a set of journal entries against a provided chart of accounts and optional period date range, then build and return a trial balance if no blocking errors are found or if requested.
Inputs
- Allow Line With Both Debit And Credit — Boolean flag to permit journal lines to have non-zero debit and credit amounts simultaneously; defaults to false preventing such cases.
- Allow Negative Amounts — Boolean flag to treat negative debit or credit amounts as warnings rather than errors; defaults to false disallowing negatives.
- Currency — Default currency code (e.g., 'EUR') applied to journal entries lacking an explicit currency.
- Expected Period Start — Optional start date (in 'YYYY-MM-DD' format) for the expected accounting period; entries before this date generate warnings.
- Expected Period End — Optional end date (in 'YYYY-MM-DD' format) for the expected accounting period; entries after this date generate warnings.
- Include Trial Balance — Boolean flag to include trial balance output for validation-only runs when no errors exist; defaults to false.
Output shape
a single JSON object containing validation results, errors, warnings, an audit trail, summary information, and optionally a trial balance array if generated
The output includes detailed error and warning messages per journal entry and line, an audit trail capturing validation steps, summary counts, and if valid and requested, a trial balance with aggregated debit and credit totals per account. If blocking errors exist, no trial balance is generated regardless of settings.