|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
select ic_openbal_h.vbillcode 单据号,
ic_openbal_h.dbilldate 单据日期,
bd_stordoc.code 仓库,
bd_stordoc.name 仓库名称,
ic_openbal_b.crowno 行号,
bd_material.materialmnecode U8物料编码,
bd_material.code NC物料编码,
bd_material.name 物料名称,
ic_openbal_b.nassistnum 数量,
ic_openbal_b.ncostprice 单价,
ic_openbal_b.ncostmny 金额,
sm_user_c.user_name 创建人,
ic_openbal_h.creationtime 创建时间,
sm_user_m.user_name 最后修改人,
ic_openbal_h.modifiedtime 最后修改时间
from ic_openbal_h ic_openbal_h --期初余额表头
inner join ic_openbal_b ic_openbal_b --期初余额表体
on ic_openbal_h.cgeneralhid = ic_openbal_b.cgeneralhid
and ic_openbal_h.pk_org = ic_openbal_b.pk_org
left join bd_material bd_material
on bd_material.pk_material = ic_openbal_b.cmaterialvid
inner join bd_stordoc bd_stordoc --仓库
on ic_openbal_h.cwarehouseid = bd_stordoc.pk_stordoc
and ic_openbal_h.pk_org = bd_stordoc.pk_org
left join org_orgs org_orgs
on ic_openbal_h.pk_org = org_orgs.pk_org
inner join sm_user sm_user_c
on ic_openbal_h.creator = sm_user_c.cuserid
left join sm_user sm_user_m
on ic_openbal_h.modifier = sm_user_m.cuserid
where ic_openbal_b.dr = 0
and org_orgs.code = '114'
order by ic_openbal_h.vbillcode, to_number(ic_openbal_b.crowno)
|
|