Skip to main content

Fichier séquentiel personnalisé / Code section analytique non repris


Bonjour,

J’ai créé une fonction calcul pour adapter le fichier séquentiel aux besoins de mon client (adaptation du fichier AKUITEO). Tout fonctionne bien sauf que le code section analytique ne remonte pas...j’ai testé avec différents noms de variable et rien n’y fait….

Dans le bas de la fonction, j’ai une ligne “call xlsCellule(SectionAnalytique)” et je cherche donc la bonne variable pour “section analytique” car rien ne remonte dans le fichier d’écritures….

Ci-dessous ma fonction :

begin

resultat = ""
jour = ""
mois = ""
annee = ""

include("INIT_AKUITEO")

if (VarExists("CodeSociete") = false) then CodeSociete = NumeroDossier
if (VarExists("CodeExercice") = false) then
    AnneeComplete = ToString(DateYear(DernierJourPeriode))
    CodeExercice = Right(AnneeComplete, 2)
endif
if (VarExists("CodeAffaire") = false) then CodeAffaire = ""
if (VarExists("IndiceDeLigneUnique") = false) then IndiceDeLigneUnique = 0

Select Case TypeEcriture

Case "EXT":
    resultat = ".xls"

Case "PARAM":
    ComptesTries = true

Case "E": // en-tête du fichier

    AncienAxe = ""
    LignePrecedenteEstGenerale = true
    Indice = 0

    call xlsAjouteFeuille("ECRITURES",0,true)
    call xlsCellule("EC_NUMERO")
    call xlsCellule("EC_DATE")
    call xlsCellule("EC_CODE_JOURNAL")
    call xlsCellule("EC_EXERCICE")
    call xlsCellule("LI_COMPTE")
    call xlsCellule("LI_LIBELLE")
    call xlsCellule("LI_DEBIT")
    call xlsCellule("LI_CREDIT")
    call xlsCellule("LI_DEVISE")
    call xlsCellule("LI_PIECE")
    call xlsCellule("LI_AFFAIRE")
    call xlsCellule("LI_LOT")
    call xlsCellule("LI_SSLOT")
    call xlsCellule("LI_CODE_COLLABORATEUR")
    call xlsCellule("LI_NUM_CONTRAT")
    call xlsCellule("LI_FAMILLE")
    call xlsCellule("LI_SOUS_FAMILLE")
    call xlsCellule("EC_TRANSACTION")
    call xlsCellule("LI_ANAL01")
    call xlsCellule("LI_CODE_INTERCO")
    call xlsCellule("LI_RATTACH")
    call xlsSautDeLigne(true)

Case "G","A": //Ecriture de comptabilité analytique

    if TypeEcriture = "G" then
        Indice = Indice + 1
    endif
    if IndiceDeLigneUnique<>0 then Indice = IndiceDeLigneUnique
    if NbSections <> 0 then exit
    annee = ToString(DateYear(DernierJourPeriode))
    mois  = "00" + ToString(DateMonth(DernierJourPeriode))
    mois = Mid(mois, StrLen(mois)-1, 2)
    jour = "00" + ToString(DateDay(DernierJourPeriode))
    jour = Mid(jour, StrLen(jour)-1, 2)
    
    LigneCourante = xlsLigneCourante()
    
    call xlsCellule(mois)
    call xlsCellule(jour + "/" + mois + "/" + annee)
    call xlsCellule(CodeJournal)
    call xlsCellule(CodeExercice)
    call xlsCellule(NumeroCompte)
    call xlsCellule(LibelleCompte)
    call xlsCellule(Debit)
    call xlsCellule(Credit)
    call xlsCellule("EUR")
    call xlsCellule(Libelle)
    call xlsCellule(SectionAnalytique)
    call xlsCellule("SALAIRES") // LI_LOT
       call xlsCellule("") // LI_SSLOT
       call xlsCellule("") // LI_CODE_COLLABORATEUR
       call xlsCellule("") // LI_NUM_CONTRAT
       call xlsCellule("") // LI_FAMILLE
       call xlsCellule("") // LI_SOUS_FAMILLE
       call xlsCellule("") // EC_TRANSACTION
       call xlsCellule("") // LI_ANAL01
       call xlsCellule("") // LI_CODE_INTERCO
       call xlsCellule("") // LI_RATTACH
       call xlsSautDeLigne(true)

EndSelect
end

 

Merci de votre aide précieuse

0 commentaires

Soyez le premier à répondre!

Commenter


Gestion des cookies

Nous utilisons des cookies pour améliorer et personnaliser votre expérience. Si vous acceptez ou continuez de naviguer, vous acceptez règles relatives aux cookies. En savoir plus sur nos cookies

 
Paramètres de cookies