When DGI or your expert-comptable asks who changed invoice line 3 after TTN clearance, a spreadsheet cannot answer. Hesabi records structured audit events on fiscal documents—who acted, when, and what changed—so finance teams can reconstruct history without guessing from email threads.
Exports are the other half of the story. Accountants rarely work inside your invoicing UI; they need CSV, Excel, or journal-ready files that tie invoice numbers to TTN references, VAT lines, and payment status. This guide explains what Hesabi audit trails contain, which export formats fit cabinet workflows, how TTN correlation works, retention expectations, and how to prepare a DGI audit folder without last-minute scrambling.
What audit log entries contain
Each audit event in Hesabi is append-only: corrections add new entries rather than erasing prior state. That matters under TTN clearance rules where the cleared document is the legal baseline and subsequent changes may require credit notes or formal cancellation flows.
- Timestamp (UTC stored, displayed in workspace timezone)
- Actor: user email or service account that performed the action
- Action type: create, update, submit, clear, cancel, export, login, permission change
- Object: invoice, credit note, customer, product, payment, or settings record
- Object identifier: internal ID plus human-readable number (e.g. invoice series/sequence)
- Field-level diff where applicable: old value → new value for amount, VAT rate, customer tax ID, due date
- TTN correlation when relevant: submission ID, clearance reference, QR payload hash or status code
- Source context: web UI, API, mobile sync, or automated job name
Not every screen edit generates a field diff—bulk imports may log a summary row instead of hundreds of line changes. For high-risk fields (totals, tax IDs, clearance status), expect granular diffs suitable for accountant review.
Who changed what on an invoice
The typical dispute is not malicious fraud but process drift: a sales manager adjusts a discount after verbal approval, finance fixes a customer matricule fiscale, or someone reopens a draft that was already submitted to TTN. Hesabi ties each invoice to a chronological activity feed filtered by document number.
- Open invoice history
From the invoice detail view, open the activity or audit panel. Events sort newest-first with actor and action summary.
- Filter by actor or date
Narrow to the week of the audit question or to a specific user when investigating access misuse.
- Compare to TTN timeline
Cross-check clearance timestamp against edits. Changes after clearance should align with credit-note workflow, not silent line edits.
- Export the slice
Export audit rows for the invoice ID range your accountant requests—attach to email or secure share rather than screenshots.
Role separation reduces noise: users with read-only finance access cannot mutate cleared documents; only roles with clearance or correction permissions appear in write events. Review role assignments periodically—see our guide on Hesabi security, data residency, and access for workspace-level controls.
Export formats for expert-comptables
Cabinet comptable workflows differ, but most ask for the same building blocks: sales journal, purchase journal, VAT summary, open receivables, and TTN reference columns. Hesabi supports structured exports intended to reduce retyping in Sage, Ciel, or spreadsheet-based consolidation.
- Invoice register (CSV/Excel): number, date, customer, tax ID, HT/TVA/TTC, payment status, TTN reference
- Line detail export: product code, quantity, unit price, VAT rate per line—for margin and sector analysis
- Payment reconciliation: invoice ID, payment date, method, bank reference, remaining balance
- Credit notes and cancellations: linked parent invoice, reason code, TTN status on corrective document
- Audit log export: filtered by date range and object type for external review
- TEJ-oriented payment extracts where professional fees and withholding apply—coordinate with TEJ reporting workflows
Agree column mapping once with your accountant: French labels vs English headers, date format (DD/MM/YYYY), decimal separator, and whether amounts are HT or TTC. Test one closed month before year-end close. If your cabinet imports via API, document the Hesabi export schedule (daily vs monthly) in a shared runbook.
TTN correlation in audit and exports
Under El Fatoora clearance, the issued invoice is the TTN-validated document—not a PDF you emailed before submission. Hesabi stores TTN submission metadata alongside invoice records so audit trails and exports share the same reference your customer and DGI can trace.
- Pre-clearance edits appear in audit log; clearance event locks the baseline snapshot sent to TTN
- Export columns include TTN reference and clearance timestamp when submission succeeded
- Failed submissions log error codes—retry events are separate rows, not overwrites
- Credit notes reference parent invoice TTN ID where the corrective TEIF chain requires it
If you are new to clearance mechanics, read our TTN El Fatoora SME guide first—audit questions often confuse draft PDFs with cleared e-invoices. During DGI review, auditors may ask for the TTN reference on a sample of issued invoices; your export should answer that without logging into TTN separately for every row.
Retention: how long to keep logs and exports
Retention has two layers: what Hesabi retains in the workspace, and what your company archives offline for legal hold. Product retention follows subscription tier and operational backup policy; statutory retention for fiscal records in Tunisia commonly spans multiple years—your expert-comptable sets the authoritative number for your entity type.
- Keep monthly export snapshots even if live data remains in Hesabi—exports are point-in-time evidence
- Store audit log extracts for periods under dispute or active DGI correspondence
- Align backup of export folders with your document management policy (encrypted share, not personal Gmail)
- Do not delete local archives when canceling a user seat; fiscal history outlives individual accounts
Workspace admins can export historical ranges before offboarding a fiscal year or changing accountants. Treat that export as a handoff artifact, not a substitute for continuous monthly sync.
Preparing for a DGI audit
DGI audits vary from document samples to deep reconciliation. A prepared PME assembles a folder that connects bank movements, cleared invoices, VAT declarations, and change history—without reconstructing six months from WhatsApp.
- Invoice register export for the audit period with TTN references on every cleared sale
- Purchase invoices and expense proofs matching declared VAT credits
- Audit log extract for any invoice numbers DGI flagged—show actor, timestamp, and field diffs
- TEJ declarations and supporting payment lists if professional fees were in scope
- Role matrix: who had clearance vs draft-only access during the period
- Written process note: draft → review → TTN submit → customer delivery (one page is enough)
Run an internal dry audit quarterly: pick ten random cleared invoices, verify TTN reference in export matches TTN portal lookup, and confirm no unexplained post-clearance edits. Gaps found internally are cheaper than gaps found in a control room.
If DGI requests machine-readable TEIF copies, coordinate with your accountant—Hesabi audit trails complement XML archives; they do not replace statutory storage obligations your cabinet may hold separately.

Hesabi for traceable Tunisian finance
Hesabi is built for Tunisian SME invoicing, VAT, and TTN-oriented workflows on hesabi.tn. Audit trails and accountant exports are part of operating credibly under increased e-invoicing scrutiny—not optional nice-to-haves once you outgrow spreadsheet invoicing.
Start with one month: enable role separation, run your first cabinet export, and archive the audit log slice. Adjust permissions before scaling users, not after the first DGI letter.
Can audit logs be deleted by users?
Audit events are append-only for standard workspace roles. Admins export history; they do not edit past audit rows. Confirm current product behavior on hesabi.tn release notes.
Which export should I send my expert-comptable each month?
Agree with your cabinet—typically invoice register plus payment reconciliation and VAT summary. Include TTN reference columns for cleared sales.
How do audit trails relate to TTN clearance?
Clearance is a logged event with TTN metadata. Edits after clearance should appear as separate corrective actions, not silent overwrites of the cleared document.
Do I still need TEJ exports if I use Hesabi invoicing?
Yes when you pay professional fees subject to withholding. TEJ is a separate declaration from sales invoicing—see our TEJ reporting guide and align payment exports with your accountant.
Is Hesabi available outside Tunisia?
No. Hesabi is Tunisia-only today by design for local fiscal rules.



