if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[up_InitData_YWBill]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[up_InitData_YWBill]
Go

create procedure up_InitData_YWBill
With Encryption
as


--采购订货单
truncate table FCGB
truncate table FCGH

--商品验收单
truncate table FYSB
truncate table FYSH

--商品退货单
truncate table FTHB
truncate table FTHH

--进价调整单
truncate table FJTJB
truncate table FJTJH

--售价调整单
truncate table FTJB
truncate table FTJH

--仓库调拨单
truncate table FCDBB
truncate table FCDBH

--内部领用单
truncate table FLYB
truncate table FLYH

--商品损溢单
truncate table FSYB
truncate table FSYH

--经销结算单
truncate table FJXJSB
truncate table FJXJSH


--商品盘存单
truncate table FPCB
truncate table FPCH


--批发报价单
truncate table FWBJB
truncate table FWBJH

--批发销货单
truncate table FWXHB
truncate table FWXHH
truncate table ProdBindWSDetail

--批发退货单
truncate table FWTHB
truncate table FWTHH

--批发结算单
truncate table FWJSB
truncate table FWJSH
truncate table FWJSBDetail

--预付款单
truncate table FPrePay

--费用单
truncate table FFeeH
truncate table FFeeB

--批发订货单
truncate table FWDHB
truncate table FWDHH
truncate table FWDHB_History
truncate table FWDHH_History

--客户预收款
truncate table FWPrepay
