Update .trash, dashboard, root +1 more (+1 ~5 -18)
This commit is contained in:
86
.trash/bilant_compare/2025_vs_2024/RAPORT_2025_vs_2024.md
Normal file
86
.trash/bilant_compare/2025_vs_2024/RAPORT_2025_vs_2024.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Raport Comparare Bilanț ANAF: 12/2025 vs 12/2024
|
||||
## (Depuneri 2026 vs Depuneri 2025)
|
||||
|
||||
Data analizei: 2026-01-29
|
||||
Baza legală 2025: **OMF nr. 2036/23.12.2025**
|
||||
|
||||
---
|
||||
|
||||
## 🔴 IMPORTANT: Doar S1002 are modificări!
|
||||
|
||||
S1003, S1004, S1005 folosesc **aceleași XSD-uri** ca pentru 2024.
|
||||
|
||||
---
|
||||
|
||||
## S1002 - Entități Mari și Mijlocii
|
||||
|
||||
**Versiune**: v14 → v15
|
||||
|
||||
### ⭐ Câmpuri NOI (OBLIGATORII):
|
||||
|
||||
| Câmp | Tip | Descriere |
|
||||
|------|-----|-----------|
|
||||
| **AN_CAEN** | IntInt2024_2025SType | **NOU! Anul pentru codul CAEN (2024 sau 2025)** |
|
||||
| **d_audit_intern** | IntPoz1SType | **NOU! Declarație audit intern** |
|
||||
|
||||
### 🔄 Câmpuri MODIFICATE:
|
||||
|
||||
| Câmp | 2024 | 2025 | Impact |
|
||||
|------|------|------|--------|
|
||||
| cif_audi | CnpSType (CNP) | **CuiSType** | **Înapoi la CUI!** (era CNP în 2024) |
|
||||
| bifa_aprob | Int_bifaAprobSType | IntInt1_1SType | Simplificat |
|
||||
| bifa_art27 | Int_bifaArt27SType | IntInt0_0SType | Simplificat |
|
||||
| interes_public | Int_interesPublicSType | IntInt0_1SType | Simplificat |
|
||||
|
||||
### ➕ Câmp RE-ADĂUGAT:
|
||||
| Câmp | Notă |
|
||||
|------|------|
|
||||
| **F40_0174** | Re-adăugat (fusese eliminat în v14!) |
|
||||
|
||||
### 📋 Coduri CAEN NOI:
|
||||
**+150 coduri CAEN** adăugate în enumerare, printre care:
|
||||
- 5330, 1625, 3032, 9013, 7412, 1628, 4783, 9020
|
||||
- 3100, 6422, 8694, 9699, 8692, 8569, 4682, 4686
|
||||
- și multe altele...
|
||||
|
||||
---
|
||||
|
||||
## S1003, S1004, S1005 - FĂRĂ MODIFICĂRI
|
||||
|
||||
Aceste formulare folosesc aceleași scheme XSD ca pentru 2024:
|
||||
- s1003_20250204.xsd
|
||||
- s1004_20250204.xsd
|
||||
- s1005_20250206.xsd
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Acțiuni Necesare pentru ROA
|
||||
|
||||
### Prioritate ÎNALTĂ:
|
||||
1. **Actualizare namespace** S1002: v14 → v15
|
||||
2. **Adăugare câmp AN_CAEN** (obligatoriu, valori: 2024 sau 2025)
|
||||
3. **Adăugare câmp d_audit_intern** (audit intern)
|
||||
4. **Modificare validare cif_audi** - înapoi la CUI (nu mai e CNP!)
|
||||
5. **Re-activare F40_0174**
|
||||
|
||||
### Prioritate MEDIE:
|
||||
6. Actualizare lista coduri CAEN (+150 noi)
|
||||
7. Simplificare tipuri pentru bifa_aprob, bifa_art27, interes_public
|
||||
|
||||
---
|
||||
|
||||
## Fișiere Sursă
|
||||
|
||||
| Formular | 2024 | 2025 |
|
||||
|----------|------|------|
|
||||
| S1002 | s1002_20250204.xsd (v14) | s1002_20260128.xsd (v15) |
|
||||
| S1003 | s1003_20250204.xsd | *același* |
|
||||
| S1004 | s1004_20250204.xsd | *același* |
|
||||
| S1005 | s1005_20250206.xsd | *același* |
|
||||
|
||||
---
|
||||
|
||||
## Link-uri ANAF
|
||||
|
||||
- [Pagina 2025](https://static.anaf.ro/static/10/Anaf/Declaratii_R/situatiifinanciare/2025/1002_5_2025.html)
|
||||
- [OMF 2036/2025](https://static.anaf.ro/static/10/Anaf/legislatie/O_2036_2025.pdf)
|
||||
1902
.trash/bilant_compare/2025_vs_2024/s1002_2024.xsd
Normal file
1902
.trash/bilant_compare/2025_vs_2024/s1002_2024.xsd
Normal file
File diff suppressed because it is too large
Load Diff
2054
.trash/bilant_compare/2025_vs_2024/s1002_2025.xsd
Normal file
2054
.trash/bilant_compare/2025_vs_2024/s1002_2025.xsd
Normal file
File diff suppressed because it is too large
Load Diff
147
.trash/bilant_compare/RAPORT_DIFERENTE_2024_vs_2023.md
Normal file
147
.trash/bilant_compare/RAPORT_DIFERENTE_2024_vs_2023.md
Normal file
@@ -0,0 +1,147 @@
|
||||
# Raport Comparare Formulare Bilanț ANAF
|
||||
## 2024 (pentru depuneri 2025) vs 2023 (pentru depuneri 2024)
|
||||
|
||||
Data analizei: 2026-01-29
|
||||
|
||||
---
|
||||
|
||||
## Rezumat Executiv
|
||||
|
||||
Toate formularele au primit versiuni noi cu modificări structurale:
|
||||
- **S1002**: v12 → v14 (entități mari/mijlocii)
|
||||
- **S1003**: v12 → v13 (entități mici)
|
||||
- **S1004**: v12 → v13 (raportări contabile)
|
||||
- **S1005**: v12 → v13 (microentități)
|
||||
|
||||
### Principalele Schimbări
|
||||
|
||||
1. **Câmpuri NOI în F20** (toate formularele):
|
||||
- `F20_3181`, `F20_3182`
|
||||
- `F20_3171`, `F20_3172`
|
||||
|
||||
2. **Validare auditor modificată**:
|
||||
- S1002: `cif_audi` schimbat de la CIF la **CNP** (pattern 13 cifre începând cu 1-9)
|
||||
- S1003, S1004, S1005: `cif_audi` → CuiSType
|
||||
|
||||
3. **Restricție an minim**:
|
||||
- Formularele nu mai acceptă ani vechi (2018/2023 → 2024)
|
||||
|
||||
---
|
||||
|
||||
## S1002 - Entități Mari și Mijlocii
|
||||
|
||||
**Versiune**: v12 → v14
|
||||
|
||||
### Câmpuri NOI:
|
||||
| Câmp | Tip | Descriere |
|
||||
|------|-----|-----------|
|
||||
| F20_3181 | IntNeg15SType | Nou în F20 |
|
||||
| F20_3182 | IntNeg15SType | Nou în F20 |
|
||||
| F20_3171 | IntNeg15SType | Nou în F20 |
|
||||
| F20_3172 | IntNeg15SType | Nou în F20 |
|
||||
|
||||
### Câmpuri ELIMINATE:
|
||||
| Câmp | Notă |
|
||||
|------|------|
|
||||
| F40_0174 | Eliminat din F40 |
|
||||
|
||||
### Câmpuri MODIFICATE:
|
||||
| Câmp | Vechi | Nou | Impact |
|
||||
|------|-------|-----|--------|
|
||||
| cif_audi | CifSType | CnpSType | **ATENȚIE: Acum cere CNP, nu CIF!** |
|
||||
| an | 2018-2100 | 2024-2100 | Nu mai acceptă ani vechi |
|
||||
|
||||
### Enumerări NOI:
|
||||
- Adăugată valoarea "16" la lista de tipuri valide
|
||||
|
||||
---
|
||||
|
||||
## S1003 - Entități Mici
|
||||
|
||||
**Versiune**: v12 → v13
|
||||
|
||||
### Câmpuri NOI:
|
||||
| Câmp | Tip |
|
||||
|------|-----|
|
||||
| F20_3181 | IntNeg15SType |
|
||||
| F20_3182 | IntNeg15SType |
|
||||
| F20_3171 | IntNeg15SType |
|
||||
| F20_3172 | IntNeg15SType |
|
||||
|
||||
### Câmpuri MODIFICATE (tip):
|
||||
| Câmp | Vechi | Nou | Impact |
|
||||
|------|-------|-----|--------|
|
||||
| F30_0341 | IntNeg15SType | IntPoz15SType | Doar valori pozitive |
|
||||
| F30_0351 | IntNeg15SType | IntPoz15SType | Doar valori pozitive |
|
||||
| F30_0361 | IntNeg15SType | IntPoz15SType | Doar valori pozitive |
|
||||
| cif_audi | CifSType | CuiSType | Format modificat |
|
||||
|
||||
---
|
||||
|
||||
## S1004 - Raportări Contabile
|
||||
|
||||
**Versiune**: v12 → v13
|
||||
|
||||
### Câmpuri NOI:
|
||||
| Câmp | Tip |
|
||||
|------|-----|
|
||||
| F20_3181 | IntNeg15SType |
|
||||
| F20_3182 | IntNeg15SType |
|
||||
| F20_3171 | IntNeg15SType |
|
||||
| F20_3172 | IntNeg15SType |
|
||||
|
||||
### Câmpuri MODIFICATE:
|
||||
| Câmp | Vechi | Nou |
|
||||
|------|-------|-----|
|
||||
| tip_rapSL | IntInt1_4SType | Int_tipRapSLSType |
|
||||
| interes_public | Int_interesPublicSType | IntInt0_1SType |
|
||||
| an | 2023-2100 | 2018-2100 (relaxat) |
|
||||
|
||||
---
|
||||
|
||||
## S1005 - Microentități
|
||||
|
||||
**Versiune**: v12 → v13
|
||||
|
||||
### Câmpuri NOI:
|
||||
| Câmp | Tip | Descriere |
|
||||
|------|-----|-----------|
|
||||
| cif_intocmit | CifSType | **NOU: CIF persoană care întocmește** |
|
||||
| F20_3051 | IntNeg15SType | Nou în F20 |
|
||||
| F20_3052 | IntNeg15SType | Nou în F20 |
|
||||
| F30_3421 | IntNeg15SType | Nou în F30 |
|
||||
| F30_3422 | IntNeg15SType | Nou în F30 |
|
||||
| F30_3411 | IntNeg15SType | Nou în F30 |
|
||||
| F30_3412 | IntNeg15SType | Nou în F30 |
|
||||
|
||||
### Câmpuri MODIFICATE:
|
||||
| Câmp | Vechi | Nou | Impact |
|
||||
|------|-------|-----|--------|
|
||||
| F10_0011 | IntNeg15SType | IntPoz15SType | Doar valori pozitive |
|
||||
| cif_audi | Str13 | CuiSType | Format modificat |
|
||||
|
||||
---
|
||||
|
||||
## Recomandări pentru Dezvoltatori ROA
|
||||
|
||||
1. **Actualizare namespace-uri XML** - toate au versiuni noi
|
||||
2. **Adăugare câmpuri F20_31xx** în toate formularele
|
||||
3. **Modificare validare auditor** - S1002 cere acum CNP, nu CIF
|
||||
4. **Câmpuri cu tip schimbat** (IntNeg → IntPoz) - elimină valori negative
|
||||
5. **Câmp nou cif_intocmit** pentru S1005
|
||||
6. **Eliminare F40_0174** din S1002
|
||||
|
||||
---
|
||||
|
||||
## Fișiere Comparate
|
||||
|
||||
| An | Formular | Dimensiune | Link |
|
||||
|----|----------|------------|------|
|
||||
| 2023 | S1002 | 90KB | s1002_20240119.xsd |
|
||||
| 2024 | S1002 | 90KB | s1002_20250204.xsd |
|
||||
| 2023 | S1003 | 60KB | s1003_20240131.xsd |
|
||||
| 2024 | S1003 | 84KB | s1003_20250204.xsd |
|
||||
| 2023 | S1004 | 90KB | s1004_20240129.xsd |
|
||||
| 2024 | S1004 | 90KB | s1004_20250204.xsd |
|
||||
| 2023 | S1005 | 60KB | s1005_20240131.xsd |
|
||||
| 2024 | S1005 | 84KB | s1005_20250206.xsd |
|
||||
1893
.trash/bilant_compare/s1002_2023.xsd
Normal file
1893
.trash/bilant_compare/s1002_2023.xsd
Normal file
File diff suppressed because it is too large
Load Diff
1902
.trash/bilant_compare/s1002_2024.xsd
Normal file
1902
.trash/bilant_compare/s1002_2024.xsd
Normal file
File diff suppressed because it is too large
Load Diff
1105
.trash/bilant_compare/s1003_2023.xsd
Normal file
1105
.trash/bilant_compare/s1003_2023.xsd
Normal file
File diff suppressed because it is too large
Load Diff
1796
.trash/bilant_compare/s1003_2024.xsd
Normal file
1796
.trash/bilant_compare/s1003_2024.xsd
Normal file
File diff suppressed because it is too large
Load Diff
1890
.trash/bilant_compare/s1004_2023.xsd
Normal file
1890
.trash/bilant_compare/s1004_2023.xsd
Normal file
File diff suppressed because it is too large
Load Diff
1890
.trash/bilant_compare/s1004_2024.xsd
Normal file
1890
.trash/bilant_compare/s1004_2024.xsd
Normal file
File diff suppressed because it is too large
Load Diff
1104
.trash/bilant_compare/s1005_2023.xsd
Normal file
1104
.trash/bilant_compare/s1005_2023.xsd
Normal file
File diff suppressed because it is too large
Load Diff
1798
.trash/bilant_compare/s1005_2024.xsd
Normal file
1798
.trash/bilant_compare/s1005_2024.xsd
Normal file
File diff suppressed because it is too large
Load Diff
BIN
.trash/bilant_compare/structura_2023.pdf
Normal file
BIN
.trash/bilant_compare/structura_2023.pdf
Normal file
Binary file not shown.
BIN
.trash/bilant_compare/structura_2024.pdf
Normal file
BIN
.trash/bilant_compare/structura_2024.pdf
Normal file
Binary file not shown.
111
.trash/monitor.py
Executable file
111
.trash/monitor.py
Executable file
@@ -0,0 +1,111 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
ANAF Page Monitor - Simple hash-based change detection
|
||||
Checks configured pages and reports changes via stdout
|
||||
"""
|
||||
|
||||
import json
|
||||
import hashlib
|
||||
import urllib.request
|
||||
import ssl
|
||||
import os
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
SCRIPT_DIR = Path(__file__).parent
|
||||
CONFIG_FILE = SCRIPT_DIR / "config.json"
|
||||
HASHES_FILE = SCRIPT_DIR / "hashes.json"
|
||||
LOG_FILE = SCRIPT_DIR / "monitor.log"
|
||||
|
||||
# SSL context that doesn't verify (some ANAF pages have cert issues)
|
||||
SSL_CTX = ssl.create_default_context()
|
||||
SSL_CTX.check_hostname = False
|
||||
SSL_CTX.verify_mode = ssl.CERT_NONE
|
||||
|
||||
def log(msg):
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
with open(LOG_FILE, "a") as f:
|
||||
f.write(f"[{timestamp}] {msg}\n")
|
||||
|
||||
def load_json(path, default=None):
|
||||
try:
|
||||
with open(path) as f:
|
||||
return json.load(f)
|
||||
except:
|
||||
return default if default is not None else {}
|
||||
|
||||
def save_json(path, data):
|
||||
with open(path, "w") as f:
|
||||
json.dump(data, f, indent=2)
|
||||
|
||||
def fetch_page(url, timeout=30):
|
||||
"""Fetch page content"""
|
||||
try:
|
||||
req = urllib.request.Request(url, headers={
|
||||
'User-Agent': 'Mozilla/5.0 (compatible; ANAF-Monitor/1.0)'
|
||||
})
|
||||
with urllib.request.urlopen(req, timeout=timeout, context=SSL_CTX) as resp:
|
||||
return resp.read()
|
||||
except Exception as e:
|
||||
log(f"ERROR fetching {url}: {e}")
|
||||
return None
|
||||
|
||||
def compute_hash(content):
|
||||
"""Compute SHA256 hash of content"""
|
||||
return hashlib.sha256(content).hexdigest()
|
||||
|
||||
def check_page(page, hashes):
|
||||
"""Check a single page for changes. Returns change info or None."""
|
||||
page_id = page["id"]
|
||||
name = page["name"]
|
||||
url = page["url"]
|
||||
|
||||
content = fetch_page(url)
|
||||
if content is None:
|
||||
return None
|
||||
|
||||
new_hash = compute_hash(content)
|
||||
old_hash = hashes.get(page_id)
|
||||
|
||||
if old_hash is None:
|
||||
log(f"INIT: {page_id} - storing initial hash")
|
||||
hashes[page_id] = new_hash
|
||||
return None
|
||||
|
||||
if new_hash != old_hash:
|
||||
log(f"CHANGE DETECTED: {page_id} - {name}")
|
||||
log(f" URL: {url}")
|
||||
log(f" Old hash: {old_hash}")
|
||||
log(f" New hash: {new_hash}")
|
||||
hashes[page_id] = new_hash
|
||||
return {"id": page_id, "name": name, "url": url}
|
||||
|
||||
log(f"OK: {page_id} - no changes")
|
||||
return None
|
||||
|
||||
def main():
|
||||
log("=== Starting ANAF monitor check ===")
|
||||
|
||||
config = load_json(CONFIG_FILE, {"pages": []})
|
||||
hashes = load_json(HASHES_FILE, {})
|
||||
|
||||
changes = []
|
||||
for page in config["pages"]:
|
||||
change = check_page(page, hashes)
|
||||
if change:
|
||||
changes.append(change)
|
||||
|
||||
save_json(HASHES_FILE, hashes)
|
||||
|
||||
log("=== Monitor check complete ===")
|
||||
|
||||
# Output changes as JSON for the caller
|
||||
if changes:
|
||||
print(json.dumps({"changes": changes}))
|
||||
else:
|
||||
print(json.dumps({"changes": []}))
|
||||
|
||||
return len(changes)
|
||||
|
||||
if __name__ == "__main__":
|
||||
exit(main())
|
||||
87
.trash/monitor.sh
Executable file
87
.trash/monitor.sh
Executable file
@@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
# ANAF Page Monitor - Simple hash-based change detection
|
||||
# Checks configured pages and reports changes
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CONFIG_FILE="$SCRIPT_DIR/config.json"
|
||||
HASHES_FILE="$SCRIPT_DIR/hashes.json"
|
||||
LOG_FILE="$SCRIPT_DIR/monitor.log"
|
||||
|
||||
# Initialize hashes file if not exists
|
||||
if [ ! -f "$HASHES_FILE" ]; then
|
||||
echo "{}" > "$HASHES_FILE"
|
||||
fi
|
||||
|
||||
log() {
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOG_FILE"
|
||||
}
|
||||
|
||||
check_page() {
|
||||
local id="$1"
|
||||
local name="$2"
|
||||
local url="$3"
|
||||
|
||||
# Fetch page content and compute hash
|
||||
local content=$(curl -s -L --max-time 30 "$url" 2>/dev/null)
|
||||
if [ -z "$content" ]; then
|
||||
log "ERROR: Failed to fetch $id ($url)"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local new_hash=$(echo "$content" | sha256sum | cut -d' ' -f1)
|
||||
local old_hash=$(jq -r ".[\"$id\"] // \"\"" "$HASHES_FILE")
|
||||
|
||||
if [ "$old_hash" = "" ]; then
|
||||
# First time seeing this page
|
||||
log "INIT: $id - storing initial hash"
|
||||
jq ". + {\"$id\": \"$new_hash\"}" "$HASHES_FILE" > "$HASHES_FILE.tmp" && mv "$HASHES_FILE.tmp" "$HASHES_FILE"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "$new_hash" != "$old_hash" ]; then
|
||||
log "CHANGE DETECTED: $id - $name"
|
||||
log " URL: $url"
|
||||
log " Old hash: $old_hash"
|
||||
log " New hash: $new_hash"
|
||||
|
||||
# Update stored hash
|
||||
jq ". + {\"$id\": \"$new_hash\"}" "$HASHES_FILE" > "$HASHES_FILE.tmp" && mv "$HASHES_FILE.tmp" "$HASHES_FILE"
|
||||
|
||||
# Output change for notification
|
||||
echo "CHANGE:$id:$name:$url"
|
||||
return 2
|
||||
fi
|
||||
|
||||
log "OK: $id - no changes"
|
||||
return 0
|
||||
}
|
||||
|
||||
main() {
|
||||
log "=== Starting ANAF monitor check ==="
|
||||
|
||||
local changes=""
|
||||
|
||||
# Read config and check each page
|
||||
while IFS= read -r page; do
|
||||
id=$(echo "$page" | jq -r '.id')
|
||||
name=$(echo "$page" | jq -r '.name')
|
||||
url=$(echo "$page" | jq -r '.url')
|
||||
|
||||
result=$(check_page "$id" "$name" "$url")
|
||||
if [ -n "$result" ]; then
|
||||
changes="$changes$result\n"
|
||||
fi
|
||||
|
||||
# Small delay between requests
|
||||
sleep 2
|
||||
done < <(jq -c '.pages[]' "$CONFIG_FILE")
|
||||
|
||||
log "=== Monitor check complete ==="
|
||||
|
||||
# Output changes (if any) for the caller to handle
|
||||
if [ -n "$changes" ]; then
|
||||
echo -e "$changes"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user