TA的每日心情 | 郁闷 2011-10-4 14:53 |
---|
签到天数: 11 天 [LV.3]偶尔看看II
|
楼主 |
发表于 2011-6-29 08:50:38
|
显示全部楼层
回复 jodoll 的帖子
是这个意思,现在打印时提示字段不存在,在列表中这个字段对应的值也没有显示出来
我在D_FORMSQL中添加了mnf_d.quantity as refquantity,mnf_d.tokenqty
条件为 left join mnf_manuorderdetail mnf_d on mnf_d.billid=m.referbillid and mnf_d.itemno=m.referitemno and mnf_d.goodsid=m.goodsid
select m.*, g.code as goodscode ,g.name as goodsname,case isnull(m.referbillid,'') when '' then '共耗品' else '非共耗品' end as ustypename,g.specs,u.barcode,g.guserdef1, g.guserdef2, g.guserdef3,g.guserdef4, g.guserdef5,u.unitname as unitname,g.shortname,mc.billcode as referbillcode,t.unitname as baseunitname,l.unitname as unitextname,dbo.getmultiquantityunitname(m.goodsid,m.unitqty1,m.unitqty2,m.unitqty3) as sumquantity,s.rate,wp.name procname,mnf_d.quantity as refquantity,mnf_d.tokenqty from i_drawdetail m left join l_goods g on m.goodsid=g.goodsid left join l_goodsunit u on u.unitid=m.unitid left join (select 42 as billtype,billid,billcode from mnf_manuorder where billstate =1 union select 112 as billtype,billid,billcode from crm_manuorder where billstate =1) mc on (m.referbillid = mc.billid and mc.billtype = m.referbilltype) left join l_goodsunit t on (m.goodsid=t.goodsid and t.isbase=1) left join l_goodsunit l on (m.goodsid=l.goodsid and l.unittype=1) left join mnf_manuordersub s on s.billid=m.referbillid and s.itemno=m.referitemno and s.subgoodsid=m.goodsid left join al_wgcountitem wp on wp.countwageitemid=m.countwageitemid left join mnf_manuorderdetail mnf_d on mnf_d.billid=m.referbillid and mnf_d.itemno=m.referitemno and mnf_d.goodsid=m.goodsid
|
|