public override void ClearDetails(bool logChange = true)
        {
            if (State == OperationState.Saved || State == OperationState.Draft)
            {
                foreach (ComplexProductionDetail detail in DetailsMat)
                {
                    detail.Quantity = 0;
                }

                foreach (ComplexProductionDetail detail in DetailsProd)
                {
                    detail.Quantity = 0;
                }
            }
            else
            {
                DetailsMat.Clear();
                DetailsProd.Clear();
            }
        }
        public override void ClearDetails(bool logChange = true)
        {
            if (id < 0)
            {
                DetailsMat.Clear();
                DetailsProd.Clear();
            }
            else
            {
                foreach (ComplexRecipeDetail detail in DetailsMat)
                {
                    detail.Quantity = 0;
                }

                foreach (ComplexRecipeDetail detail in DetailsProd)
                {
                    detail.Quantity = 0;
                }
            }
        }