Esempio n. 1
0
        /// <summary>
        /// Add BOM Line to this.
        /// Calls addBOMLines if added product is a BOM
        /// </summary>
        /// <param name="line">BOM Line</param>
        /// <param name="qty">quantity</param>
        private void AddBOMLine(Ctx ctx, MProductBOM line, Decimal qty)
        {
            // Envs.SetBusyIndicator(true);
            log.Fine(line.ToString());
            String bomType = line.GetBOMType();

            if (bomType == null)
            {
                bomType = MProductBOM.BOMTYPE_StandardPart;
            }
            //
            Decimal  lineQty = Decimal.Multiply(line.GetBOMQty(), qty);
            MProduct product = line.GetProduct();

            if (product == null)
            {
                return;
            }
            if (product.IsBOM() && product.IsVerified())
            {
                BomLines(ctx, product, lineQty);
            }
            else
            {
                //  GetDisplay(line.GetM_Product_ID(),
                //    product.GetM_Product_ID(), bomType, product.GetName(), lineQty);
            }
        }