NCV57 调拨订单未做内部结算

阅读: 评论:0

NCV57 调拨订单未做内部结算

NCV57 调拨订单未做内部结算

select a.cincorpid 调入公司, a.coutcorpid 调出公司, a.to_type 调拨类型, a.vcode 调拨单号, a.fstatusflag 调拨状态from (select casewhen th.cincorpid = '1002' then'南创'when th.cincorpid = '1003' then'江创'when th.cincorpid = '1019' then'创莱'when th.cincorpid = '1021' then'铭煊'end cincorpid,utcorpid = '1002' then'南创'utcorpid = '1003' then'江创'utcorpid = '1019' then'创莱'utcorpid = '1021' then'铭煊'end coutcorpid,pecode = '5D' then'公司间调拨'else'组织间调拨'end to_type,th.vcode,casewhen th.fstatusflag = 1 then'自由状态'when th.fstatusflag = 2 then'审批中'when th.fstatusflag = 3 then'审批未通过'when th.fstatusflag = 4 then'未处理'when th.fstatusflag = 5 then'调拨中'when th.fstatusflag = 6 then'调拨完成'when th.fstatusflag = 7 then'关闭'when th.fstatusflag = 8 then'调拨订单完成'when th.fstatusflag = 9 then'冻结'end fstatusflag,tsh.vcode jscodefrom to_bill_b tbleft join to_bill thon th.cbillid = tb.cbillidleft join to_settlelist_b tslon tsl.cfirstbid = tb.cbill_bidleft join to_settlelist tshon tsh.csettlelistid = tsl.csettlelistidwhere nvl(th.dr, 0) = 0and nvl(tb.dr, 0) = 0and nvl(tsh.dr, 0) = 0and nvl(tsl.dr, 0) = pecode = '5D'and th.dbilldate >= '2017-01-01'and nvl(th.blatest, 'Y') = 'Y') a where a.jscode is nullgroup by a.cincorpid, a.coutcorpid, a.to_type, a.vcode, a.fstatusflag

本文发布于:2024-01-30 01:55:33,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170655093518411.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:未做   订单
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23