API RF VALID_COMP

  Version ACE : 5.0-00

Package : Standard

Sous-programme Basic : Validation_Comptage

Nom de la gnc : gnc_rf_valid_comptage

Fonctionnalité : Inventaire
Schémas d’entrée et de sortie : voir en fin de document.

Cette API permet de valider le comptage d’un Ordre d’Inventaire (OI).

API imbriquées : aucune.

Contraintes et limites de fonctionnement (hors périmètre)

RAS.

Paramétrage (PPE)

LINV01 -

Prototype de la fonction Basic

Validation_Comptage (idoi, p_statut)

Messages en entrée

VALID_COMP~idoi~

Messages en sortie

Retour~statut~

Valeurs restituées par l’API

Valeur Remarque
1 OK
0 The inventory order has an incorrect status (LOI .statut) .

Processus, contrôles et règles de gestion

Etape description du Processus
1 Validation du comptage d’un Ordre d’Inventaire
Détail :

Read the depot (TIE table) for the operator.

Read the inventory order data (LOI table) with the idoi input parameter.

If the inventory order status is not ‘been completed’ (loi.statut != ‘2’) or ‘been validated’ (loi.statut != ‘3’) or ‘affected’ (loi.statut != ‘5’).

The API copies the inventory order status (loi.statut) in the ParamOut1 output parameter and returns the error code 0.

Read the inventory mode data (LMODINV table) with (modinv = loi.modinv).

If the inventory mode is found and the parameter ‘LINV01’ is active.

Controls whether the validation of the counting is deferred. (Read the inventory mode parameterized field referred by the ‘LINV01’ parameter field ‘N3’.)

If the validation of the counting is not deferred (collected value from the ‘N3’ parameter field != ‘N’).

Call the function gnc_logis_oi_valider_comptage, as so to validate the counting.

Otherwise.

Modify the user ID for the counting with the current user ID (loi.uticomp = gen.uti_cod).

The API copies the inventory order status (loi.statut) in the ParamOut1.

Exemple(s) d’utilisation

W_ret = Validation_Comptage (idoi, statut)

Paramètres en entrée

Nom du paramètre type format taille obl O/N Remarque
idoi CHAR   10 O Identifiant Ordre Inventaire

Paramètres en sortie

Nom du paramètre type format taille Remarque
ParamOut1 CHAR   1 Statut Ordre Inventaire