ZEYTO MIGRATION TOOL - README FOR ACCOUNTANTS AND PARTNERS
==========================================================

What this is
------------
A program that moves a customer's books from their old accounting system into Zeyto, and then proves
that nothing was lost. Today it reads Emeron (a restored SQL Server database). Other systems
(Tally, ERPNext, Zoho Books) will be added as separate "sources"; you pick the source on the first screen.

The tool NEVER changes the old system. It only reads it. Everything it writes goes into Zeyto through
Zeyto's own posting engine, so VAT, numbering, periods and permissions are all applied as normal.

What you need before you start
------------------------------
1. A copy of the customer's old data (for Emeron: the database restored on a SQL Server you can reach).
2. A Zeyto server that is running (version 0.1.48 or newer) and a Zeyto user that has the
   "Migration review" permission and the right to create and submit documents.
3. About one working day for a company of Ghosh's size (170,000 documents). A rehearsal is much faster.

The seven steps (Zeyto.Migrate.App.exe)
------------------------------------------------
1. Connect.   Choose the old system. Enter where its data is. Enter the Zeyto address, user and password.
              Passwords stay in memory; they are never saved or written to the log.
2. Inspect.   Shows what the old database holds and every data-quality problem found. Nothing is changed.
3. Cleaning.  Every problem with the fix the tool proposes or the question the accountant must answer.
4. Scope.     Date range and document types. START WITH A REHEARSAL (dry run): it writes nothing.
5. Run.       Moves the data. You can pause or stop at any time. Running it again is always safe:
              nothing already done is repeated.
6. Compare.   Old system against Zeyto, with the MIGRATION CERTIFICATE (see below).
7. Review.    Opens Zeyto's Migration Review screen, where YOU correct and post whatever the tool
              could not post by itself.

What happens to a document the tool cannot post
------------------------------------------------
It is never dropped and never guessed. It goes to Zeyto > Settings > Migration Review with the reason
(for example "total does not match the lines"), the original, and where possible a proposed correction
you can accept with one click. Dates are never changed by the tool; it proposes, you decide.

The Migration certificate (the sign-off page)
---------------------------------------------
The Compare step writes reconciliation.xlsx. Its first sheet is the certificate:
  1. The trial balance of everything moved must be exactly zero.
  2. For every document type: created + waiting in review + skipped = what the old system had.
  3. VAT, customers and suppliers, banks, cheques and discounts: old against new, with a reason for
     every difference (the sheet "Proof by document" lists each document).
  4. The documents still waiting in review, and any line marked REVIEW (documents that need your decision).
  5. The verdict. "SIGN-OFF READY" or "SIGN-OFF AFTER REVIEW" means every difference is explained.
     "NOT READY" means something is not accounted for: do not sign.

Safe to repeat
--------------
Run the tool a second time on the same data: it must change nothing. This is how you prove it.

What you must supply as the accountant
--------------------------------------
- The VAT periods that have already been filed (for example 2024-Q1) and the years to close.
- A decision on every item left in Migration Review.
- Confirmation of the account used to balance opening vouchers that had only one side
  (Opening Balance Suspense, 3900).

Command line (for partners who prefer it)
-----------------------------------------
Zeyto.Migrate.exe sources          lists the sources and what each needs and cannot provide
Zeyto.Migrate.exe inspect | masters | replay --types SI,PI,... --dry-run | reconcile | archive | audit
Set ZEYTO_EDGE_URL, ZEYTO_MIGRATE_USER, ZEYTO_MIGRATE_PASSWORD (and the source fields) as environment variables.

More detail
-----------
docs\migration-source-adapters.md  - how a new source (Tally, ERPNext, Zoho Books) is added
docs\emeron-to-zeyto-migration.md  - the design and the results for the first customer
