IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_140_dolinkdata_832]') AND type = 'P')
DROP PROCEDURE [dbo].[order_140_dolinkdata_832]
GO
create procedure order_140_dolinkdata_832(
@cmpid int ,
@useruid int ,
@bizid int ,
@ordbcid int,
@ordid bigint,
@jbid bigint,
@ftype varchar(10),
@fbizid int,
@fordid bigint,
@ford2tag int ,
@ford2id bigint,
@rtype varchar(10),
@rbizid int,
@rordid bigint,
@rord2tag int ,
@rord2id bigint 
) 
as 
begin



if (@ftype='biz' and @fbizid=144 and @ford2tag=0) 
update old set  old.ord_jdsj=new.ord_jdrq ,  old.ord_jdfdh=new.ord_lxdh1 ,  old.ord_jdfxm=new.ord_jdr ,  old.ord_sfzh=new.ord_sfzh1 ,  old.ord_bcid=new.ord_bcid ,  old.ord_dpzt='已转'
from order_140 new ,order_144 old 
where  new.ord_id=@ordid 
 and old.ord_id=new.ord_fordid

--- 下面这段程序，是完成帐务处理------

--- 帐务处理完毕 ------

end