Ejemplo n.º 1
0
        /// <summary>
        /// Calculated and assigns values to CW_SettledNetMass, CW_SettledGrossMass, CW_AddedKg, TobaccoValue
        /// </summary>
        /// <param name="value">The net mass.</param>
        internal void CalculateMassValu(double value)
        {
            this.CW_SettledNetMass = value.RoundValue();
            double _Portion = value / CWL_CWDisposal2CustomsWarehouseID.CW_Quantity.Value;

            TobaccoValue        = (_Portion * CWL_CWDisposal2CustomsWarehouseID.Value.Value).RoundValue();
            CW_SettledGrossMass = (CW_PackageToClear.Value * CWL_CWDisposal2CustomsWarehouseID.PackageWeight() + value).RoundValue();
            this.CW_AddedKg     = (value - this.CW_DeclaredNetMass.Value).RoundValue();
        }
        private void Recalculate(DisposalRequestDetails disposalRequestDetails)
        {
            CW_PackageToClear = disposalRequestDetails.PackagesToDispose;
            double _diff = disposalRequestDetails.QuantityyToClearSumRounded - CW_SettledNetMass.Value;

            CWL_CWDisposal2CustomsWarehouseID.TobaccoNotAllocated -= _diff;
            CW_DeclaredNetMass  = disposalRequestDetails.DeclaredNetMass;
            CW_SettledNetMass   = disposalRequestDetails.QuantityyToClearSumRounded;
            CW_SettledGrossMass = (CW_PackageToClear.Value * CWL_CWDisposal2CustomsWarehouseID.PackageWeight() + CW_SettledNetMass.Value).RoundValue();
            CW_AddedKg          = disposalRequestDetails.AddedKg;
            double _Portion = CW_SettledNetMass.Value / CWL_CWDisposal2CustomsWarehouseID.CW_Quantity.Value;

            TobaccoValue = (_Portion * CWL_CWDisposal2CustomsWarehouseID.Value.Value).RoundValue();
        }