
-----------2010-10-20 15:49:15
if exists(select * from BPInStoreEntry where FEIsOutStore=1 and feid=63)
RAISERROR ('有已出库的物料，不能删除本单据', 16, 1)
DELETE from BPInStore where fid=63
delete from BsFuJianGuanLi where FHTempID=10159 and FHBillID=63
DELETE from BPInStoreEntry where feid=63
-----------2010-10-20 15:49:16
if exists(select * from BPInStoreEntry where FEIsOutStore=1 and feid=62)
RAISERROR ('有已出库的物料，不能删除本单据', 16, 1)
DELETE from BPInStore where fid=62
delete from BsFuJianGuanLi where FHTempID=10159 and FHBillID=62
DELETE from BPInStoreEntry where feid=62
-----------2010-10-20 15:50:03
if exists(select * from BPInStoreEntry where FEIsOutStore=1 and feid=63)
RAISERROR ('有已出库的物料，不能删除本单据', 16, 1)
DELETE from BPInStore where fid=63
delete from BsFuJianGuanLi where FHTempID=10159 and FHBillID=63
DELETE from BPInStoreEntry where feid=63
-----------2010-10-20 15:50:04
if exists(select * from BPInStoreEntry where FEIsOutStore=1 and feid=62)
RAISERROR ('有已出库的物料，不能删除本单据', 16, 1)
DELETE from BPInStore where fid=62
delete from BsFuJianGuanLi where FHTempID=10159 and FHBillID=62
DELETE from BPInStoreEntry where feid=62
-----------2011-09-20 17:09:11
if exists(select * from BPInStoreEntry where FEIsOutStore=1 and feid=10066)
RAISERROR ('有已出库的物料，不能删除本单据', 16, 1)
DELETE from BPInStore where fid=10066
delete from BsFuJianGuanLi where FHTempID=10159 and FHBillID=10066
DELETE from BPInStoreEntry where feid=10066