Silinmesi isdenilen malzemelerin recidleri () lerin icine yazilir
--update Erp_InventoryPriceList set UnitSetItemId = null where InventoryId in
--()
--delete Erp_InventoryPriceList where InventoryId in
--()
--delete Erp_RecipeItem from Erp_RecipeItem RI
--where RecipeId = (Select RecId from Erp_Recipe R where R.RecId = RI.RecipeId and R.InventoryId in
--()
--)
--delete Erp_Recipe where InventoryId in
--()
--update Erp_Inventory Set RecipeUnitItemId = null where RecId in
--()
--update Erp_InventoryUnitItemSize set InventoryId = null where InventoryId in
--()
--delete Erp_InventoryUnitItemSize where InventoryId in
--()
--delete Erp_InventoryBarcode where InventoryId in
--()
--delete Erp_InventoryWarehouse where InventoryId in
--()
--delete Erp_Project where InventoryId in
--()
--delete Erp_FixedAssetDepreciation where InventoryId in
--()
--delete Erp_InventoryExplanation where InventoryId in
--()
--delete Erp_InventoryAlternative where InventoryId in
--()
--delete Erp_FixedAssetExpense where InventoryId in
--()
--delete Erp_InventoryAttachment where InventoryId in
--()
--delete Erp_InitialCostItem from Erp_InitialCostItem IC
--where InitialCostId = (Select RecId from Erp_InitialCost I where I.RecId = IC.InitialCostId and I.InventoryId in
--()
--)
--delete Erp_InitialCost where InventoryId in
--()
--delete Erp_RecipeItem where InventoryId in
--()
--delete Erp_RouteItem from Erp_RouteItem RI where RouteId = (select RecId from Erp_Route R where RI.RouteId=R.RecId and R.InventoryId in
--()
--)
--delete Erp_Route where InventoryId in
--()
--delete Erp_Inventory where RecId in
--()
--update Erp_InventoryPriceList set UnitSetItemId = null where InventoryId in
--()
--delete Erp_InventoryPriceList where InventoryId in
--()
--delete Erp_RecipeItem from Erp_RecipeItem RI
--where RecipeId = (Select RecId from Erp_Recipe R where R.RecId = RI.RecipeId and R.InventoryId in
--()
--)
--delete Erp_Recipe where InventoryId in
--()
--update Erp_Inventory Set RecipeUnitItemId = null where RecId in
--()
--update Erp_InventoryUnitItemSize set InventoryId = null where InventoryId in
--()
--delete Erp_InventoryUnitItemSize where InventoryId in
--()
--delete Erp_InventoryBarcode where InventoryId in
--()
--delete Erp_InventoryWarehouse where InventoryId in
--()
--delete Erp_Project where InventoryId in
--()
--delete Erp_FixedAssetDepreciation where InventoryId in
--()
--delete Erp_InventoryExplanation where InventoryId in
--()
--delete Erp_InventoryAlternative where InventoryId in
--()
--delete Erp_FixedAssetExpense where InventoryId in
--()
--delete Erp_InventoryAttachment where InventoryId in
--()
--delete Erp_InitialCostItem from Erp_InitialCostItem IC
--where InitialCostId = (Select RecId from Erp_InitialCost I where I.RecId = IC.InitialCostId and I.InventoryId in
--()
--)
--delete Erp_InitialCost where InventoryId in
--()
--delete Erp_RecipeItem where InventoryId in
--()
--delete Erp_RouteItem from Erp_RouteItem RI where RouteId = (select RecId from Erp_Route R where RI.RouteId=R.RecId and R.InventoryId in
--()
--)
--delete Erp_Route where InventoryId in
--()
--delete Erp_Inventory where RecId in
--()