U8 用友 ERP 库存查询SQL

U8 用友 ERP 库存查询SQL

支持 主计量单位和辅助计量单位

 

select   a.cinvcode,f.cinvstd,f.cinvname,b.cwhname,convert(float ,a.iquantity)  ,
g.cComUnitName as MainUnit,g.iChangRate as mainrate,h.cComUnitName as asUnit,h.iChangRate as asRate
from currentstock as a inner join warehouse as b on a.cwhcode=b.cwhcode inner join v_inventory as f on a.cinvcode=f.cinvcode  inner join inventory_extradefine as fe on f.cinvcode=fe.cinvcode
left join (select * from  ComputationUnit where bMainUnit =1) as g on g.cComUnitCode=f.cComUnitCode and g.cGroupCode =f.cGroupCode
left join (select * from  ComputationUnit where bMainUnit =0) as h on h.cComUnitCode=f.cSTComUnitCode and h.cGroupCode =f.cGroupCode
where iQuantity>0 and a.cinvcode like '%'+'500291'+'%'

 

 

cinvcode    cinvname    cwhname    storagepos    kc    MainUnit    kcas    asUnit    cinvstd    asRate    mainrate
500291    PE膜    GE成品库    1号库    1003.5842    平米    17985.38    公斤    幅宽1500,厚度0.06-单面6丝单刨    17.921147    1.000000
500291    PE膜    辅料库    1号库    3584.40145    平米    64236.59    公斤    幅宽1500,厚度0.06-单面6丝单刨    17.921147    1.000000

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值