Update Tiers functionality and enhance API documentation
- Changed the default value of the `$select` property in Tiers.php from `custid,custname` to `custid,name` to reflect valid column names. - Updated the tiers.blade.php view to align the placeholder for the select field with the new default value. - Enhanced the documentation for the `third_list` and `third_GetArtHistory` endpoints, detailing valid search columns, metadata, and response structures. - Added new tests in TiersPageTest.php to verify the default select value, API parameter handling, and metadata storage. - Overall, improved the user experience and API interaction for managing tiers.
This commit is contained in:
@@ -109,7 +109,7 @@ Réponse `column_list` : chaque colonne a `name`, `dataType` (C/N/T/D/L/M), `len
|
||||
| `Document_GetAttachListThumbnail` | `documentGetAttachListThumbnail(string, string)` | Lecture | Miniatures annexes | JNL, NUMBER |
|
||||
| `Document_GetPDF` | `documentGetPdf(string, string, string)` | Lecture | Génération PDF | JNL, NUMBER, LAYOUT |
|
||||
| `third_list` | `thirdList(array)` | Lecture | Liste des tiers (max 10 résultats, limite fixe serveur) | select, search (results sans effet) |
|
||||
| `third_GetArtHistory` | `thirdGetArtHistory(string)` | Lecture | Historique articles tiers | thirdid |
|
||||
| `third_GetArtHistory` | `thirdGetArtHistory(string)` | Lecture | Historique articles tiers | thirdid (minuscules obligatoires) |
|
||||
| `getserialnumber` | `getSerialNumber()` | Lecture | Numéro de série | - |
|
||||
| `codes_list` | `codesList(array)` | Lecture | Données par code | code |
|
||||
| `document_add` | `documentAdd(array)` | Écriture | Ajout d'un document | ThirdId, Date, Artid[], Qty[], Saleprice[], JNL, ... |
|
||||
@@ -124,6 +124,18 @@ Réponse `column_list` : chaque colonne a `name`, `dataType` (C/N/T/D/L/M), `len
|
||||
|
||||
**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.
|
||||
|
||||
**Particularités `third_list`** :
|
||||
- Recherche dans `name`, `groupid`, `vat` (pas dans `custid`).
|
||||
- Colonnes valides pour `select` : `custid`, `name`, `name2`, `vat`, `email`, `groupid`, `website`, `memo`, `paydelay`, `paymode`, `bankname`, `iban`, `bic`, `custtype`, `discount`.
|
||||
- La colonne `custname` n'existe PAS. Le nom est dans `name`.
|
||||
- Colonnes par défaut (sans select) : `custid`, `name`.
|
||||
|
||||
**Particularités `third_GetArtHistory`** :
|
||||
- Paramètre `thirdid` en minuscules obligatoire (`THIRDID` = erreur).
|
||||
- Retourne l'intégralité de l'historique sans limite (potentiellement des milliers d'éléments).
|
||||
- Structure : `artid`, `artname`, `jnl`, `unitprice`, `qty`, `vatid`, `vatpc`, `s_credate`.
|
||||
- ID inexistant = tableau vide sans erreur.
|
||||
|
||||
### Tables accessibles
|
||||
|
||||
art (160 col.), attach (13), barcode (12), category (10), codes (50), cust (216), docdet (82), dochead (212), docpay (22), file (17), hist (50), incodes (24), jnl (155), pers (78), price (28), stk (20)
|
||||
|
||||
Reference in New Issue
Block a user