| API / APIs Radiofréquence | |
| Version ACE : 1.3 | |
|
Package : Standard Nom de la gnc : gnc_sce_gs_004 |
Fonctionnalité : Planification de récéption |
| Schémas d’entrée et de sortie : | voir en fin de document. |
Cette API permet d’effectuer un ajustement sur objet de stock.
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
Processus, contrôles et règles de gestion
| ETAPE | DESCRIPTION DU PROCESSUS |
| L’API vérifie tout d’abord que l’objet existe. | |
| Si le code mouvement n’est pas donné, alors l’API utilise les zones « A1 » ou « A2 » du paramètre LOGAJU. | |
| Après avoir généré le mouvement d’ajustement, l’API met à jour l’origine du mouvement. | |
| Le paramètre LOGDEP permet d’ajouter le dépôt logique dans une zone paramétrée du mouvement. | |
| A la fin du traitement, le mouvement est validé. | |
| Détail : |
Read the stock object data (LOBJSTK table) with the input parameters (typdep, sigdep, idobj). If the stock object does not exist, the API returns an error message ‘ELT_PASTR’ and an error code 0. Calculate the difference (qteunt – lobjstk.qteunt). If the difference is greater than 0, the direction of movement is specified as entry (‘E’), Otherwise the direction of movement is specified as output (‘S’). Determinate the movement code. If the input parameter movement code (lcodmvt) is not provided. If the parameter ‘LOGAJU’ is active and the value of the parameter field A1 is not empty and the direction of movement is specified as entry (sensmvt=’E’). Copy the value of the parameter field A1 into the input parameter movement code (lcodmvt). Otherwise, if the parameter ‘LOGAJU’ is active and the value of the parameter field A2 is not empty and the direction of movement is specified as outgoing (sensmvt=’S’). Copy the value of the parameter field A2 into the input parameter movement code (lcodmvt). If the input parameter movement code (lcodmvt) is empty. If the direction of movement is specified as entry (sensmvt=’E’). Copy the value ‘EA’ into the movement code (lcodmvt). Otherwise, if the direction of movement is specified as outgoing (sensmvt=’s). Copy the value ‘SA’ into the movement code (lcodmvt). Call the API gnc_gener_mvt_ajust_xa to generate the movement of adjustment. If the execution of the function is not successful, the API returns an error code 0. Read the reception header data (LREE table) to verify the status of the reception with the input parameters (typdep, sigdep) and the created adjustment movement’s reception number (lmvtstk.numrec). If the corresponding data does not exist, the API returns an error message ‘ELT_PASTRO’ and an error code 0. Change the origin of the movement. If the input parameter mode value is ‘R’ and the reception header is not in status ‘closed’ (lree.statut < 8). Modify the origin of the movement (lmvtstk,orimvt=’4’). If the modification does not succeed, the API returns an error message ‘ERR_MODIF’ and an error code 0. If the ppe LOGDEP is active and the value of the parameter field N1 is provided and the value of the input parameter deplog is not empty. Store the logical depot input parameter (deplog) in the created adjustment movement’s (lmvtstk) parameterized field referred by LOGDEP.N1. If the modification does not succeed, the API returns an error message ‘ERR_MODIF’ and an error code 0. Call function gnc_valid_mvtstk to validate the adjustment movement. If the execution of the function is not successful, the API returns an error code 0. Return the code 1. |
| CODE | PARAMÈTRES | DESCRIPTION |
|---|---|---|
| 0 | Generation of the movement adjustment is not successful. | |
| 0/ ELT_PASTRO | LOBJSTK | The logistic stock object does not exist. |
| 0/ ELT_PASTRO | LREE | The corresponding reception header data does not exist. |
| 0/ERR_MODIF | LMVTSTK | The origin of the movement was not modified. |
| 0 | Movement is not validated. | |
| 0/ERR_MODIF | LMVTSTK | The movement was not modified. |
| NOM | DESCRIPTION | FORMAT | OBLIGATOIRE/FACULTATIF |
|---|---|---|---|
| typdep | Type dépôt | Char(3) | O |
| sigdep | Sigle dépôt | Char(12) | O |
| idobj | Id. objet | Char(18) | O |
| qteunt | Nouvelle qté en unités | Long | O |
| lcodmvt | Code mouvement | Char(2) | N |
| mode | Mode : R : réception non clôturée | Char(1) | O |
| deplog | Dépôt logique | Char(12) | N |
| unifac | Unité de facturation | Char(3) | N |
| prxvte | Prix de vente | Double | N |
| datmvt | Date mouvement | Char(8) | N |
| heumvt | Heure mouvement | Double | N |
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | REMARQUE |
| Aucun. |