public App_RepairPart(App_Item item, App_WorkTicket workTicket)
        {
            _ciOptions           = App.Database.GetCIOptions();
            quantityFormatString = String.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInQty, "}");
            umFormatString       = string.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInUM, "}");
            costFormatString     = string.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInCost, "}");
            priceFormatString    = string.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInPrice, "}");

            _workTicket = workTicket;

            _id                      = 0;
            _parentItemCode          = workTicket.DtlRepairItemCode;
            _partItemCode            = item.ItemCode;
            _partItemCodeDescription = item.ItemCodeDesc;
            _warehouse               = item.WarehouseCode;
            _problemCode             = _workTicket.DtlProblemCode;
            _quantity                = 0.0;

            // dch rkl 12/02/2016 Get Item Unit Cost based on JT_Options.DefaultPartsCost
            _unitCost = GetItemUnitCost(item.LastTotalUnitCost, item.AverageUnitCost, item.StandardUnitCost);
            //_unitCost = (double)item.StandardUnitCost;

            _unitPrice = Convert.ToDouble(item.StandardUnitPrice);

            // dch rkl 02/03/2017 Per Jeanne, Use the Sales Unit of Measure, not the Standard Unit of Measure
            //_unitOfMeasure = item.StandardUnitOfMeasure;
            _unitOfMeasure = item.SalesUnitOfMeasure;

            _comment      = string.Empty;
            _isChargeable = SetIsChargeable();
            _isPrintable  = (_isChargeable ? true : false);
            _isPurchased  = false;
            _isOverhead   = _workTicket.PartsCalculateOverheadDefault;
            _itemType     = item.ItemType;      // dch rkl 11/23/2016 add item type

            // dch rkl 11/30/2016 add quantity required
            _quantityReqd = 0;

            // dch rkl 11/23/2016 Add Item Type
            _itemType = item.ItemType;

            // dch rkl 12/05/2016 Add Item Valuation
            _valuation = item.Valuation;

            // dch rkl 12/05/2016 add qty shipped
            _quantityShipped = 0;

            // dch rkl 01/13/2017 Add Extended Description
            _itemCodeDesc = "";

            // dch rkl 01/23/2017 Sales Order Line Key
            _soLineKey = "";
        }
        public App_RepairPart(App_Item item, App_WorkTicket workTicket)
        {
            _workTicket = workTicket;

            _id                      = 0;
            _parentItemCode          = workTicket.DtlRepairItemCode;
            _partItemCode            = item.ItemCode;
            _partItemCodeDescription = item.ItemCodeDesc;
            _warehouse               = item.WarehouseCode;
            _problemCode             = _workTicket.DtlProblemCode;
            _quantity                = 0.0;
            _unitCost                = Convert.ToDouble(item.StandardUnitCost);
            _unitPrice               = Convert.ToDouble(item.StandardUnitPrice);
            _unitOfMeasure           = item.StandardUnitOfMeasure;
            _comment                 = string.Empty;
            _isChargeable            = SetIsChargeable();
            _isPrintable             = (_isChargeable ? true : false);
            _isPurchased             = false;
            _isOverhead              = _workTicket.PartsCalculateOverheadDefault;
        }