External Integrations
Integration Map
Section titled “Integration Map”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
1. BNR — National Bank Exchange Rates
Section titled “1. BNR — National Bank Exchange Rates”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>2. ANAF — Romanian Tax Authority
Section titled “2. ANAF — Romanian Tax Authority”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:
| Function | Evidence |
|---|---|
| License verification | Token in web.xml, checked at servlet startup |
| D394 declaration processing | BasicServicesController service mapping |
| Remote schema distribution | actualizaredb/ scripts may be fetched from here |
| Telemetry / call-home | Possible; 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
4. Supplier Price Feeds
Section titled “4. Supplier Price Feeds”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.txt | Supplier |
|---|---|
preluareOfertaRhs | RHS Distribution |
preluareOfertaMicro | Microtech |
preluareOfertaElko | Elko Romania |
preluareOfertaRoyal | Royal Distribution (Despec) |
preluareOfertaSkin | Skin (accessories) |
preluareOfertaItdirect | IT Direct |
preluareOfertaTqc | TopQualityComputers |
preluareOfertaDeck | DECK |
preluareOfertaAsesoft | Asesoft International |
preluareOfertaAsbis | ASBIS Romania |
preluareOfertaMbdistribution | MB Distribution |
preluareOfertaOmnilogic | Omnilogic |
preluareOfertaNeodigital | Neodigital |
preluareOfertaLogicom | Logicom |
preluareOfertaGmn | GMN |
preluareOfertaPccoolers | PCCoolers |
preluareOfertaScopcomputers | ScopComputers |
preluareOfertaSoliton | Soliton |
preluareOfertaMgt | MGT |
preluareOfertaIris | IRIS |
preluareOfertaAbcdata | ABCData |
preluareOfertaApcomHu | Apcom Hungary |
preluareOfertaApcomEu | Apcom 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
5. Innight Courier
Section titled “5. Innight Courier”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
6. Email (SMTP)
Section titled “6. Email (SMTP)”Two configured mail servers — both currently unreachable:
| Server | Port | Status | Use |
|---|---|---|---|
192.168.0.105 | 25 | UNREACHABLE — host offline or firewall | Daily reports, invoice PDF sending |
smtp.gmail.com | 465 | FAILING — likely expired App Password | Fallback 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