| API / APIs Radiofréquence | |
| Version ACE : 1.4 | |
|
Package : gnc_rf.c Sous-programme Basic : gnc_rf_dupli_ligne_inv_egx |
Fonctionnalité :Inventaire |
| Schémas d’entrée et de sortie : | voir en fin de document. |
Cette API permet la validation et la duplication de la ligne d’inventaire pour un second comptage par un opérateur habilité à valider les écarts. On regroupe les lignes dupliquées dans une seule mission qui sera créée lors du premier écart de comptage.
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
| RAS. |
Cas d'erreur
| Code | Description |
| 0/ ‘RFINV01003’ | The execution of the function gnc_rf_validation_ligne_inv is not successful. |
| 0/ ‘RFINV01003’ | The new inventory line is not successfully created. |
| 0/ ‘RFINV01001’ | The execution of the function gnc_numero_logis is not successful. |
| 0/ ‘RFINV01004’ | The inventory header is not found. |
Détail de l'API
Call the function gnc_rf_validation_ligne_inv, as so to validate the inventory line.
If the execution of the function is not successful, the API returns an error code 0 and an error message ‘RFINV01003’.
Read the inventory line data (LINVL table) with the input parameters (typtie, sigtie, idoi, numcompe, numligoi, numseqlig).
Read the inventory order data (LOI table) with the input parameters (typtie, sigtie, idoi).
If the input parameter ‘idoidup’ is not presented.
Call the function gnc_numero_logis, as so to receive a new IO identifier.
If the execution of the function succeed.
Create a new IO (loi) using the input IO and modifying the following fields.
(IO identifier (idoi) = the new identifier returned from the function gnc_numero_logis,
Current counting number (numcompte) = 2,
Status (statut) = ‘Creation in progress’ (2),
Creation user (uticre) = ‘GNC’,
Creation time (heucre) = current time,
Creation date (datcre) = current date,
Validation user (utival) = empty string,
Validation date = empty string,
Validation time = 0.
)
Otherwise, the API returns an error code 0 and an error message ‘RFINV01001’.
Initialize the input parameter ‘Inventory line ID’ (numligoi) with ‘1’.
Read the inventory header data (LINVE table) with the inventory order’s third-party type, third-party ID and inventory ID (LOI.typtie, loi.sigtie and loi.idinv).
If the inventory header is found.
Increase its number of inventory orders with one (LINVE.nboi).
Modify its status to ‘Validation in progress’ (LINVE.statut = ‘3’).
Otherwise.
The API returns an error code 0 and an error message ‘RFINV01004’.
Otherwise.
Modify the IO increasing its slot addresses number (loi.nbremp) with ‘1’.
If the input parameter ‘Inventory line ID’ (numligoi) is equal to ‘0’.
Search for the maximal inventory line id (numligoi) from the inventory line data (LINVL) with the input parameters (typtie, sigtie and idoidup).
Initialize the input parameter ‘Inventory line ID’ (numligoi) with the found value + ‘1’.
If the input parameter ‘Inventory line ID’ (numligoi) is bigger than ‘0’.
Create a new inventory line (LINVL) using the input inventory line and modifying the following fields.
(IO identifier (idoi) = input parameter ‘idoidup’,
Inventory line ID (numligoi) = input parameter ‘numligoi’,
Counting number (numcompte) = counting number from the newly created IO (loi.numcompte)
Status (statut) = ‘0’ (not in database),
Physical receiving accomplished flag (flgsaisie) = ‘0’,
Counting user (uticomp) = empty string,
Counting date (datcomp) = empty string,
Counting time (heucomp) = ‘0’,
Inventory quantity (qteinvent) = ‘0’,
Real quantity (qtereel) = ‘0’,
Real CU quantity (qteuntreel) = ‘0’,
Stock movement ID (idmvt) = ‘0’,
Error message code (idmsgerr) = empty string,
)
If no new inventory line is created, the API returns an error code 0 and an error message ‘RFINV01003’.
If the IO is terminated (parameter returned from the function gnc_rf_validation_ligne_inv).
Modify the status (loi.statut) of the newly created IO to ‘validated’ (‘6’).
Return the code 1.
Valeurs restituées par l’API
| Valeur | Remarque |
| En retour, l’API indique un code retour pour le traitement : il y a eu une erreur ou il n’y a pas eu d’erreur. | |
| 1 | Duplication de la ligne d’inventaire réussie. |
| 0 | Problème. |
Processus, contrôles et règles de gestion
| Nom | Description | Format | Obligatoire/Facultatif |
|---|---|---|---|
| typtie | Le type de tiers (dépôt) | Char(3) | O |
| sigtie | Le sigle du tiers | Char(12) | O |
| idoi | L’identifiant de l’ordre d’inventaire | Number | O |
| numcompte | Numéro de comptage en cours | Number | O |
| numligoi | Numéro de la ligne d’inventaire | Number | O |
| numseqlig | Numéro de séquence dans ligne | Number | O |
| idoidup | Identifiant de l’OI de recomptage | Number | N |
| Nom | Description | Format | Obligatoire/Facultatif |
|---|---|---|---|
| Retour |
Indique qu’une erreur s’est produite 0 – erreur 1 – pas d’erreur |
Number | |
| ParamOut1 |
Indique si l’OI est terminé 0 – OI non terminé 1 – OI terminé |
Number | |
| ParamOut2 | Identifiant de l’OI de recomptage | Number |