Tuesday, 13 September 2016

Button CLick Dialog

void clicked()
{
   AmountMST InterestCalculatedAmount,InterestAmount,Calculation;
   TransDate Fromdate,todate;
    int noofdays;
   ITLLNCashflowDetails _ITLLNCashflowDetails;
    Dialog dlgName,dialog;
    DialogField DFFromDate,DFToDate,DFInterestCalculatedUpon,DFInterestAMount,FD,TD;
    ;


    dlgName = new dialog();
    DFFromDate = dlgName.addField(extendedTypeStr(Transdate),"From Date");
    DFToDate = dlgName.addField(extendedTypeStr(Transdate),"To Date");
    DFInterestCalculatedUpon =  dlgName.addField(extendedTypeStr(Amount),"Interest Calculated Upon");
    DFInterestAmount  = dlgName.addField(extendedTypeStr(Amount),"Interest Amount");

    super();

     select _ITLLNCashflowDetails order by cashflowdate desc where _ITLLNCashflowDetails.DMno ==  itllndmtable.DMno
                                      && _ITLLNCashflowDetails.InterestCapitalised == NoYes::Yes
                                      && _ITLLNCashflowDetails.Posted == NoYes::Yes;

     if(_ITLLNCashflowDetails)
        DFFromDate.Value((_ITLLNCashflowDetails.PeriodTo)+1);
     else
        DFFromDate.Value((itllndmtable.IntStartDate)+1);
    DFFromDate.allowEdit(false);
    DFToDate.value(endmth(DFFromDate.value()));
    select sum(Amount) from _ITLLNCashflowDetails where _ITLLNCashflowDetails.DMno == ITLLNDMtable.DMno;
    InterestCalculatedAmount = abs(_ITLLNCashflowDetails.Amount);
    DFInterestCalculatedUpon.value(InterestCalculatedAmount);
    DFInterestCalculatedUpon.allowEdit(false);
    noofdays = DFToDate.value() - DFFromDate.value() +1;

    InterestAmount = InterestCalculatedAmount * ITLLNDMtable.InterestRate* noofdays /36500;
    DFInterestAmount.value(InterestAmount);

    if (dlgName.run())

    {

      }



  }

     // this.createJournal(ITLLNDMtable,repaiddate,repaidamount);

No comments:

Post a Comment

POSTMAN D365

  Postman is useful to test the behavior of different OData class from/to D365FO. In this post we will see the steps to setup Postman with D...