{"id":"c0984","filename":"c0984_fenixv4_invoicing_zakon23.dok.json","weise3_id":"WEISE3::bafcce821095bb41a6402a4ab12103df::CC::dokarh::FENIX2026","tip":"implementacija","naziv":"Fenix V4 — Invoicing ZAKON 2+3 chain compliance + InvoicingProfile endpoint","kreator":"genesis","datum":"","snippet":"","status":"CLOSED","prev_weise3":"","bunker_l":"#00d4ff","full":{"tip":"implementacija","status":"CLOSED","naziv":"Fenix V4 — Invoicing ZAKON 2+3 chain compliance + InvoicingProfile endpoint","sto_treba":"Dodati Cigla (ZivaCigla) + genesis chain push u service.py za create_invoice, change_status, acknowledge_invoice. Dodati InvoiceProfile CRUD (POST/GET /profiles).","faze":{"service_chain":"DONE — _chain_push() + _cigla_save() + asyncio.ensure_future() u create_invoice, change_status, acknowledge_invoice","d9_svjedok":"DONE — d9_witness() pozvan u change_status i acknowledge_invoice","zugangsbeweis_chain":"DONE — acknowledge_invoice KRITICNO: content_hash + witness_hash u chain (pravni dokaz primitka)","profile_schemas":"DONE — InvoiceProfileIn + InvoiceProfileOut dodani u schemas.py","profile_service":"DONE — create_profile, get_profiles, get_default_profile u service.py","profile_router":"DONE — POST /profiles + GET /profiles, JWT zastiteni, company membership check"},"zakon":["ZAKON 1A (WeisE3 + Cigla)","ZAKON 2 (brsljani push)","ZAKON 3 (trojna pohrana)","ZAKON 27 (weise3_id na modelu)"],"endpointi":{"POST /api/v4/invoicing/invoices":"create + Cigla + chain push","PATCH /api/v4/invoicing/invoices/{id}/status":"change_status + D9 Svjedok chain push","POST /api/v4/invoicing/portal/{token}/acknowledge":"Zugangsbeweis + Cigla + chain push","POST /api/v4/invoicing/profiles":"NOVO — kreira InvoicingProfile za tvrtku","GET /api/v4/invoicing/profiles":"NOVO — lista profila, default je prvi"},"chain_tipovi":{"invoice":"create_invoice — weise3_id, number, company_id, total","invoice_status":"change_status — old/new status + witness_hash","invoice_ack":"acknowledge_invoice — content_hash + witness_hash (Zugangsbeweis pravni dokaz)","invoice_profile":"create_profile — IBAN, OIB, tvrtka podaci"},"implementacija":{"file":"/var/www/fenix-v4/invoicing/service.py","chain_url":"http://127.0.0.1:8010/api/v1/brsljani/dok/{genesis_id}","cigla_dir":"/var/www/fenix-v4/.cigle","pattern":"fire-and-forget asyncio.ensure_future — ne blokira main flow, iznimke logirane"},"napomena":"Zugangsbeweis (potvrda primitka) je najkritičniji chain entry — pravni dokaz da je klijent vidio i potvrdio faktu. content_hash + witness_hash zajedno formiraju neopovrgivi digitalni trag.","sesija":"2026-05-18","git_commit":"pending","weise3_id":"WEISE3::bafcce821095bb41a6402a4ab12103df::CC::dokarh::FENIX2026"}}