# 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**:

![](https://3649373145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UBYFzZ0uSbNRXL14nao%2Fuploads%2FFoxLDXkjwNTs2mducbCN%2FAnagraficaPerCIG.png?alt=media)

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:

![](https://3649373145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UBYFzZ0uSbNRXL14nao%2Fuploads%2FBCLDQjhPFzRm93oQmmtF%2FDatiAppalto.png?alt=media)

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

![](https://3649373145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UBYFzZ0uSbNRXL14nao%2Fuploads%2FiiumeyrHIsOmC79D4IRs%2FAggiuntoFattureDiVendita.png?alt=media)

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

![](https://3649373145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UBYFzZ0uSbNRXL14nao%2Fuploads%2FDSKK4wEUxpjuiGx7tapJ%2Fimage.png?alt=media)

![](https://3649373145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UBYFzZ0uSbNRXL14nao%2Fuploads%2FHiAV20rYGfzDKAM33Mvd%2FVisualizzaCIGeCodiceIdentificavoDocumento.png?alt=media)

Infine sono visibili nel file XML generato:

![](https://3649373145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UBYFzZ0uSbNRXL14nao%2Fuploads%2FP2TJMG9hDEVqgFMgg14C%2FCIGeCodiceIdentificativoDocumentoXML.png?alt=media)

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


---

# Agent Instructions: 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.4.41/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.
