Centurio Documentazione dei sistemi e dei moduli
🏛️ Architettura della piattaforma 🔑 Login
🏠 Tutti i moduli / sales_billing / Spese
📘

Spese

expenses sales_billing 🛡️ RLS Protected

Le spese e le spese <unk> documentazione processuale e API derivata dal codice.

Fachliche Bestimmung: I costi e le spese <unk> documentazione processuale e API derivata dal codice.

⚡ Flussi di lavoro e cicli di vita

Ordine d'uso: agente di spesa plan:command_expense_agent

Controllato piano duraturo (durable_plan), inizio: manual_command.

1. expense_agent
expense_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: expense_agent

Ordine d'uso: agente generale delle spese plan:command_expense_general_agent

Controllato piano duraturo (durable_plan), inizio: manual_command.

1. expense_general_agent
expense_general_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: expense_general_agent

Ordine d'uso: agente di ricezione plan:command_receipt_agent

Controllato piano duraturo (durable_plan), inizio: manual_command.

1. receipt_agent
receipt_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: receipt_agent

Ordine d'uso: agente fatturazione fornitore plan:command_supplier_invoice_agent

Controllato piano duraturo (durable_plan), inizio: manual_command.

1. supplier_invoice_agent
supplier_invoice_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: supplier_invoice_agent

Capacità di produzione status:expense

La macchina in stato di osservazione (solo osservabile) non è obbligatoria.

1. detected
rilevato
Statuto <unk>detected<unk> della macchina di stato
2. needs_review
needs_review
Statuto <unk>needs_review<unk> della versione della macchina di stato.
3. approved
approvato
Statuto <unk>approved<unk> della macchina di stato
4. exported
Esportato
Statuto <unk>exportato<unk> della macchina di stato

🗄️ Modelli di dati

ExpenseItems expense_items RLS Aktiv
20 Feltri / colonne

Tabelle expense_items

Feldname Tipo di dati Dati Schlüssel Importanza professionale
expense_id UUID Ja * FK ➔ expenses.id Feld expense_id
position INTEGER Ja * - Feld position
description TEXT Ja * - Feld description
product_id UUID Nein FK ➔ products.id Feld product_id
quantity NUMERIC(14, 4) Nein - Feld quantity
unit VARCHAR(16) Nein - Feld unit
unit_price NUMERIC(14, 2) Nein - Feld unit_price
net_amount NUMERIC(14, 2) Ja * - Feld net_amount
tax_rate NUMERIC(6, 4) Ja * - Feld tax_rate
tax_amount NUMERIC(14, 2) Ja * - Feld tax_amount
gross_amount NUMERIC(14, 2) Ja * - Feld gross_amount
project_id UUID Nein FK ➔ projects.id Feld project_id
material_action VARCHAR(48) Ja * - Feld material_action
inventory_action VARCHAR(48) Ja * - Feld inventory_action
confidence NUMERIC(4, 3) Nein - Feld confidence
id UUID Nein PK Feld id
tenant_id UUID Ja * FK ➔ organizations.id Feld tenant_id
created_at DATETIME Ja * - Feld created_at
updated_at DATETIME Ja * - Feld updated_at
metadata JSONB Ja * - Feld metadata
Expenses expenses RLS Aktiv
31 Feltri / colonne

Tabelle expenses

Feldname Tipo di dati Dati Schlüssel Importanza professionale
supplier_id UUID Nein FK ➔ suppliers.id Feld supplier_id
project_id UUID Nein FK ➔ projects.id Feld project_id
work_order_id UUID Nein FK ➔ work_orders.id Feld work_order_id
purchase_id UUID Nein FK ➔ purchases.id Feld purchase_id
goods_receipt_id UUID Nein FK ➔ goods_receipts.id Feld goods_receipt_id
document_id UUID Nein FK ➔ documents.id Feld document_id
expense_date DATE Ja * - Feld expense_date
receipt_number VARCHAR(64) Nein - Feld receipt_number
currency VARCHAR(3) Ja * - Feld currency
net_amount NUMERIC(14, 2) Ja * - Feld net_amount
tax_amount NUMERIC(14, 2) Ja * - Feld tax_amount
gross_amount NUMERIC(14, 2) Ja * - Feld gross_amount
payment_method VARCHAR(32) Nein - Feld payment_method
category VARCHAR(64) Nein - Feld category
cost_type_id UUID Nein FK ➔ cost_types.id Feld cost_type_id
cost_center_id UUID Nein FK ➔ cost_centers.id Feld cost_center_id
internal_order_id UUID Nein FK ➔ controlling_internal_orders.id Feld internal_order_id
status VARCHAR(48) Ja * - Feld status
confidence NUMERIC(4, 3) Nein - Feld confidence
totals_consistent BOOLEAN Nein - Feld totals_consistent
external_accounting_id VARCHAR(128) Nein - Feld external_accounting_id
idempotency_key VARCHAR(128) Nein - Feld idempotency_key
id UUID Nein PK Feld id
tenant_id UUID Ja * FK ➔ organizations.id Feld tenant_id
created_at DATETIME Ja * - Feld created_at
updated_at DATETIME Ja * - Feld updated_at
created_by UUID Nein - Feld created_by
updated_by UUID Nein - Feld updated_by
source_type VARCHAR(32) Nein - Feld source_type
source_id UUID Nein - Feld source_id
metadata JSONB Ja * - Feld metadata

🔌 Punto di partenza (UI & API)

Art Metodo Punto finale / percorso Titel & Zweck Il diritto
⚡ REST API DELETE /api/v1/expenses/{expense_id}
delete_expense
Semantic binding: operator_surface; mutation=True
expenses
⚡ REST API GET /api/v1/expenses
list_expenses
Semantic binding: inventory_only; mutation=False
expenses
⚡ REST API GET /api/v1/expenses/{expense_id}
get_expense
Semantic binding: inventory_only; mutation=False
expenses
⚡ REST API GET /api/v1/expenses/{expense_id}/3way-match
verify_3way_matching
Semantic binding: inventory_only; mutation=False
expenses
⚡ REST API GET /expenses
expenses_page
Semantic binding: inventory_only; mutation=False
expenses
⚡ REST API GET /expenses/new
expense_create_page
Semantic binding: inventory_only; mutation=False
expenses
⚡ REST API GET /expenses/{expense_id}
expense_detail_page
Semantic binding: inventory_only; mutation=False
expenses
⚡ REST API PATCH /api/v1/expenses/{expense_id}
update_expense
Semantic binding: operator_surface; mutation=True
expenses
⚡ REST API POST /api/v1/expenses
create_expense
Semantic binding: operator_surface; mutation=True
expenses
⚡ REST API POST /api/v1/expenses/batch-approve
batch_approve_expenses
Semantic binding: operator_surface; mutation=True
expenses
⚡ REST API POST /api/v1/expenses/upload
upload_receipt
Semantic binding: operator_surface; mutation=True
expenses
⚡ REST API POST /api/v1/expenses/{expense_id}/approve
approve_expense
Semantic binding: operator_surface; mutation=True
expenses
⚡ REST API POST /api/v1/expenses/{expense_id}/assign-project
assign_project
Semantic binding: operator_surface; mutation=True
expenses
⚡ REST API POST /api/v1/expenses/{expense_id}/items
add_expense_item
Semantic binding: operator_surface; mutation=True
expenses

🛡️ Regolamentazione e conformità

Dieses Modul unterliegt folgenden gesetzlichen, regulatorischen und Revisionsstandards:

  • Capacità di verifica
  • Isolazione dei clienti (PostgreSQL RLS)