public void ProcessContracts(Contract contract, int months) { double value = contract.TotalValue / months; for (int i = 1; i <= months; i++) { double amount = _onlinePayment.PaymentFee(value, i); contract.AddInstallment(new Installment(contract.Date.AddMonths(i), amount)); } }
public void ProcessContract(Contract contract, int months) { double basicQuota = contract.TotalValue / months; for (int i = 1; i <= months; i++) { DateTime date = contract.Date.AddMonths(i); double updatedQuota = basicQuota + _onlinePaymentService.Interest(basicQuota, i); double fullQuota = updatedQuota + _onlinePaymentService.PaymentFee(updatedQuota); contract.AddInstallment(new Installment(date, fullQuota)); } }
public void ProcessContract(Contract contract, int months) { double basicValue = contract.ContractValue / months; for (int i = 1; i <= months; i++) { DateTime paymDate = contract.ContractDate.AddMonths(i); double updateValue = basicValue + _iOnPaymService.InterestFee(basicValue, i); double fullValue = updateValue + _iOnPaymService.PaymentFee(updateValue); contract.AddInstallments(new Installment(paymDate, fullValue)); } }
public void ProcessContract(Contract contract, int months) { double amount = 0.0; for (int i = 1; i <= months; i++) { amount = contract.TotalValue / months; amount = _onlinePaymentService.Interest(amount, i); amount = _onlinePaymentService.PaymentFee(amount); contract.AddInstallment(new Installment(contract.Date.AddMonths(i), amount)); } }
public static void ProcessContract(Contract contract, int monthes, IOnlinePaymentService service) { double monthValue = contract.ContractValue / monthes; for (int i = 0; i < monthes; i++) { DateTime _dueDate = contract.Date.AddMonths(i + 1); double _amount = monthValue + service.Interest(monthValue, i + 1); _amount += service.PaymentFee(monthValue); contract.installments.Add(new Installment(_dueDate, _amount)); } }
public void ProcessContract(Contract contract, int months) { double baseQuote = contract.TotalValue / months; for (int i = 1; i <= months; i++) { DateTime dueDate = contract.Date.AddMonths(i); double updatedQuote = baseQuote + _onlinePaymentService.Interest(baseQuote, i); double totalQuote = updatedQuote + _onlinePaymentService.PaymentFee(updatedQuote); Installment installment = new Installment(dueDate, totalQuote); contract.AddInstallment(installment); } }