public PercentageDistribution( IInventoryItemProvider inventoryItemProvider, IEnumerable <InventoryItemComponentInfo> percentageComponents, Func <decimal, decimal> roundingFunction) { _inventoryItemProvider = inventoryItemProvider; _percentageComponents = percentageComponents; _roundingFunction = roundingFunction; }
public PercentageWithResidualDistribution( IInventoryItemProvider inventoryItemProvider, IEnumerable <InventoryItemComponentInfo> percentageComponents, decimal fairUnitPrice, decimal fixedPerUnit, decimal compoundDiscountRate, decimal qtyInBaseUnit, Func <decimal, decimal> roundingFunction) : base(inventoryItemProvider, percentageComponents, roundingFunction) { _fairUnitPrice = fairUnitPrice; _fixedPerUnit = fixedPerUnit; _compoundDiscountRate = compoundDiscountRate; _qtyInBaseUnit = qtyInBaseUnit; }
/// <param name="roundingFunction"> /// The function that should be used for rounding transaction amounts. /// </param> /// <param name="isDraft"> /// Indicates whether the schedule to be created or reevaluated is a draft schedule. /// In particular, it affects whether credit line / deferral transactions would be /// generated for the schedule. /// </param> public SingleScheduleCreator( IDREntityStorage drEntityStorage, ISubaccountProvider subaccountProvider, IBusinessAccountProvider businessAccountProvider, IInventoryItemProvider inventoryItemProvider, IFinPeriodRepository finPeriodRepository, Func <decimal, decimal> roundingFunction, int?branchID, bool isDraft, Location location, CurrencyInfo currencyInfo) { if (drEntityStorage == null) { throw new ArgumentNullException(nameof(drEntityStorage)); } if (subaccountProvider == null) { throw new ArgumentNullException(nameof(subaccountProvider)); } if (businessAccountProvider == null) { throw new ArgumentNullException(nameof(businessAccountProvider)); } if (inventoryItemProvider == null) { throw new ArgumentNullException(nameof(inventoryItemProvider)); } if (roundingFunction == null) { throw new ArgumentNullException(nameof(roundingFunction)); } FinPeriodRepository = finPeriodRepository; _drEntityStorage = drEntityStorage; _subaccountProvider = subaccountProvider; _businessAccountProvider = businessAccountProvider; _inventoryItemProvider = inventoryItemProvider; _roundingFunction = roundingFunction; _isDraft = isDraft; _branchID = branchID; _location = location; _currencyInfo = currencyInfo; }
public SingleScheduleCreator( IDREntityStorage drEntityStorage, ISubaccountProvider subaccountProvider, IBusinessAccountProvider businessAccountProvider, IInventoryItemProvider inventoryItemProvider, ISingleScheduleViewProvider singleScheduleViewProvider, ISalesPriceProvider salesPriceProvider, IDRDataProvider dataProvider, IFinPeriodRepository finPeriodRepository, Func <decimal, decimal> roundingFunction, int?branchID, bool isDraft, Location location, CurrencyInfo currencyInfo) : this(drEntityStorage, subaccountProvider, businessAccountProvider, inventoryItemProvider, finPeriodRepository, roundingFunction, branchID, isDraft, location, currencyInfo) { _salesPriceProvider = salesPriceProvider ?? throw new ArgumentNullException(nameof(salesPriceProvider)); _singleScheduleViewProvider = singleScheduleViewProvider ?? throw new ArgumentNullException(nameof(singleScheduleViewProvider)); _dataProvider = dataProvider ?? throw new ArgumentNullException(nameof(dataProvider)); }
/// <param name="roundingFunction"> /// The function that should be used for rounding transaction amounts. /// </param> /// <param name="isDraft"> /// Indicates whether the schedule to be created or reevaluated is a draft schedule. /// In particular, it affects whether credit line / deferral transactions would be /// generated for the schedule. /// </param> public ScheduleCreator( IDREntityStorage drEntityStorage, ISubaccountProvider subaccountProvider, IBusinessAccountProvider businessAccountProvider, IInventoryItemProvider inventoryItemProvider, Func <decimal, decimal> roundingFunction, int?branchID, bool isDraft) { if (drEntityStorage == null) { throw new ArgumentNullException(nameof(drEntityStorage)); } if (subaccountProvider == null) { throw new ArgumentNullException(nameof(subaccountProvider)); } if (businessAccountProvider == null) { throw new ArgumentNullException(nameof(businessAccountProvider)); } if (inventoryItemProvider == null) { throw new ArgumentNullException(nameof(inventoryItemProvider)); } if (roundingFunction == null) { throw new ArgumentNullException(nameof(roundingFunction)); } _drEntityStorage = drEntityStorage; _subaccountProvider = subaccountProvider; _businessAccountProvider = businessAccountProvider; _inventoryItemProvider = inventoryItemProvider; _roundingFunction = roundingFunction; _isDraft = isDraft; _branchID = branchID; }