---
title: "Invoicing"
description: "Luonnokset, kirjaus, numerointi. Jokainen sovellus on moduuli samalla tietomallilla."
canonical: "https://obop.dev/fi/apps/invoicing/"
lang: "fi"
---

# Invoicing

## Mihin se on tarkoitettu

Prepare customer invoices as drafts and post them to give each one its gapless legal number. Posting is the one step in the built-in apps that always needs a person: an agent can prepare the draft and propose the posting, and a human with the right permission approves it.

## Mitä paketti tekee ja mitä ei

Customer invoices: drafts, posting with a gapless legal number, cancellation.

## Mallit

### `invoice`

A customer invoice; posted invoices are corrected only by credit notes

Lukuryhmä: `invoicing.user`. Kirjoitusryhmä: `invoicing.user`.

| Kenttä | Tyyppi | Tietoluokka | Henkilötieto | Ryhmä | Agentit näkevät | Kuvaus |
|---|---|---|---|---|---|---|
| `sale_order_id` | ref → sale_order | `none` | ei | `invoicing.user` | selkoisena | Source sale order id |
| `state` | select (draft, posted, cancelled) | `none` | ei | `invoicing.user` | selkoisena | Lifecycle: draft, posted or cancelled |
| `total_minor` | money | `none` | ei | `invoicing.user` | selkoisena | Invoice total in minor units |
| `number` | text | `none` | ei | `invoicing.user` | selkoisena | Gapless legal number, set when posted |

## Työnkulut

### `invoice`

| Toiminto | Siirtää | Kuka voi suorittaa | Hyväksyntä |
|---|---|---|---|
| `invoice.post` | state: draft → posted | `invoicing.manager` | kyllä |
| `invoice.cancel` | state: draft → cancelled | `invoicing.user` | ei |

## Käyttöoikeusryhmät

Tämän sovelluksen käyttämät ryhmät:

- `invoicing.manager`
- `invoicing.user`

## Hyväksyntävaiheet

Vaiheet, joita agentti voi vain ehdottaa:

- `invoice.post`

## Mitä agentit voivat ja eivät voi tehdä

Agentti voi lukea, hakea, luoda ja päivittää tämän sovelluksen tietueita sekä suorittaa toiminnot, jotka eivät vaadi hyväksyntää, tunnisteensa käyttöoikeusryhmien rajoissa.

Se voi vain ehdottaa näitä vaiheita, ja ihmisen on hyväksyttävä ne: `invoice.post`, `invoice.delete`.

## Riippuvuudet

- `base`
- `sales`

## Asennus

Sisäänrakennettu. Se on käytettävissä jokaisessa instanssissa, eikä sitä voi poistaa.

## Tee oma

[Moduulioppaassa näytetään, miten tällaiset sovellukset kirjoitetaan](/fi/docs/reference/module-manifest/)
