[FLAG]
ShowDesign=Y

[进货管理]
进货单=Y

[销售管理]
销售单=Y

[批发销售]
销售单=Y

[调拨管理]
调拨单=Y

[零售业务资料]
前台小票打印=

[进货单]
DS_NUM=2
DS_ALIAS1=M
DS_ALIAS2=D
MKEY1=InMain_ID
SQL1=select * from V_Yw_InMain where  InMain_ID=@1
SQL2=select * from V_Yw_InData_Detail where InMain_ID=@1

[销售单]
DS_NUM=2
DS_ALIAS1=M
DS_ALIAS2=D
MKEY1=SaMain_ID
SQL1=select * from V_Yw_SaMain where SaMain_ID=@1
SQL2=select * from V_Yw_SaData_Detail where SaMainId_Detail=@1
;SQL2=select d.*, g.*, d.SaNum*d.SaPrice As TPrice from Yw_SaDetail d, Jb_Goods g where g.Goods_Id = d.GoodsId_Sa and SaMainId_Detail=@1

[调拨单]
DS_NUM=2
DS_ALIAS1=M
DS_ALIAS2=D
MKEY1=DbMain_ID
SQL1=select * from V_Yw_DbMain where DbMain_ID=@1
SQL2=select * from V_Yw_DbData_Detail where DbMainId_Detail=@1


[销售单_套打]
DS_NUM=2
DS_ALIAS1=M
DS_ALIAS2=D
MKEY1=SaMain_ID
SQL1=select * from V_Yw_SaMain where SaMain_ID=@1
SQL2=select d.*, g.*, d.SaNum*d.SaPrice As TPrice from Yw_SaDetail d, Jb_Goods g where g.Goods_Id = d.GoodsId_Sa and SaMainId_Detail=@1

[前台小票打印]
PrnView=N
DS_NUM=2
DS_ALIAS1=M
DS_ALIAS2=D
MKEY1=PosMain_Id
SQL1=select a.*,b.TSaNum,b.TSaPrice from Yw_PosMain a,(select PosMainId_Detail,sum(SaNum) as TSaNum,round(sum(SaNum*DisCount*SaPrice),2) as TSaPrice from Yw_PosDetail group by PosMainId_Detail) b  where a.PosMain_Id=@1 and a.PosMain_Id=b.PosMainId_Detail
SQL2=select * from V_Yw_PosData where PosMain_Id=@1



---------------------------
SQL语句错误
---------------------------
select *, (select PosiId_Sa from Yw_PosMain where PosMain_Id = d.PosMain_Id) As PosiId_Sa  from Yw_PosDetail d where d.PosMain_Id=3459
---------------------------
确定   取消   
---------------------------
