Sări la conținut
    Back to blog
    July 1, 2026 5 min read Stefan

    Auto-filling company data from ANAF + automatic archiving of deregistered companies

    How we automatically verify companies in your catalog against ANAF — auto-fill on add and weekly archiving of the ones that get deregistered.

    #vanagreen
    #anaf
    #catalog
    #automatizare

    A recycling operator's company catalog grows fast — waste suppliers, clients buying recycled raw material, transport partners. Every CUI (Romanian tax ID) entered manually is an opportunity for a mistake: a misspelled name, an outdated VAT status, or — riskiest of all — a company that has since been deregistered but still shows up as active in your catalog.

    We added two mechanisms that solve this from different angles: one active at data entry, one passive running in the background.

    Auto-fill when adding a company

    When you enter the CUI of a new company — whether from the full Catalog form or from the quick-add dialog used directly in the waste intake flow — the app queries ANAF (Romania's tax authority) live and shows you the company name, VAT payer status, and company state (active, inactive, or deregistered) in a separate panel, with a checkbox for each field.

    Important: nothing gets overwritten automatically. You check what you want to pull in — name, VAT status, address — and only that selection gets applied. If you already filled in a field on purpose with something different (for example, a preferred trade name different from the legal name on file with ANAF), it stays as you wrote it.

    The first version of this feature left the address purely informational — you could see it, but not apply it directly, because the company form didn't have an actual address field. We fixed that: now, if you check the address, it gets saved as the company's main location — either updating the existing one or creating a new one if the company was just added and doesn't have an id yet.

    Automatic weekly check — and archiving on deregistration

    The second mechanism is independent of anything you do manually. A job runs every Sunday morning and checks, in batches, every company with a CUI in each active client's catalog against ANAF.

    The result matters differently depending on what ANAF returns:

    • Company confirmed deregistered — gets archived automatically. It disappears from the selection lists used for intakes and outflows, exactly like any manually archived company, with no change to the filtering logic.
    • Company inactive or not found at ANAF — gets only an informational status, no archiving. An "inactive" state can be temporary or administrative, not necessarily proof that the company no longer legally exists — it wouldn't have been correct to draw the same conclusion as for deregistration.
    • Company auto-archived by the system that later becomes active again at ANAF — gets restored automatically on the next run. Automatic restoration applies strictly to companies that this mechanism itself archived — if you manually archived a company for some other reason, the system won't reactivate it against your will.

    The company list now shows two visual indicators: an "Invalid CUI" badge (calculated from the CUI checksum, without waiting for the weekly check) and an "Archived (ANAF)" badge that replaces the "Active" state for auto-archived companies. On the company's detail page, a dedicated section shows the last check, the current status, and, when applicable, a manual restore button.

    Why it matters for an operator

    A deregistered partner can no longer issue or receive valid legal documents. If you issue a borderou (waste transfer note) or an invoice to a deregistered company without knowing it, that document becomes a problem at the first audit — not because you did anything wrong in the app, but because the partner information was out of date.

    Manually checking every company in the catalog periodically isn't realistic once you're talking about dozens or hundreds of partners. The weekly cron turns this from a task that's constantly forgotten into a process that runs itself — and explicitly flags on the dashboard whether any company has been archived in the last two weeks, or whether you have invalid CUIs in your catalog, so you find out before you try to issue a document to that partner, not after.

    Want to discuss how this applies to your process?

    Schedule a technical audit

    Related articles