public void SavePrice(CostElement costElement, int userID)
        {
            ReceivedSummary receivedSummary = new ReceivedSummary();
            receivedSummary.ItemID = costElement.ItemID;
            receivedSummary.UnitID = costElement.ItemUnitID;
            receivedSummary.ManufacturerID = costElement.ManufacturerID;
            receivedSummary.StoreID = costElement.MovingAverageID;
            receivedSummary.NewUnitCost = costElement.AverageCost;
            receivedSummary.Margin = costElement.Margin;
            receivedSummary.NewSellingPrice = costElement.SellingPrice;
            receivedSummary.NewPrice = costElement.AverageCost;
            receivedSummary.Remark = "Price override";
            FlushData();
            if (BLL.Settings.SkipBeginningBalancePricing)
            {
                SetPricePerPackCostAndSellingPrice(receivedSummary);
                SendToFinanceManagerConfirmation(receivedSummary, userID);
            }
            else

                SetCostAndSellingPriceAndSendToConfirmation(receivedSummary, userID);

            if (!BLL.Settings.IsCenter)
            {
                PricePicklistforHub(receivedSummary);

            }
            else
            {
                PricePicklistforCenter(receivedSummary);
            }
            receivedSummary.SaveWeightedAverageLog(userID);
        }
        /// <summary>
        /// Saves the price.
        /// </summary>
        /// <param name="rs">The rs.</param>
        /// <param name="userID">The user ID.</param>
        public void SavePrice(ReceivedSummary rs, int userID)
        {
            FlushData();
            if (BLL.Settings.SkipBeginningBalancePricing)
            {
                SetPricePerPackCostAndSellingPrice(rs);
                SendToFinanceManagerConfirmation(rs, userID);
            }
            else

                SetCostAndSellingPriceAndSendToConfirmation(rs, userID);

            if (!BLL.Settings.IsCenter)
            {
                PricePicklistforHub(rs);
                PriceDeliveryNoteforHub(rs);
            }
            else
            {
                PricePicklistforCenter(rs);
                PriceDeliveryNoteforCenter(rs);
            }
            rs.SaveWeightedAverageLog(userID);
        }