# Logique

### Blocs conditionnels

Veuillez vous référer à la documentation [Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#if--else) pour plus d'informations sur l'utilisation des blocs conditionnels Liquid.

**Exemple 1**

Utilisez n'importe quelle variable booléenne.

```
{% if document.invoice? %}
  Invoice number: {{ document.number }}
{% elsif document.estimate? %}
  Estimate number: {{ document.number }}
{% endif %}
```

**Exemple 2**

Vous pouvez également utiliser ces blocs pour vérifier la présence d'une variable textuelle.

```
{% if document.top_text %}
  {{ document.top_text }}
{% endif %}
```

### Boucles

Veuillez vous référer à la documentation [Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#if--else) pour plus d'informations sur l'utilisation des boucles Liquid.

**Exemple**

Utilisez n'importe quelle variable de type tableau.

```
<ul>
  {% for vat_total in document.vat_totals %}
    <li>{{ vat_total.percentage }} - {{ vat_total.amount }}</li>
  {% endfor %}
</ul>
```


---

# 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://documentation.factures.com/systeme-de-themes/logique.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.
