本文整理汇总了C#中OpenCBS.Shared.OCurrency类的典型用法代码示例。如果您正苦于以下问题:C# OCurrency类的具体用法?C# OCurrency怎么用?C# OCurrency使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OCurrency类属于OpenCBS.Shared命名空间,在下文中一共展示了OCurrency类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RepayCommission
public void RepayCommission(Installment pInstallment, ref OCurrency pAmountPaid, ref OCurrency pCommisionEvent)
{
if (!_pCCO.CancelFees)
AutomaticRepayMethod(pInstallment, ref pAmountPaid, ref pCommisionEvent);
else
ManualRepayMethod(pInstallment, ref pAmountPaid, ref pCommisionEvent);
}
示例2: Repay
public void Repay(Installment pInstallment, ref OCurrency pAmountPaid, ref OCurrency pFeesEvent)
{
//Nothing to modify
pInstallment.PaidFees += pFeesEvent;
pAmountPaid -= pFeesEvent;
pFeesEvent = 0;
}
示例3: FixedInstallmentStrategy
public FixedInstallmentStrategy(Loan pContract, OCurrency pStartAmount, int pNumberOfInstalments, ApplicationSettings pGeneralSettings)
{
_contract = pContract;
_startAmount = pStartAmount;
_numberOfInstallmentsToPay = pNumberOfInstalments;
_roundingPoint = pContract.UseCents ? 2 : 0;
_generalSettings = pGeneralSettings;
}
示例4: ManualRepayMethod
private static void ManualRepayMethod(Installment pInstallment, ref OCurrency pAmountPaid, ref OCurrency pCommisionEvent)
{
pInstallment.PaidCommissions = pCommisionEvent;
pInstallment.CommissionsUnpaid = 0;
pAmountPaid -= pCommisionEvent;
pCommisionEvent = 0;
//Nothing to modify
}
示例5: FlatStrategy
public FlatStrategy(Loan pContract, ApplicationSettings pGeneralSettings, OCurrency pInitialOlbOfContractBeforeRescheduling)
{
_roundingPoint = pContract.UseCents ? 2 : 0;
_initialOlbOfContractBeforeRescheduling = pInitialOlbOfContractBeforeRescheduling;
_contract = pContract;
_generalSettings = pGeneralSettings;
}
示例6: LoanAmountCycle
public LoanAmountCycle(int id, int loanCycle, OCurrency min, OCurrency max, int cycleObjectId, int cycleId)
{
Id = id;
LoanCycle = loanCycle;
Min = min;
Max = max;
CycleObjectId = cycleObjectId;
CycleId = cycleId;
}
示例7: BookingToView
public BookingToView(OBookingDirections pDirection, OCurrency pAmount, DateTime pDate, double? pExchangeRate, string pContractCode, string pEventCode)
{
Direction = pDirection;
_amount = pAmount;
Date = pDate;
_exchangeRate = pExchangeRate;
ContractCode = pContractCode;
EventCode = pEventCode;
}
示例8: Booking
public Booking(int pNumber, Account pCreditaccount, OCurrency pAmount, Account pDebitaccount, OAccountingLabels pLabel, DateTime pDate, Branch branch)
{
Number = pNumber;
CreditAccount = pCreditaccount;
DebitAccount = pDebitaccount;
_amount = pAmount;
Label = pLabel;
Date = pDate;
Branch = branch;
}
示例9: Account
public Account(string accountNumber, string label, OCurrency balance, string typeCode, bool debitPlus, OAccountCategories category, int pCurrencyId)
{
_number = accountNumber;
_label = label;
_balance = balance;
TypeCode = typeCode;
_debitPlus = debitPlus;
AccountCategory = category;
CurrencyId = pCurrencyId;
}
示例10: CloseSavingsForm
public CloseSavingsForm(OCurrency pBalance)
{
InitializeComponent();
lbTotalAmountValue.Text = pBalance.GetFormatedValue(UseCents);
gbCloseFees.Enabled = false;
_amount = pBalance;
_closeFees = 0;
Initialize();
}
示例11: RepayNextInstallments
public void RepayNextInstallments(ref OCurrency amountPaid, ref OCurrency interestEvent, ref OCurrency interestPrepayment, ref OCurrency principalEvent, ref OCurrency feesEvent, ref OCurrency commissionsEvent)
{
if (amountPaid == 0) return;
for(int i = 0 ; i < _contract.NbOfInstallments ; i++)
{
Installment installment = _contract.GetInstallment(i);
if (!installment.IsRepaid && amountPaid > 0)
{
//commission
_methodToRepayCommission.RepayCommission(installment, ref amountPaid, ref commissionsEvent);
if (amountPaid == 0) break;
//penalty
_methodToRepayFees.RepayFees(installment, ref amountPaid, ref feesEvent);
if (amountPaid == 0) break;
//Interests
if (amountPaid == 0) return;
_methodToRepayInterest.RepayInterest(installment, ref amountPaid, ref interestEvent,ref interestPrepayment);
//principal
if (amountPaid == 0)
{
_paidInstallments.Add(installment);
return;
}
OCurrency principalHasToPay = installment.CapitalRepayment - installment.PaidCapital;
if (AmountComparer.Compare(amountPaid, principalHasToPay) < 0)
{
installment.PaidCapital += amountPaid;
installment.PaidCapital = Math.Round(installment.PaidCapital.Value, 2);
principalEvent += amountPaid;
amountPaid = 0;
}
else if (AmountComparer.Compare(amountPaid, principalHasToPay) > 0)
{
installment.PaidCapital = installment.CapitalRepayment;
amountPaid -= principalHasToPay;
principalEvent += principalHasToPay;
}
else
{
installment.PaidCapital += amountPaid;
installment.PaidCapital = Math.Round(installment.PaidCapital.Value, 2);
principalEvent += amountPaid;
amountPaid = 0;
}
_paidInstallments.Add(installment);
}
}
}
示例12: RepayNextInstallments
/// <summary>
/// This method recalculates installments for a declining rate exotic loan in case of over payment.
/// </summary>
public void RepayNextInstallments(ref OCurrency amountPaid, ref OCurrency interestEvent, ref OCurrency interestPrepayment, ref OCurrency principalEvent, ref OCurrency feesEvent, ref OCurrency commissionsEvent)
{
OCurrency totalAmount = 0;
bool firstInstallmentToRepay = false;
double baseTocalculatePrincipalCoeff = 0;
if(amountPaid > 0)
{
for (int i = 0; i < _contract.NbOfInstallments; i++)
{
Installment installment = _contract.GetInstallment(i);
if (installment.IsRepaid && installment.Number > _contract.GracePeriod)
baseTocalculatePrincipalCoeff += _contract.Product.ExoticProduct.GetExoticInstallment(i - _contract.GracePeriod.Value).PrincipalCoeff;
}
baseTocalculatePrincipalCoeff = 1 - baseTocalculatePrincipalCoeff;
for(int i = 0;i < _contract.NbOfInstallments;i++)
{
Installment installment = _contract.GetInstallment(i);
if(!installment.IsRepaid && installment.Number <= _contract.GracePeriod) //during Grace Period
{
installment.OLB -= amountPaid;
installment.CapitalRepayment = 0;
installment.InterestsRepayment = Math.Round(installment.OLB.Value * Convert.ToDecimal(_contract.InterestRate),2);
}
else if(!installment.IsRepaid && !firstInstallmentToRepay)
{
ExoticInstallment exoticInstallment = _contract.Product.ExoticProduct.GetExoticInstallment(i - _contract.GracePeriod.Value);
firstInstallmentToRepay = true;
installment.OLB -= amountPaid;
totalAmount = installment.OLB;
installment.CapitalRepayment = Math.Round(totalAmount.Value * Convert.ToDecimal(exoticInstallment.PrincipalCoeff / baseTocalculatePrincipalCoeff),2);
installment.InterestsRepayment = Math.Round(installment.OLB.Value * Convert.ToDecimal(_contract.InterestRate),2);
}
else if(!installment.IsRepaid)
{
ExoticInstallment exoticInstallment = _contract.Product.ExoticProduct.GetExoticInstallment(i - _contract.GracePeriod.Value);
Installment _installment = _contract.GetInstallment(i - 1);
installment.OLB = _installment.OLB - _installment.CapitalRepayment;
installment.CapitalRepayment = Math.Round(totalAmount.Value * Convert.ToDecimal(exoticInstallment.PrincipalCoeff / baseTocalculatePrincipalCoeff),2);
installment.InterestsRepayment = Math.Round(installment.OLB.Value * Convert.ToDecimal(_contract.InterestRate),2);
}
_paidInstallments.Add(installment);
}
principalEvent += amountPaid;
amountPaid = 0;
}
}
示例13: Installment
public Installment(DateTime expectedDate,OCurrency interestRepayment,OCurrency capitalRepayment,
OCurrency paidCapital, OCurrency paidInterests, OCurrency paidFees, DateTime? paidDate, int number)
{
ExpectedDate = expectedDate;
_interestsRepayment = interestRepayment;
_capitalRepayment = capitalRepayment;
_paidCapital = paidCapital;
_paidInterests = paidInterests;
_paidFees = paidFees;
PaidDate = paidDate;
Number = number;
CalculatedPenalty = 0m;
IsLastToRepay = false;
}
示例14: CreditContractOptions
public CreditContractOptions(OLoanTypes pLoanType, bool pKeepExpectedInstallments,
bool pCancelFees, OCurrency pManualFeesAmount, OCurrency pManualCommissionAmount,
bool pCancelInterests, OCurrency pManualInterestsAmount,
OAnticipatedRepaymentPenaltiesBases pAnticipatedTotalRepaymentPenaltiesBase)
{
_loanType = pLoanType;
_keepExpectedInstallments = pKeepExpectedInstallments;
_cancelFees = pCancelFees;
_manualFeesAmount = pManualFeesAmount;
_manualCommissionAmount = pManualCommissionAmount;
_cancelInterests = pCancelInterests;
_manualInterestsAmount = pManualInterestsAmount;
_anticipatedTotalRepaymentPenaltiesBase = pAnticipatedTotalRepaymentPenaltiesBase;
}
示例15: Repay
public void Repay(ref OCurrency pAmountPaid, ref OCurrency pFeesEvent, ref OCurrency pCommissionsEvent, ref OCurrency pInterestEvent)
{
if (_cco.CancelFees && (_cco.ManualFeesAmount + _cco.ManualCommissionAmount) >= 0)
{
pCommissionsEvent = _cco.ManualCommissionAmount;
pFeesEvent = _cco.ManualFeesAmount;
if (AmountComparer.Compare(pAmountPaid, _cco.ManualFeesAmount + _cco.ManualCommissionAmount) > 0)
{
//pAmountPaid -= _cco.ManualFeesAmount + _cco.ManualCommissionAmount;
}
else
pAmountPaid = 0;
}
if (_cco.KeepExpectedInstallments)
{
if (_cco.CancelInterests && _cco.ManualInterestsAmount >= 0)
{
OCurrency manualInterestAmount = _cco.ManualInterestsAmount;
for(int i = 0;i<_contract.NbOfInstallments;i++)
{
Installment installment = _contract.GetInstallment(i);
if(!installment.IsRepaid && pAmountPaid > 0 && manualInterestAmount > 0)
{
OCurrency interestHasToPay = installment.InterestsRepayment - installment.PaidInterests;
if (AmountComparer.Compare(manualInterestAmount,interestHasToPay) > 0)
{
pInterestEvent += interestHasToPay;
installment.PaidInterests = installment.InterestsRepayment;
pAmountPaid -= interestHasToPay;
manualInterestAmount -= interestHasToPay;
}
else
{
pInterestEvent += manualInterestAmount;
installment.PaidInterests += manualInterestAmount;
pAmountPaid -= manualInterestAmount;
manualInterestAmount = 0;
}
PaidIstallments.Add(installment);
}
}
}
}
}