void clicked()
{
AmountMST InterestCalculatedAmount,Inter estAmount,Calculation;
TransDate Fromdate,todate;
int noofdays;
ITLLNCashflowDetails _ITLLNCashflowDetails;
Dialog dlgName,dialog;
DialogField DFFromDate,DFToDate,DFInterest CalculatedUpon,DFInterestAMoun t,FD,TD;
;
dlgName = new dialog();
DFFromDate = dlgName.addField(extendedTypeS tr(Transdate),"From Date");
DFToDate = dlgName.addField(extendedTypeS tr(Transdate),"To Date");
DFInterestCalculatedUpon = dlgName.addField(extendedType Str(Amount),"Interest Calculated Upon");
DFInterestAmount = dlgName.addField(extendedTypeS tr(Amount),"Interest Amount");
super();
select _ITLLNCashflowDetails order by cashflowdate desc where _ITLLNCashflowDetails.DMno == itllndmtable.DMno
&& _ITLLNCashflowDetails.Interest Capitalised == NoYes::Yes
&& _ITLLNCashflowDetails.Posted == NoYes::Yes;
if(_ITLLNCashflowDetails)
DFFromDate.Value((_ITLLNCashfl owDetails.PeriodTo)+1);
else
DFFromDate.Value((itllndmtable .IntStartDate)+1);
DFFromDate.allowEdit(false);
DFToDate.value(endmth(DFFromDa te.value()));
select sum(Amount) from _ITLLNCashflowDetails where _ITLLNCashflowDetails.DMno == ITLLNDMtable.DMno;
InterestCalculatedAmount = abs(_ITLLNCashflowDetails.Amou nt);
DFInterestCalculatedUpon.value (InterestCalculatedAmount);
DFInterestCalculatedUpon.allow Edit(false);
noofdays = DFToDate.value() - DFFromDate.value() +1;
InterestAmount = InterestCalculatedAmount * ITLLNDMtable.InterestRate* noofdays /36500;
DFInterestAmount.value(Interes tAmount);
if (dlgName.run())
{
}
}
// this.createJournal(ITLLNDMtabl e,repaiddate,repaidamount);
No comments:
Post a Comment