Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8989

Ayuda con Query

$
0
0

Jovenes expertos necesito crear un estado de resultado a la medida y me solicitan de la siguiente forma:

 

 

Header 1Header 2Header 3Header 4
6101Gastos Generales
610101

Gastos Generales

61010101Sueldos100.00
Sueldos quincena de marzo 2014200.00

 

que apartir del nivel 5 me detalle el gasto de la cuenta.

 

Con el plan de cuentas no tuve poblemas pero no puedo hacer que apartir del nivel 5 me muestre los movimientos de la cuenta contable.

 

Les dejo el query del plan de cuentas

 

select T0.AcctCode, T0.Segment_0, T0.AcctName, T0.CurrTotal,        T0.FatherNum, T0.Counter, T0.Levels    from oact T0     where T0.Levels='3' and T0.FatherNum >='4'
group by T0.AcctCode, T0.Segment_0, T0.AcctName, T0.Levels, T0.CurrTotal, T0.FatherNum, T0.Counter
union 
select T0.AcctCode, T0.Segment_0, T0.AcctName, T0.currTotal,         T0.FatherNum, T0.Counter, T0.Levels    from oact T0     where T0.Levels='4' and T0.FatherNum >='4' 
group by T0.AcctCode, T0.Segment_0, T0.AcctName, T0.Levels, T0.CurrTotal, T0.FatherNum, T0.Counter
union 
select T0.AcctCode, T0.Segment_0, T0.AcctName, T0.CurrTotal, T0.FatherNum, T0.Counter, T0.Levels    from oact T0      where T0.Levels='5' and T0.FatherNum >='4'
group by T0.AcctCode, T0.Segment_0, T0.AcctName, T0.Levels, T0.CurrTotal, T0.FatherNum, T0.Counter
order by T0.Counter

Si me pudieran ayudar se los agradeceria bastante ya que inten hacer vistas pero no me funciono, agradezco cualquier ayuda o alguna otra idea como puedo hacer este reporte se los agradeceria bastante.

 

De antemano muy agradecido por la ayuda y por sus ideas.

 

Saludos Coridiales


Viewing all articles
Browse latest Browse all 8989

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>