> For the complete documentation index, see [llms.txt](https://docs.openstamanager.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openstamanager.com/2.9.2/guide/esempi/fatturazione-elettronica/codice-identificativo-documento-e-cig.md).

# Codice identificativo documento e CIG

{% hint style="info" %}
Quando si vuole emettere una fattura verso le PA è necessario riportare il **CIG** e il **Codice identificativo documento**. Come inserire questi due parametri in **OpenSTAManager**?
{% endhint %}

Il primo passo è quello di specificare nella creazione di un'anagrafica la tipologia **Ente pubblico** o **Azienda**:

![](/files/-LcjPIXpO8BpR7FTdM76)

Se l'anagrafica è già stata creata basta modificarla e selezionare tipologia **Ente pubblico** o **Azienda:**

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZJeLg23eVDvrCv74U7-887967055%2Fuploads%2FppIgLUMrxwcgNmLNZNEW%2Ffile.png?alt=media)

Ora, nella creazione di un **Contratto**, è possibile compilare i campi necessari per l'emissione di una Fattura verso le PA:

![](/files/-LcUzv8nCbC7atKOrur5)

I **Dati appalto** verranno visualizzati quando si aggiunge un **Contratto** ad una **fattura di vendita,** in questo modo è possibile verificare se sono stati inseriti.

![](/files/-LcV0yRscLScwMZx8-JH)

Un' ulteriore verifica della presenza o meno dei **Dati appalto** è disponibile nell'anteprima della fattura, visualizzabile tramite il pulsante **Visualizza** in **Fatturazione elettronica:**

![](/files/-M2svV7dJuK_GLKUWmbS)

![](/files/-LcVKhRQyHJlzFWM9nSF)

Infine sono visibili nel file XML generato:

![](/files/-LcVFVpRYwG_tBmu7IE4)

{% hint style="info" %}
La logica precedentemente spiegata vale per l'inserimento di **Contratti, Ordini cliente** e **Interventi.**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.openstamanager.com/2.9.2/guide/esempi/fatturazione-elettronica/codice-identificativo-documento-e-cig.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
