miércoles, 8 de mayo de 2013
Accounting View Post
CREATE VIEW "adempiere"."vw_nota_contabilidad" ( ad_client_id,
ad_org_id,
isactive,
created,
createdby,
updated,
updatedby,
gl_journalbatch_id,
num_lote,
docstatus,
docaction,
processed,
fecha_lote,
fecha_conta_lote,
c_period_id,
lote_cr,
lote_dr,
gl_journal_id,
num_nota,
posted,
nota_cr,
nota_dr,
fecha_nota,
fecha_conta_nota,
linea,
credito,
debito,
id_cuenta,
cod_cuenta,
cuenta) AS
SELECT gb.ad_client_id,
gb.ad_org_id,
gb.isactive,
gb.created,
gb.createdby,
gb.updated,
gb.updatedby,
gb.gl_journalbatch_id,
gb.documentno AS num_lote,
gb.docstatus,
gb.docaction,
gb.processed,
gb.datedoc AS fecha_lote,
gb.dateacct AS fecha_conta_lote,
gb.c_period_id,
gb.totalcr AS lote_cr,
gb.totaldr AS lote_dr,
g.gl_journal_id,
g.documentno AS num_nota,
g.posted,
g.totalcr AS nota_cr,
g.totaldr AS nota_dr,
g.datedoc AS fecha_nota,
g.dateacct AS fecha_conta_nota,
gl.line AS linea,
gl.amtacctcr AS credito,
gl.amtacctdr AS debito,
ev.c_elementvalue_id AS id_cuenta,
ev.value AS cod_cuenta,
ev.name AS cuenta
FROM gl_journalbatch gb
JOIN c_period p ON gb.c_period_id = p.c_period_id
JOIN gl_journal g ON gb.gl_journalbatch_id = g.gl_journalbatch_id
JOIN gl_journalline gl ON g.gl_journal_id = gl.gl_journal_id
JOIN c_validcombination vc ON gl.c_validcombination_id = vc.c_validcombination_id
JOIN c_elementvalue ev ON vc.account_id = ev.c_elementvalue_id
WHERE gb.ad_client_id = 1000001::numeric;
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario