Skip to content

External Integrations

graph LR
    ERP["AncoraERP\n(Tomcat / ancoraerp)"]

    subgraph Romanian_Government["Romanian Government APIs"]
        BNR["BNR\nNational Bank\nnbrfxrates.xml"]
        ANAF["ANAF\nTax Authority\nSPV / e-Factura"]
    end

    subgraph Ancora_Cloud["Ancora Vendor Cloud"]
        DC["DarkCloud\n82.77.60.34:9999\nLicense + D394"]
    end

    subgraph Suppliers["Supplier Price Feed APIs (~20)"]
        RHS["RHS"]
        MICRO["MICRO"]
        ELKO["ELKO"]
        ROYAL["ROYAL"]
        SKIN["SKIN"]
        ITD["ITDirect"]
        TQC["TopQualityComputers"]
        DECK["DECK"]
        ASE["Asesoft"]
        DOTDOT2["...and 12 more"]
    end

    subgraph Logistics["Courier & Logistics"]
        INNIGHT["Innight Courier\nXML colete tracking"]
    end

    subgraph Email["Email / SMTP"]
        SMTP1["Internal SMTP\n192.168.0.105:25"]
        SMTP2["Gmail\nsmtp.gmail.com:465"]
    end

    BNR -->|"XML rate feed (daily)"| ERP
    ERP -->|"CUI lookup (SOAP/REST)"| ANAF
    ERP <-->|"License check\nD394 processing"| DC
    Suppliers -->|"price list CSV/XML/EDI\npreluareOferta*.serv"| ERP
    ERP <-->|"shipment import/export\nXML"| INNIGHT
    ERP -->|"daily reports\nerror alerts"| SMTP1
    ERP -->|"fallback"| SMTP2

Endpoint: https://www.bnr.ro/nbrfxrates.xml
Handler: /ancoraerp/cursbnr00.jsp
Trigger: daily_job.sh at 23:30 (after market close)

sequenceDiagram
    participant JOB as daily_job.sh
    participant JSP as cursbnr00.jsp
    participant BNR as bnr.ro XML API
    participant PG as All Tenant DBs

    JOB->>JSP: GET /ancoraerp/cursbnr00.jsp
    JSP->>BNR: GET https://www.bnr.ro/nbrfxrates.xml
    BNR-->>JSP: XML (date, EUR/USD/GBP/CHF/... rates)

    JSP->>JSP: Parse XML with lib1.jsp helpers
    loop For each tenant in public.unitati
        JSP->>PG: INSERT INTO cursvalutarbnr (data, valuta, curs, multiplicator) ON CONFLICT UPDATE
    end

    JSP-->>JOB: "Done — N currencies updated across M databases"

XML format (BNR standard):

<DataSet>
<Header><PublishingDate>2026-01-15</PublishingDate></Header>
<Body>
<Cube date="2026-01-15">
<Rate currency="EUR">4.9750</Rate>
<Rate currency="USD" multiplier="1">4.5230</Rate>
<Rate currency="GBP">5.5800</Rate>
</Cube>
</Body>
</DataSet>

Purpose: CUI (company fiscal code) lookup to auto-fill company data during registration
Handlers: codificari/searchCuiAnaf.jsp, codificari/get_cui_mfinante.jsp

sequenceDiagram
    participant U as User (adding a new client/supplier)
    participant JSP as searchCuiAnaf.jsp
    participant ANAF as webservicesp.anaf.ro

    U->>JSP: GET ?cui=RO12345678
    JSP->>ANAF: POST webservicesp.anaf.ro/PlatitorTvaRest/api/v8/ws/tva with cui+data body
    ANAF-->>JSP: JSON { denumire, adresa, judet, localitate, IBAN, ... }
    JSP-->>U: pre-filled form fields

Also used for:

  • Validating VAT registration status before issuing invoices
  • D394 VAT return preparation (matching invoice CUIs against ANAF records)

3. DarkCloud — Ancora Vendor Central Server

Section titled “3. DarkCloud — Ancora Vendor Central Server”

URL: http://82.77.60.34:9999/ (configured in web.xml as cale_dark_cloud)
Auth token: cod_identificare_dark_cloud=f5c97f47106eb685580bf128308d2895

This is Ancora’s own central server. Likely serves:

FunctionEvidence
License verificationToken in web.xml, checked at servlet startup
D394 declaration processingBasicServicesController service mapping
Remote schema distributionactualizaredb/ scripts may be fetched from here
Telemetry / call-homePossible; not confirmed
sequenceDiagram
    participant ERP as AncoraERP (Tomcat)
    participant DC as DarkCloud 82.77.60.34:9999

    ERP->>DC: POST /api/license/check with token
    DC-->>ERP: valid: true, expiry 2026-12-31

    ERP->>DC: POST /api/d394/process for period 2026-01
    DC-->>ERP: D394.xml Romanian VAT declaration

All 20+ suppliers have a matching .serv endpoint in servicesCommand.txt. Each scrapes or calls the supplier’s API/EDI and loads prices into produse_terti + oferte_furnizori.

Key in servicesCommand.txtSupplier
preluareOfertaRhsRHS Distribution
preluareOfertaMicroMicrotech
preluareOfertaElkoElko Romania
preluareOfertaRoyalRoyal Distribution (Despec)
preluareOfertaSkinSkin (accessories)
preluareOfertaItdirectIT Direct
preluareOfertaTqcTopQualityComputers
preluareOfertaDeckDECK
preluareOfertaAsesoftAsesoft International
preluareOfertaAsbisASBIS Romania
preluareOfertaMbdistributionMB Distribution
preluareOfertaOmnilogicOmnilogic
preluareOfertaNeodigitalNeodigital
preluareOfertaLogicomLogicom
preluareOfertaGmnGMN
preluareOfertaPccoolersPCCoolers
preluareOfertaScopcomputersScopComputers
preluareOfertaSolitonSoliton
preluareOfertaMgtMGT
preluareOfertaIrisIRIS
preluareOfertaAbcdataABCData
preluareOfertaApcomHuApcom Hungary
preluareOfertaApcomEuApcom EU
flowchart TD
    TRIGGER["Admin triggers\n/ancoraerp/preluareOfertaRhs.serv\nor scheduled job"]
    FETCH["Java class (suppliers-api.jar)\nFetch price list from supplier\n(FTP / HTTP / EDI / CSV / XML)"]
    PARSE["Parse response\nmap supplier codes → internal product codes\nvia produse_terti cross-reference table"]
    UPSERT["INSERT/UPDATE oferte_furnizori\n(supplier, product, price, stock_qty, valid_until)"]
    NOTIFY["Optional: email buyer with\nnew/changed prices report"]

    TRIGGER --> FETCH --> PARSE --> UPSERT --> NOTIFY

Handler: import_colete_innight.serv / export_colete_innight.serv

sequenceDiagram
    participant ERP as AncoraERP
    participant INN as Innight.ro API

    ERP->>INN: POST shipment XML AWB request
    INN-->>ERP: AWB number + label PDF URL

    INN->>ERP: Webhook or GET import_colete_innight.serv with status updates
    ERP->>ERP: UPDATE avize_livrare status

Two configured mail servers — both currently unreachable:

ServerPortStatusUse
192.168.0.10525UNREACHABLE — host offline or firewallDaily reports, invoice PDF sending
smtp.gmail.com465FAILING — likely expired App PasswordFallback alerts

Mail sending uses ancora-mailer.jar via lib/ajutorMail.jsp utility JSP.

Emails sent by the system:

  • Nightly operation summary from daily_job.sh
  • Invoice PDFs (via sendMailFormular.do)
  • Supplier price change reports
  • Error/exception alerts