Initial commit — sursa ROAIMOB

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 18:38:49 +03:00
commit a53bb1dcc9
355 changed files with 11924 additions and 0 deletions

53
.gitignore vendored Normal file
View File

@@ -0,0 +1,53 @@
# Subversion (legacy working copy metadata)
.svn/
# COMUN is a separate, shared git repo (its own .git) - not tracked here
COMUN/
# Visual FoxPro - compiled/generated artifacts
*.fxp
*.app
*.exe
*.err
*.bak
*.tmp
*.qpx
*.mpx
*.mpr
*.dct
LOG.txt
*.ARM
*.Stats
roaimob_ref.CDX
roaimob_ref.DBF
roaimob_ref.FPT
# Windows
*.lnk
Thumbs.db
Desktop.ini
bash.exe.stackdump
# Visual FoxPro - editor/backup copies of source files
*.scx~
*.sct~
*.vcx~
*.vct~
*.frx~
*.frt~
*.lbx~
*.lbt~
*.mnx~
*.mnt~
*.pjx~
*.pjt~
*.dbc~
*.dct~
*.dcx~
# Visual FoxPro - runtime resource/lock files
FoxUser.dbf
FoxUser.fpt
*.dbf.lock
*.fpt.lock
*.cdx.lock

49
CLAUDE.md Normal file
View File

@@ -0,0 +1,49 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project overview
ROAIMOB is the "Imobilizari" (Fixed Assets) module of ROA, a large Romanian ERP suite built by ROA Romfast SRL. It is a **Visual FoxPro 9** desktop application (not Delphi) backed by an **Oracle** database. The app manages Romanian fixed-asset accounting: asset registration, depreciation (amortizare), revaluation (reevaluare), custodian/location transfers (gestiune), transformation of in-progress assets into tangible/intangible fixed assets, inventory lists, and related reports.
This repo (`D:\ROA\ROAIMOB`) is just one module. It lives alongside dozens of sibling `ROA*` apps under `D:\ROA` (ROACASA, ROAFACTURARE, ROASAL, ROAHOTEL, ROAGEST, etc.), all sharing a common library normally found at `D:\ROA\COMUNROA` (outside this repo). This repo also vendors its own local snapshot of shared code under `./COMUN` (clase, ferestre, programe, rapoarte, meniuri, utile) — treat `./COMUN` as this app's copy of shared infrastructure, not ROAIMOB-specific business logic, unless a file clearly deals with `imob_*`/asset concerns.
Version control here is **Subversion** (`.svn` present at the root) — use `svn`, not `git`.
## Common commands
No build scripts, Makefiles, package manifests, CI config, or test suite exist in this repo — do not invent any.
- **Build**: There is no scripted/CLI build. `roaimob.PJX`/`.PJT` is a Visual FoxPro project file; building means opening it in the Visual FoxPro 9 IDE and using Project > Build to recompile `.prg``.FXP` and relink `roaimob.exe`. Individual source files can be recompiled with `COMPILE <file>.prg` from the VFP command window.
- **Run**: The compiled `roaimob.exe` is **not** meant to be launched directly in production — `Programe/roaimob.prg` checks `verific_start()` and refuses to run unless started by the central ROA launcher ("START"), which passes a single semicolon-delimited parameter string (`host;user;password;idutil;idprogram;...`) including the Oracle schema (`gcS`, e.g. `CONTAFIN`), company id (`gnIdFirma`), and fiscal period (`gnAn`/`gnLuna`). A `Debug_Start()` bypass exists for local/dev launches (defined outside this repo, in the shared COMUNROA tree).
- **Lint/tests**: none present.
## Searching inside compiled VFP binaries (foxbin2prg)
Most method/procedure code lives inside compiled `.vcx/.vct` (classes), `.scx/.sct` (forms), `.frx/.frt` (reports), `.mnx/.mnt` (menus) — grepping these binaries directly is unreliable. Use the shared `foxbin2prg` tool (already built at `D:\ROA\UTIL\foxbin2prg\FoxBin2Prg.EXE`) to decompile to readable text, then grep the text:
```powershell
& 'D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1' -Project 'D:\ROA\ROAIMOB\roaimob.PJX' -ProjectRoot 'D:\ROA\ROAIMOB' -CacheRoot 'D:\ROA\UTIL\foxbin2prg\_textcache_roaimob' -Types vcx,scx,frx,mnx
```
Reads the file list straight from `roaimob.PJX`, so it only converts files this project actually references (not all of `COMUN\`); incremental, safe to re-run after IDE edits. Output lands in `_textcache_roaimob/` as `.vc2/.sc2/.fr2/.mn2` text mirrors — grep those. **Read-only cache**: any real code change must be made in the VFP IDE on the original binary, then re-run the script to refresh the cache.
## Architecture
- **Thin client / DB-heavy split**: VFP forms (`Ferestre/*.scx`, `Clase/*.vcx`) only collect input and display data. Actual persistence and business rules live in Oracle **PL/SQL packages** (e.g. `pack_imob.inreg_majorare`, `pack_imob.inreg_reevaluare`), invoked through a shared `goExecutor` object (`oExecutor` class, registered from the `DECABAZA` classlib) via SQL strings like `begin pack_imob.inreg_reevaluare(...); end;`. When tracing a feature, expect to jump from a VFP form/procedure straight into an Oracle package call — the interesting logic is often server-side, not in the `.prg`.
- **Asset operations funnel through `Programe/oproceduri_operatii.prg`**, keyed by a fixed "cod operatie" enum documented in a comment block at the top of that file (1 introducere, 2 preluare, 3 transformare in MF, 4 iesire din gestiune, 5 intrare in gestiune, 6 majorare, 7 reevaluare, 8 schimbarea DNS, 9 recalculare cota, 10 conservare, 11 scoatere din conservare, 12 modificare cu istoric, 13 inchidere, 14 schimbare DNS + reevaluare). Each `op_*` procedure (`op_majorare`, `op_reevaluare`, `op_schimbaredns_reevaluare`, `op_conservare`, `op_schimbaredns`, `op_gest`, `op_modificare`, `op_transformare_mf`, `op_adaugare_la_mf`) follows the same pattern: show a modal form to collect data, then call the matching Oracle package procedure through `goExecutor` and return an `Empty` object with a `lSucces` flag plus the collected fields.
- **Data model** uses Oracle views/tables prefixed `IMOB_` (`imob_vnom_mf` = asset master/nomenclator, `imob_voperatii_mf` = operation history, `imob_vlista_mf` = current asset list, `imob_vcalcul_rate` = depreciation rate calculations, `imob_conturi` = account-code mapping). "MF" throughout the codebase means *mijloc fix* (fixed asset). Root-level `.sql` files (`istoric_amortizare_contabila.sql`, `istoric_amortizare_fiscala.sql`) are ad hoc reporting/audit queries against this schema, not migrations. `COMUN/Drepturi utilizatori/*.sql` define the user-rights/permission object catalog, shared across this and sibling apps (subfolders reference ROACASA, ROADEF, ROALUCRARI).
- **Startup wiring** (`Programe/roaimob.prg`) is the place to look when something "isn't found": it builds `SET PATH TO` across `Date;Include;Ferestre;Grafice;Clase;Meniuri;Programe;Rapoarte;COMUN;COMUN\...` and then issues a long, order-sensitive sequence of `SET PROCEDURE TO ... ADDITIVE` and `SET CLASSLIB TO ... ADDITIVE` statements to register dozens of shared `.prg` procedure libraries and `.vcx` class libraries globally. Later entries can shadow earlier ones with the same procedure/class name, so order in this file matters when debugging "wrong version of a procedure ran" issues.
- **Multi-tenant context**: the app operates against one Oracle schema per company (`gcS`, default `'CONTAFIN'`) and tracks the active company/fiscal period in globals `gnIdFirma`/`gnAn`/`gnLuna`, plus branch (`id_sucursala`). Most business queries and package calls are scoped by these.
- **Self-update**: on startup the app calls `oUpdate.updatecheck()` (`oupdate.prg`/`wwcodeupdate.prg`) against an update server; `versiune_db.txt` records the expected DB schema stamp (format `YYYY_MM_DD_NN`) checked against the server on launch.
- **Localization**: `Locale/` + the `locale` classlib + a `goLocale` object read `settings.ini` (`[locale] lang`, `llocale`) to select the UI language; Romanian is the default and the translation path is largely dormant (`glTraducere` defaults to `.F.`).
- **Changelog convention**: `changelog_roaimob.txt` holds HTML-comment-wrapped, dated (`dd/mm/yyyy`) entries per version (`ROAIMOB - X.Y.Z`), each with Romanian-language notes tagged `:nou:` (new), `:modificare:` (change), `:eroare:` (bug fix), or `:adaugare:` (addition). Follow this exact format/tagging when documenting a change here.
- **Unrelated nested project**: `COMUN/utile/chatbot/` is a standalone Flowise-embed HTML support chatbot (`chatbot_maria.html`) with its own README.md and CLAUDE.md. It has no relation to the FoxPro/Oracle asset-management app — don't conflate its guidance with ROAIMOB itself.

BIN
Clase/Vechi/APPWIZ.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/CautMF.vct Normal file

Binary file not shown.

BIN
Clase/Vechi/MFIX2000.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/SOLUTION.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/SOLUTION.VCX Normal file

Binary file not shown.

BIN
Clase/Vechi/Utility.vct Normal file

Binary file not shown.

BIN
Clase/Vechi/appwiz.vcx Normal file

Binary file not shown.

BIN
Clase/Vechi/caut.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/caut.vcx Normal file

Binary file not shown.

BIN
Clase/Vechi/cautmf.vcx Normal file

Binary file not shown.

BIN
Clase/Vechi/cont2000-2.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/cont2000-2.vcx Normal file

Binary file not shown.

BIN
Clase/Vechi/cont2000-3.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/cont2000-3.vcx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Clase/Vechi/imob_2005.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/imob_2005.vcx Normal file

Binary file not shown.

BIN
Clase/Vechi/mfix2000.vcx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Clase/Vechi/registry.vct Normal file

Binary file not shown.

BIN
Clase/Vechi/registry.vcx Normal file

Binary file not shown.

BIN
Clase/Vechi/utile.VCT Normal file

Binary file not shown.

BIN
Clase/Vechi/utile.vcx Normal file

Binary file not shown.

BIN
Clase/Vechi/utility.vcx Normal file

Binary file not shown.

BIN
Clase/ofundal_imob.VCT Normal file

Binary file not shown.

BIN
Clase/ofundal_imob.vcx Normal file

Binary file not shown.

BIN
Clase/oimobilizari.vct Normal file

Binary file not shown.

BIN
Clase/oimobilizari.vcx Normal file

Binary file not shown.

BIN
Clase/onom_imob.VCT Normal file

Binary file not shown.

BIN
Clase/onom_imob.vcx Normal file

Binary file not shown.

BIN
Ferestre/Vechi/FISA.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/FISA.SCX Normal file

Binary file not shown.

BIN
Ferestre/Vechi/FUNDALMF.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/FUNDALMF.SCX Normal file

Binary file not shown.

BIN
Ferestre/Vechi/INTROD.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/INTROD.SCX Normal file

Binary file not shown.

BIN
Ferestre/Vechi/QCKSTART.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/QCKSTART.SCX Normal file

Binary file not shown.

BIN
Ferestre/Vechi/VIZ.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/VIZ.SCX Normal file

Binary file not shown.

BIN
Ferestre/Vechi/about.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/about.scx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Ferestre/Vechi/fundal.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/fundal.scx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Ferestre/Vechi/ingest.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/ingest.scx Normal file

Binary file not shown.

BIN
Ferestre/Vechi/optiuni.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/optiuni.scx Normal file

Binary file not shown.

BIN
Ferestre/Vechi/start00.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/start00.scx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Ferestre/Vechi/valoare.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/valoare.scx Normal file

Binary file not shown.

BIN
Ferestre/Vechi/valori.SCT Normal file

Binary file not shown.

BIN
Ferestre/Vechi/valori.scx Normal file

Binary file not shown.

BIN
Ferestre/frm_modificare.SCT Normal file

Binary file not shown.

BIN
Ferestre/frm_modificare.scx Normal file

Binary file not shown.

BIN
Ferestre/fundal.SCT Normal file

Binary file not shown.

BIN
Ferestre/fundal.scx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Grafice/Vechi/ARW01LT.ICO Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
Grafice/Vechi/ARW01RT.ICO Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More