API RF ED_BL

  Version ACE : 5.0-00

Package : Standard

Sous-programme Basic : Edition_BL

Nom de la gnc : gnc_rf_ed_trn

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

Cette API permet d’expédier automatiquement les bons de livraison (BL) de la tournée et de lancer l’édition directe correspondante.

API imbriquées : aucune.

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

RAS.

Paramétrage (PPE)

LOPTEX -

Prototype de la fonction Basic

Edition_BL (sigdep, idtrn, sigliv)

Messages en entrée

ED_BL~DEP~sigdep~idtrn~sigliv~

Messages en sortie

Aucun.

Valeurs restituées par l’API

VALEUR REMARQUE
1 Déroulement correct : les BL ont été expédiés et l’édition directe a été lancée.
2 Problème de validation de l’expédition automatique.
3 Problème d’édition des bons de livraison.

Processus, contrôles et règles de gestion

ETAPE DESCRIPTION DU PROCESSUS
1 Lancement de l’expédition automatique.
2 Lancement de l’édition directe des BL.
Détail :

Save the current function code (gen.fct_cod).

Set the current function code to ‘LTRN’ (gen.fct_cod = ‘LTRN’).

If the parameter ‘LOPTEX’ is active and the value of the parameter field N1 is greater than 0.

Read the expedition round data (LTRN table) with the input parameters (typdep, sigdep, idtrn).

If the expedition round does not exist.

Restore the current function code.

The API returns an error code 2.

Read the expedition round status.(Read the parameterized field from the expedition round (LTRN table) referred by the ‘LOPTEX’ parameter field N1 .)

If the expedition round status is ‘p artial tour’ ( the parameterized field has ‘O’ value ) .

Restore the current function code.

The API returns an error code 2.

Call the function gnc_exp_auto, as so to execute an automatic expedition for the tour.

If the execution of the function does not succeed.

Restore the current function code.

The API returns an error code 2.

Otherwise

Call the function gnc_ed_directe_logis, as so to execute the direct edition for the delivery notes.

Restore the current function code.

If the execution of the function gnc_ed_directe_logis does not succeed. the API returns an error code 3.

Erreurs possibles

CODE DESCRIPTION
2 The expedition round does not exist.
2 The expedition round has a ‘partial tour’ status .
2 The execution of the function gnc_exp_auto is not successful.
3 The execution of the function gnc_ed_directe_logis is not successful.

Exemple(s) d’utilisation

Retour_Edition_BL = Edition_BL (w_sigdep, idtrn, "")

Paramètres en entrée

NOM DU PARAMÈTRE TYPE FORMAT TAILLE OBL O/N REMARQUE
typdep CHAR   3 O Type du dépôt.
sigdep CHAR   12 O Sigle du dépôt.
idtrn CHAR   7 O Identifiant de la tournée.
sigliv CHAR   12 N Sigle du tiers livré.