Enhance Documents page functionality and update API documentation

- Added a new `$results` property to the Documents page to allow users to specify the maximum number of results returned by the `document_list` endpoint, defaulting to ~108.
- Updated the `searchDocuments` method to include the `results` parameter in API requests, ensuring it is sent as a string.
- Modified the documents.blade.php view to include an input field for the `results` parameter, with appropriate placeholder text and guidance.
- Improved the documentation for the `document_list` endpoint to clarify the behavior of the `results` parameter and its interaction with `thirdid`.
- Updated the `Document_GetPDF` section to reflect its functionality and correct usage of the `LAYOUT` parameter.
- Added a new test to verify that the `results` parameter is correctly sent to the API.
- Overall, enhanced the user experience and API interaction for document management.
This commit is contained in:
2026-02-23 11:24:57 +01:00
parent 0ab94fdb91
commit dfe20e79d7
10 changed files with 461 additions and 152 deletions

View File

@@ -101,7 +101,7 @@ Réponse `column_list` : chaque colonne a `name`, `dataType` (C/N/T/D/L/M), `len
| `art_list` | `artList(array)` | Lecture | Liste d'articles (max 5 résultats, limite fixe serveur) | select, search, barcode (results sans effet) |
| `art_getstk` | `artGetStock(string)` | Lecture | Stock d'un article | ARTID |
| `jnl_list` | `jnlList(array)` | Lecture | Liste des journaux | select, results, TYPE |
| `document_list` | `documentList(array)` | Lecture | Liste des documents | select, thirdid |
| `document_list` | `documentList(array)` | Lecture | Liste des documents | select, thirdid, results (fonctionne, défaut ~108) |
| `document_detail` | `documentDetail(string, string)` | Lecture | Détail d'un document | jnl, number |
| `Document_GetStatusList` | `documentGetStatusList(string)` | Lecture | Statuts d'un journal | jnl |
| `Document_GetUnitPriceAndVat` | `documentGetUnitPriceAndVat(array)` | Lecture | Prix et TVA | ARTID, QTY, JNL, THIRDID, DATE |
@@ -116,7 +116,13 @@ Réponse `column_list` : chaque colonne a `name`, `dataType` (C/N/T/D/L/M), `len
| `document_mod` | `documentMod(array)` | Écriture | Modification d'un document | number, Thirdid, Artid[], Qty[], Saleprice[], JNL, ... |
| `custom_geninv_updatestock` | `customGeninvUpdatestock(array)` | Écriture | Mise à jour inventaire | ARTID, STKID, QTY, ... |
**Endpoints non fonctionnels** : `Document_GetPDF` (paramètre LAYOUT inconnu), `custom_geninv_updatestock` (paramètre STKID inconnu, signification de TOCHECK/TOCHECKDETAIL/MODE à clarifier).
**Endpoints partiellement fonctionnels** : `Document_GetPDF` (LAYOUT doit être une valeur numérique en string, ex: `"1"`. Les valeurs textuelles provoquent une erreur. Retourne le PDF en base64).
**Endpoints non fonctionnels** : `custom_geninv_updatestock` (paramètre STKID inconnu, signification de TOCHECK/TOCHECKDETAIL/MODE à clarifier).
**Format de date** : Tous les endpoints acceptant une date (DATE, date) exigent le format `YYYY-MM-DD`. Tout autre format retourne HTTP 400.
**Codes de délai de paiement** : Les valeurs valides pour `paydelay` (Document_GetDueDate) proviennent de `codes_list` avec `code=PAYDELAY`. Codes courants : `30`, `30F`, `45F`, `50`, `60`, `60F`, `75F`, `90`, `90F`, `0F`. Le suffixe `F` = fin de mois.
### Tables accessibles