| API / APIs Radiofréquence | |
| Version ACE : 1.3 | |
|
Package : Standard Nom de la GNC : GNC_SCE_GS_001 |
Fonctionnalité : Planification de réception |
| Schémas d’entrée et de sortie : | voir en fin de document. |
Cette API permet de valider (ou supprimer) des mouvements logistiques (entrée, transfert, …).
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
| RAS. |
Processus, contrôles et règles de gestion
| ETAPE | DESCRIPTION DU PROCESSUS |
| Cette API n’est pas adaptée aux mouvements SS et aux ajustements avec date et prix de vente. | |
| Si le champ « qteval_uc » vaut 0, le mouvement est supprimé. | |
| Pour la validation des mouvements, l’API vérifie que le mouvement à valider existe et que les EA de ce mouvement existent également. | |
| Ensuite, l’API fait appel à « gnc_valid_mvtstk_logis ». | |
| Détail |
Read the stock movement data (LMVTSTK) with the input parameters (typdep, sigdep, typmvt, sensmvt, idmvt). If the stock movement object is not found, the API raises an error message “ELT_PASTRO”. If the EA number of the stock movement object found is presented (numea != 0) and the stock movement type of the stock movement object found is ‘input’ (typmvt = ‘E’). Read the EA header data (LEAE) with the input parameters (typdep, sigdep) and EA number equals to the EA number of the stock movement object found (lmvtstk.numea). If the EA header object is not found, the API raises an error message “ELT_PASTRO”. Read the EA type data (LTEA) with the input parameters (typdep, sigdep) and EA type equals to the EA type of the EA header object found (leae.typea). If the EA type object is not found, the API raises the error message “ELT_PASTRO”. If the stock movement type is ‘output’ (typmvt = ‘S’) or ‘grouping’ (typmvt = ‘Z’). Read the product data (PRO) for the product of the stock movement object (lmvtstk.codpro). If the product object is not found, the API returns the error code 0 and the error message “ELT_PASTRO”. Call the function gnc_poivar_produit as so to verify whether the product is managed by a variable weight. If the function succeeds. If the stock movement real weight is less than or equal to 0 (lmvtstk.poidsreel <= 0), the API returns the error code 0 and the error message “L_POIDSVAR”. Call the function gnc_contr_objet_stock, as so to control the stock movement object. If the function does not succeed, the API returns an error code 0. If the stock movement type is equal to ‘output’ (typmvt = ‘S’) and the input lot reference is presented (reflot != ‘’) and the input validation quantity of CU is great than 0 (qteval_uc > 0). Read the lot data (OST) with the stock movement product (codpro) and the input lot reference (reflot). If the lot object is not found, the API returns the error code 0 and the error message “ELT_PASTRO”. Initialize the structure (val) needed for the validation of the movement. (val.qteval_uc = the input parameter, val.majol = 0, val.codmag = "", val.codemp = "", val.majrec = 0, val.type = 0, val.param = "", val.prxvte = 0.0, val.unifac = "", val.datmvt = "", val.heumvt = 0.0, If the stock movement type is equal to ‘output’ (typmvt = ‘S’) Val.majol = 1, If the input lot reference is presented (reflot != “”) Val.type = 1, val.param = ost.numlot (lot number), If the stock movement type is equal to ‘output’ (typmvt = ‘S’) and the input validation quantity of CU is great than 0 (qteval_uc > 0) If the parcel stock movement ID is presented (lmvtstk.idobjcol!=””) Read the depot data (LDEP) with the input parameters (typdep, sygdep). If the depot object is not found, the API returns the error code 0 and the error message “ELT_PASTRO”. Val.codmag = ldep.magvir (virtual store), Val.codemp = ldep.magvir (virtual store), If the depot virtual store is not presented (ldep.magvir = “”) or the parcel stock movement ID is not presented (idobjcol = ””) Call the function gnc_sce_prepa_depose as so to find a deposit store and slot address (codemag – store code, codemp – slot address code) Val.codmag = codmag (found from the function gnc_sce_prepa_depose), Val.codemp = codemp (found from the function gnc_sce_prepa_depose) If the slot address code is not presented (codemp = “”), the API returns the error code 0 and the error message “L_DEST_INC”. If the stock movement type is equal to ‘output’ (typmvt = ‘S’) Call the function gnc_sce_prepa_traite_depose as so to execute a transfer to the deposit store. If the function does not succeed, the API returns an error code 0. If the stock movement EA number is presented (numea != 0) and the stock movement type is equal to ‘input’ (typmvt = ‘E’) Val.dispo = ltea.dispoobj (stock availability) Otherwise. Val.dispo = 0.) Call the function gnc_valid_mvtstk with the stock movement object and initialized val structure, as so to validate/delete the stock movement object. If the function does not succeed, the API returns an error code 0. If the stock movement type is equal to ‘input’ (typmvt = ‘E’). Update the control flag of the reception line. (Read the reception line date (LREL) corresponding to the stock movement object (typtie, sigtie, numrec, numligrec). If the reception line object is not found, the API returns the error code 0 the error message “ERR_ACCES”. Read the sum of the reception quantity (sum (qterec)) of the reception details data (lred) with (typtie= lobjstk.typtie, sigtie=lobjstk.sigtie, numrec=lobjstk.numrec, numea=lrel.numea, numligea=lrel.numligea, numligrec =lmvtstk.numligrec). If the quantity declared in the reception line object (lrel.qtedec) is equal to the reception quantity sum of the reception details data (lred). Set the control flag of the reception line object to 1 (lrel.flgcontrol = 1). Otherwise. Set the control flag of the reception line object to 2 (lrel.flgcontrol = 2).) If the update of the control flag of the reception line does not succeed, the API returns the error code 0 the error message “ERR_MODIF”. |
| CODE | PARAMÈTRES | DESCRIPTION |
|---|---|---|
| ELT_PASTRO | LMVTSTK, idmvt | The stock movement object is not found. (message) |
| ELT_PASTRO | LEAE, numea | The EA header object is not found. (message) |
| ELT_PASTRO | LTEA | The EA type object is not found. (message) |
| 0 / ELT_PASTRO | PRO | The product object is not found. |
| 0 / L_POIDSVAR | codpro | The stock movement real weight is less than 0. |
| 0 | The function gnc_contr_objet_stock does not succeed. | |
| 0 / ELT_PASTRO | OST, codpro, reflot | The lot object is not found. |
| 0 / ELT_PASTRO | LDEP, typtie, sigtie | The depot object is not found. |
| 0 / L_DEST_INC | idobjcol | The deposit slot address is not found. |
| 0 | The function gnc_sce_prepa_traite_depose does not succeed. | |
| 0 | The function gnc_valid_mvtstk does not succeed. | |
| 0 / ERR_ACCES | LREL, typtie, sigtie, numrec, numligrec | The reception line object does not found. |
| 0 / ERR_MODIF | LREL, typtie, sigtie, numrec, numligrec | The update of the reception line does not succeed. |
| NOM | DESCRIPTION | FORMAT | OBLIGATOIRE/FACULTATIF |
|---|---|---|---|
| typdep | Type dépôt | Char(3) | O |
| sigdep | Sigle dépôt | Char(12) | O |
| typmvt | Type mouvement | Char(1) | O |
| sensmvt | Sens mouvement | Char(1) | O |
| idmvt | N° mouvement | Long | O |
| qteval_uc | Quantité à valider en unités (si = 0, le mouvement est supprimé). | Long | O |
| reflot | Lot reference. | Char(30) | N |
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | REMARQUE |
| Aucun. |