L’action interne « CPT-CCO » permet de créer, modifier, dupliquer et supprimer des comptes de comptabilité générale.
Initialisation de la liste WFEntAct :
|
Nom |
T |
Désignation |
O |
Commentaire |
|
Action |
C |
Action à exécuter |
o |
INI, CRE, MOD, DUP ou SUP |
|
EntTEn |
C |
Entité |
o |
Doit contenir CCO |
|
ActCle |
C |
Clé |
o |
Clé pour lien avec WfEntVar |
|
EntCl1 |
C |
Clé 1 Entité |
o |
Société Comptable |
|
EntCl2 |
C |
Clé 2 Entité |
o |
Compte Comptable |
|
DupCl1 |
C |
Clé 1 Entité à Dupliquer |
f |
Société Comptable à Dupliquer si Action contient DUP |
|
DupCl2 |
C |
Clé 2 Entité à Dupliquer |
f |
Compte Comptable à Dupliquer si Action contient DUP |
Initialisation de la liste WFEntVar (pour CRE ou MOD) :
Pour chacune des variables (sauf les clés) définissant un compte comptable, il faut créer un élément dans la liste WFEntVar tel que :
|
Nom |
T |
Désignation |
O |
Commentaire |
|
ActCle |
C |
Clé |
o |
Clé pour lien avec WfEntAct |
|
EntVar |
C |
Nom de la variable |
|
Nom de la variable |
|
EntVaC |
C |
Valeur Alphanumérique |
|
Valeur de la variable si elle est de type alphanumérique |
|
EntVaN |
N |
Valeur Numérique |
|
Valeur de la variable si elle est de type numérique |
|
EntVaL |
L |
Valeur Logique |
|
Valeur de la variable si elle est de type logique |
Exemple :
VLO.Action = SCR.EntAct
VLO.SocCpt = SCR.RefSocCpt
VLO.SocDup = VCR.Societe
VLO.CptNum = SCR.CptGenNum
VLO.CptDup = VCR.NumEvt
SI VLO.Action = CLO."DUP" OU VLO.Action = CLO."INI"
CREATION Liste WfEntAct :
PRENDRE WfEntAct Action = CLO."INI"
PRENDRE WfEntAct ActCle = VLO.SocCpt + VLO.CptNum
PRENDRE WfEntAct ActRes = CGL.VIDE
PRENDRE WfEntAct ActErr = CGL.VIDE
PRENDRE WfEntAct EntTEn = CLO."CPT-CCO"
PRENDRE WfEntAct EntCl1 = VLO.SocDup
PRENDRE WfEntAct EntCl2 = VLO.CptDup
FIN_BLOC
VLO.Res = ENR-ACT-ENT( )
SI VLO.Action = CLO."DUP"
RECH PREM LST WfEntAct :
PRENDRE WfEntAct Action = CLO."CRE"
PRENDRE WfEntAct EntCl1 = VLO.SocCpt
PRENDRE WfEntAct EntCl2 = VLO.CptNum
FIN_BLOC
EFFACER Liste WfEntVar AVEC WfEntVar.EntVar = CLO."RefSocCpt"
OU WfEntVar.EntVar = CLO."CptGenNum"
POUR CHAQUE LST WfEntVar :
SI WfEntVar.EntVar = CLO."CptGereAna"
PRENDRE WfEntVar EntVaL = CGL.OUI
FIN_BLOC
SI WfEntVar.EntVar = CLO."CptNbAna"
PRENDRE WfEntVar EntVaN = WfEntVar.EntVaN + CLO.1
FIN_BLOC
SI WfEntVar.EntVar COMMENCE_PAR CLO."CptAnaNi"
PRENDRE WfEntVar EntVaC = SS-CHAINE( CHAINE= WfEntVar.EntVar , DEBUT= CLO.9 ) + CLO."EAE"
FIN_BLOC
FIN_BLOC
VLO.Res = ENR-ACT-ENT( )
FIN_BLOC
FIN_BLOC
SINON
SI VLO.Action = CLO."SUP"
CREATION Liste WfEntAct :
PRENDRE WfEntAct Action = VLO.Action
PRENDRE WfEntAct ActCle = VLO.SocCpt + VLO.CptNum
PRENDRE WfEntAct ActRes = CGL.VIDE
PRENDRE WfEntAct ActErr = CGL.VIDE
PRENDRE WfEntAct EntTEn = CLO."CPT-CCO"
PRENDRE WfEntAct EntCl1 = VLO.SocCpt
PRENDRE WfEntAct EntCl2 = VLO.CptNum
FIN_BLOC
VLO.Res = ENR-ACT-ENT( )
FIN_BLOC
SINON
SI VLO.Action = CLO."MOD"
RECH TBD/SOC DTD COCompte AVEC DTD COCompte.RefSocCpt = VLO.SocCpt
ET DTD COCompte.CptGenNum = VLO.CptNum :
SI DTD COCompte.CptGenLib NE_COMMENCE_PAS_PAR CLO."EAE"
CREATION Liste WfEntAct :
PRENDRE WfEntAct Action = VLO.Action
PRENDRE WfEntAct ActCle = VLO.SocCpt + VLO.CptNum
PRENDRE WfEntAct ActRes = CGL.VIDE
PRENDRE WfEntAct ActErr = CGL.VIDE
PRENDRE WfEntAct EntTEn = CLO."CPT-CCO"
PRENDRE WfEntAct EntCl1 = VLO.SocCpt
PRENDRE WfEntAct EntCl2 = VLO.CptNum
FIN_BLOC
CREATION Liste WfEntVar :
PRENDRE WfEntVar EntTEn = CLO."CPT-CCO"
PRENDRE WfEntVar ActCle = VLO.SocCpt + VLO.CptNum
PRENDRE WfEntVar EntVar = CLO."CptGenLib"
PRENDRE WfEntVar EntVaC = CLO."EAE :" + " " + DTD COCompte.CptGenDes
FIN_BLOC
VLO.Res = ENR-ACT-ENT( )
FIN_BLOC
FIN_BLOC
FIN_BLOC
FIN_BLOC
FIN_BLOC