SAP Business One - Fórum
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Gerar DTW para Plano de Contas

Ir para baixo

Gerar DTW para Plano de Contas Empty Gerar DTW para Plano de Contas

Mensagem por Douglas Mussatto Sex Dez 11, 2015 10:59 pm

--====================================-
--Autor: Douglas Mussatto - [Apenas Administradores podem visualizar links]    -
--Descrição: Gerar dados para DTW de Plano de Contas       -
--====================================-

Select
AcctCode,
AcctName,
Case When Finanse = 'Y' then 'tYES'
else 'tNO' end as Finanse,
Case When Budget = 'Y' then 'tYES'
else 'tNO' end as Budget,
Case When Postable = 'Y' then 'tYES'
else 'tNO' end as Postable,
isnull(ExportCode, '') as ExportCode,
FatherNum,
isnull(AccntntCod, '') as AccntntCod,
Case When RateTrans = 'Y' then 'tYES'
else 'tNO' end as RateTrans,
Case When TaxIncome = 'Y' then 'tYES'
else 'tNO' end as TaxIncome,
Case When ExmIncome = 'Y' then 'tYES'
else 'tNO' end as ExmIncome,
Case when ActType = 'N' then 'at_Other'
    when ActType = 'E' then 'at_Expenses'
    when ActType = 'I' then 'at_Revenues'
else 'N-A' end as ActType,
Case When OverType = 'Y' then 'tYES'
else 'tNO' end as OverType,
isnull(OverCode, '') as OverCode,
isnull(ActCurr, '') as ActCurr,
Case When Protected = 'Y' then 'tYES'
else 'tNO' end as Protected,
Case When RealAcct = 'Y' then 'tYES'
else 'tNO' end as RealAcct,
Case When Advance = 'Y' then 'tYES'
else 'tNO' end as Advance,
isnull(FrgnName, '') as FrgnName,
isnull(Details, '') as Details,
isnull(Project, '') as Project,
Case When RevalMatch = 'Y' then 'tYES'
else 'tNO' end as RevalMatch,
Case When LocManTran = 'Y' then 'tYES'
else 'tNO' end as LocManTran,
FormatCode,
isnull(DfltVat, '') as DfltVat,
Case When VatChange = 'Y' then 'tYES'
else 'tNO' end as VatChange,
isnull(Category, '') as Category,
isnull(TransCode, '') as TransCode,
isnull(OverCode5, '') as OverCode5,
isnull(OverCode2, '') as OverCode2,
isnull(OverCode3, '') as OverCode3,
isnull(OverCode4, '') as OverCode4,
isnull(PlngLevel, '') as PlngLevel
from OACT
Douglas Mussatto
Douglas Mussatto
Admin

Mensagens : 3
Data de inscrição : 11/12/2015

https://marreta.directorioforuns.com

Ir para o topo Ir para baixo

Ir para o topo


 
Permissões neste sub-fórum
Não podes responder a tópicos