Centurio Süsteem- & modulidokumendid
🏛️ Platvorm arhitektuur 🔑 Login
🏠 Kõik moodulid / sales_billing / Pakkumised, arved ja võlausaldajad (finans)
💶

Pakkumised, arved ja võlausaldajad (finans)

finance sales_billing 🛡️ RLS Protected

Eelmine ja lõppne müügivoog: arvutamine, pakkumiste vastuvõtmine, projekti ümberkujundamine, arve ja hoiatused.

Fachliche Bestimmung: Eesmärk on saada ja müüa pakkumisi, mida saab arvutada ja saata. Kui pakkumised on vastu võetud, kaskadiseerub see automaatselt projekt ja tööriigi tellimus ja ostmine (streke või BTO).

⚡ Töövoogud ja elutsüklid

Töövoogu kaskad quote_to_cash_cascade

Kogu töökoht on seotud töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töötasu, töö

stateDiagram-v2 [*] --> DRAFT: Angebot anlegen DRAFT --> SENT: Versenden an Kunden SENT --> ACCEPTED: Kunde bestätigt Angebot ACCEPTED --> CONVERTED: convert_to_project() state CONVERTED { direction LR WorkOrder: Arbeitsauftrag Dropship: Streckenbestellung BTO: Einkaufslager } CONVERTED --> INVOICED: Rechnung erstellen (ZUGFeRD/DATEV) INVOICED --> PAID: Zahlungseingang (SEPA/Bank) PAID --> [*]
1. DRAFT
Eelnõu
Positsioonide, allahindluste, maksete eesmärkide ja tarne aadresside kogumine.
Aktionen: Hinnad
2. SENT
Lähetatud
PDF-genereerimine ja saatmine klientidele e-posti või portaali teel.
Aktionen: Valitsuse tähtaeg
3. ACCEPTED
Võtmine
klient võtab vastu pakkumine (internetis või ERP-s).
Aktionen: konverteer_to_project
4. CONVERTED
Kaskadir
Tööordide automaatset tekkimist, tellimist või materjali reservatsiooni.
Aktionen: saateleht / arve lahti lülitamine
5. INVOICED
Kasutatav
Maksusüsteemi koostamine väljaminev arve (PDF/A-3, ZUGFeRD).
Aktionen: DATEV-i arvestuslik staabel

Kasutaja käsk: arveldusagent plan:command_billing_agent

Kontrollitud püsivkava (durable_plan), algus: manuell_command.

1. billing_agent
billing_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: billing_agent

Kasutaja käsk: billing general agent plan:command_billing_general_agent

Kontrollitud püsivkava (durable_plan), algus: manuell_command.

1. billing_general_agent
billing_general_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: billing_general_agent

Kasutaja käsk: dunning agent plan:command_dunning_agent

Kontrollitud püsivkava (durable_plan), algus: manuell_command.

1. dunning_agent
dunning_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: dunning_agent

arve saadetud plan:invoice_lifecycle

Kontrollitud kestvusplaan (durable_plan), algus: domain_event.

1. payment_matching_agent
payment_matching_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: payment_matching_agent
2. dunning_agent
dunning_agent
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aktionen: dunning_agent

Ülemtöö status:extra_work

Üldne kontrollisüsteem (ainult jälgitav) - ülekanded ei ole nõutavad <unk>vt teenindusvalideerimine.

1. detected
tuvastatud
Töötasu masinatest <unk>detected<unk>
2. accepted
vastuvõetud
Töötasu masinatest
3. rejected
Vastutatud
Status <unk>neetud <unk> state machine
4. quoted
muudetud
Status <unk>quoted<unk> state machine töötamine
5. invoiced
arveldus
Töötasu on üle töötasu.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - status:invoice

Üldne kontrollisüsteem (ainult jälgitav) - ülekanded ei ole nõutavad <unk>vt teenindusvalideerimine.

1. draft
e)
Status <unk>draft <unk> state machine arve.
2. proforma
proforma
Masinilise seisundisüsteemi seisund <unk>proforma<unk> arve.
3. issued
välja antud
Status <unk>issued<unk> state machine arve.
4. sent
saadetud
Masinilise seisundisüsteemi seisund <unk>sent<unk> arve.
5. partially_paid
partially_paid
Status <unk>partially_paid<unk> state-of-the-art masin arve.
6. paid
makstud
Status <unk>paid<unk> state machine arve.
7. overdue
hilinemine
Masinide seisund <unk> üleval <unk> GT11_0__.
8. cancelled
tühistatud
Status <unk>neetud <unk> state machine arve.

Peppoli ülekanne status:peppol_transmission

Üldne kontrollisüsteem (ainult jälgitav) - ülekanded ei ole nõutavad <unk>vt teenindusvalideerimine.

1. draft
e)
Peppol-Ühendamise seisund
2. queued
järjekordne
Peppol-Ühendamise seisund
3. transmitting
edastav
Peppol-Ühendus
4. delivered
Toomine
Peppol-Ühendus
5. rejected
Vastutatud
Peppol-Ülekande seadme seisund
6. failed
ebaõnnestunud
Peppol-Ühendamise seisund

🗄️ Andme mudelid & väljad

InvoiceItems invoice_items RLS Aktiv
34 Kärgid / varud

Tabelle invoice_items

Feldname Andme tüüp Kohustus Schlüssel Tööandjapidamis
invoice_id UUID Ja * FK ➔ invoices.id Feld invoice_id
position INTEGER Ja * - Feld position
line_type VARCHAR(48) Ja * - Feld line_type
product_id UUID Nein FK ➔ products.id Feld product_id
project_id UUID Nein FK ➔ projects.id Feld project_id
work_order_id UUID Nein FK ➔ work_orders.id Feld work_order_id
accounting_category_id UUID Nein FK ➔ accounting_categories.id Feld accounting_category_id
cost_type_id UUID Nein FK ➔ cost_types.id Feld cost_type_id
cost_center VARCHAR(64) Nein - Feld cost_center
cost_object VARCHAR(64) Nein - Feld cost_object
description TEXT Ja * - Feld description
quantity NUMERIC(14, 4) Ja * - Feld quantity
unit VARCHAR(16) Ja * - Feld unit
unit_price NUMERIC(14, 2) Ja * - Feld unit_price
discount_percent NUMERIC(5, 2) Ja * - Feld discount_percent
tax_rate NUMERIC(6, 4) Ja * - Feld tax_rate
tax_regime VARCHAR(32) Ja * - Feld tax_regime
purchase_price NUMERIC(14, 2) Nein - Feld purchase_price
margin_amount NUMERIC(14, 2) Nein - Feld margin_amount
margin_tax_amount NUMERIC(14, 2) Nein - Feld margin_tax_amount
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
source_work_log_id UUID Nein FK ➔ work_logs.id Feld source_work_log_id
source_expense_item_id UUID Nein FK ➔ expense_items.id Feld source_expense_item_id
tracking_entries JSONB Ja * - Feld tracking_entries
deducted_invoice_id UUID Nein FK ➔ invoices.id Feld deducted_invoice_id
purchase_item_id UUID Nein FK ➔ purchase_items.id Feld purchase_item_id
source_invoice_item_id UUID Nein FK ➔ invoice_items.id Feld source_invoice_item_id
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
Invoices invoices RLS Aktiv
65 Kärgid / varud

Tabelle invoices

Feldname Andme tüüp Kohustus Schlüssel Tööandjapidamis
invoice_type VARCHAR(48) Ja * - Feld invoice_type
invoice_subtype VARCHAR(48) Ja * - Feld invoice_subtype
invoice_number VARCHAR(64) Ja * - Feld invoice_number
customer_id UUID Nein FK ➔ customers.id Feld customer_id
bill_to_customer_id UUID Nein FK ➔ customers.id Feld bill_to_customer_id
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
accounting_category_id UUID Nein FK ➔ accounting_categories.id Feld accounting_category_id
cost_type_id UUID Nein FK ➔ cost_types.id Feld cost_type_id
cost_center VARCHAR(64) Nein - Feld cost_center
cost_object VARCHAR(64) Nein - Feld cost_object
original_invoice_id UUID Nein FK ➔ invoices.id Feld original_invoice_id
quote_id UUID Nein FK ➔ quotes.id Feld quote_id
purchase_id UUID Nein FK ➔ purchases.id Feld purchase_id
goods_receipt_id UUID Nein FK ➔ goods_receipts.id Feld goods_receipt_id
contract_id UUID Nein - Feld contract_id
document_id UUID Nein FK ➔ documents.id Feld document_id
issue_date DATE Nein - Feld issue_date
due_date DATE Nein - Feld due_date
sent_at DATETIME Nein - Feld sent_at
payment_terms VARCHAR(128) Nein - Feld payment_terms
payment_term_code VARCHAR(32) Nein - Feld payment_term_code
notes TEXT Nein - Feld notes
reference VARCHAR(128) Nein - Feld reference
delivery_date DATE Nein - Feld delivery_date
currency VARCHAR(3) Ja * - Feld currency
subtotal NUMERIC(14, 2) Ja * - Feld subtotal
discount_total NUMERIC(14, 2) Ja * - Feld discount_total
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
paid_amount NUMERIC(14, 2) Ja * - Feld paid_amount
residual_amount NUMERIC(14, 2) Ja * - Feld residual_amount
skonto_days INTEGER Nein - Feld skonto_days
skonto_percent NUMERIC(5, 2) Nein - Feld skonto_percent
skonto_date DATE Nein - Feld skonto_date
skonto_amount NUMERIC(14, 2) Nein - Feld skonto_amount
tax_breakdown JSONB Nein - Feld tax_breakdown
tax_exemption_reason VARCHAR(255) Nein - Feld tax_exemption_reason
dunning_level INTEGER Ja * - Feld dunning_level
dunning_date DATE Nein - Feld dunning_date
dunning_fee NUMERIC(14, 2) Ja * - Feld dunning_fee
bank_name VARCHAR(255) Nein - Feld bank_name
iban VARCHAR(50) Nein - Feld iban
bic VARCHAR(20) Nein - Feld bic
billing_mode VARCHAR(48) Ja * - Feld billing_mode
cumulative_sequence INTEGER Nein - Feld cumulative_sequence
previous_invoices_net NUMERIC(14, 2) Ja * - Feld previous_invoices_net
total_performance_net NUMERIC(14, 2) Ja * - Feld total_performance_net
retention_rate NUMERIC(5, 2) Ja * - Feld retention_rate
retention_amount NUMERIC(14, 2) Ja * - Feld retention_amount
measurement_id UUID Nein FK ➔ project_measurements.id Feld measurement_id
status VARCHAR(48) Ja * - Feld status
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

🔌 Algsed punktid (UI ja API)

Art Teadus Lõpppunkt / tee Titel & Zweck Õigustamine
⚡ REST API DELETE /api/v1/invoices/{invoice_id}
delete_invoice
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API DELETE /api/v1/invoices/{invoice_id}/items/{item_id:uuid}
delete_invoice_item
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API DELETE /api/v1/pricelists/{pricelist_id}/items/{item_id}
delete_item
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API GET /api/v1/invoices
list_invoices
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/invoices/{invoice_id}
get_invoice
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/invoices/{invoice_id}/credit-remaining
get_credit_remaining
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/invoices/{invoice_id}/delivery-note.pdf
get_invoice_delivery_note
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/invoices/{invoice_id}/html
get_invoice_html
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/invoices/{invoice_id}/payments
list_invoice_payments
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/invoices/{invoice_id}/pdf
get_invoice_pdf
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/invoices/{invoice_id}/zugferd-xml
get_zugferd_xml
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/peppol/invoices/{invoice_id}/ubl
get_invoice_peppol_ubl
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/peppol/lookup
lookup_peppol_recipient
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/peppol/schemes
list_peppol_schemes
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/peppol/transmissions
list_peppol_transmissions
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/peppol/transmissions/{transmission_id}
get_peppol_transmission
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/pricelists
list_pricelists
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/pricelists/{pricelist_id}/items
list_items
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /api/v1/pricelists/{pricelist_id}/resolve
resolve_price
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /invoices
invoices_page
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /invoices/new
invoice_create_page
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /invoices/{invoice_id}
invoice_detail_page
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /portal/{slug}/rechnungen
invoices_page
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /portal/{slug}/rechnungen/{invoice_id}/pdf
invoice_pdf_download
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /pricelists
pricelists_page
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /pricelists/new
pricelists_new_page
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API GET /pricelists/{pricelist_id}/edit
pricelists_edit_page
Semantic binding: not_evaluated; mutation=False
invoices
⚡ REST API PATCH /api/v1/invoices/{invoice_id}
update_invoice
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API PATCH /api/v1/invoices/{invoice_id}/items/reorder
reorder_invoice_items
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API PATCH /api/v1/invoices/{invoice_id}/items/{item_id:uuid}
update_invoice_item
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API PATCH /api/v1/pricelists/{pricelist_id}
update_pricelist
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices
create_invoice
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/collective-credit-note
create_collective_credit_note
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/final-from-partials
create_final_invoice_from_partials
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/from-work-order/{work_order_id}
create_invoice_from_work_order
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/convert-final
convert_to_final_invoice
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/convert-proforma
convert_to_proforma
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/credit-note
create_credit_note
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/dunning
escalate_invoice_dunning
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/escalate-ticket
escalate_invoice_to_ticket
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/issue
issue_invoice
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/items
add_invoice_item
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/partial-credit-note
create_partial_credit_note
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/payments
register_invoice_payment
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/send
send_invoice
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/invoices/{invoice_id}/stock-issue
create_invoice_stock_issue
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/peppol/invoices/{invoice_id}/transmit
transmit_invoice_via_peppol
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/pricelists
create_pricelist
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /api/v1/pricelists/{pricelist_id}/items
add_item
Semantic binding: not_evaluated; mutation=True
invoices
⚡ REST API POST /portal/{slug}/rechnungen/{invoice_id}/gutschrift-anfordern
credit_note_request
Semantic binding: not_evaluated; mutation=True
invoices
🖥️ WEB-UI GET /quotes
Pakkumiste ülevaade
Loetelu kõigi pakkumistega, millel on statusfilter ja -märk
quotes:read
⚡ REST API POST /api/v1/quotes/{id}/convert-to-workorder
Töötlus
Kaskadiritud võeti pakkumine
quotes:write

🛡️ Määruse ja vastavus

Dieses Modul unterliegt folgenden gesetzlichen, regulatorischen und Revisionsstandards:

  • GoBD (ajakohastatud numbrimine, muutmatavus)
  • UStG § 14 (tunnustatud andmed)
  • ZUGFeRD 2.2 / XRechnung (PEPPOL)
Sisse ühendatud moodulid:
➔ dropship ➔ customers ➔ workorders ➔ purchasing ➔ accounting