× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

SUBROUTINE correction

  • Lenovo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #22432 by Lenovo
SUBROUTINE correction was created by Lenovo
We have the following subroutine that that causing a report to capture No.of.days.overdue wrongly, we've been advised that overdue days and bucket classification is done based on last due date in AA.ACCOUNT.DETAILS, and we need to ensure that this local routine also uses the same logic (oldest BILL.PAY.DATE which is due – TODAY), so the local inquiry is able to display the appropriate details.

Can anyone please support in correcting this routine?

SUBROUTINE GET.OVERDUEDAYS

*Routine to get the Total Overdue Days (Oldest Bill) of a Loan

$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
$INSERT I_F.AA.ARRANGEMENT
$INSERT I_F.AA.ACCOUNT.DETAILS


FN.ACCT.DET = 'F.AA.ACCOUNT.DETAILS'
FV.ACCT.DET = ''
CALL OPF(FN.ACCT.DET,FV.ACCT.DET)


YR.DATA = O.DATA
O.DATA = ""

CALL F.READ(FN.ACCT.DET,YR.DATA,AC.REC,FV.ACCT.DET,ERR1)

Y.STATUS = AC.REC<AA.AD.ARR.AGE.STATUS>

IF Y.STATUS NE 'CUR' THEN
Y.BILDATES = AC.REC<AA.AD.BILL.PAY.DATE>
Y.BILSTATUS = AC.REC<AA.AD.BILL.STATUS>

JJ = DCOUNT(Y.BILDATES,@VM)

FOR I=1 TO JJ

Y.BILL.DATE = FIELD(Y.BILDATES ,@VM,I)
Y.BILL.STATUS = FIELD(Y.BILSTATUS ,@VM,I)

IF (Y.BILL.DATE NE '') AND (Y.BILL.STATUS NE 'SETTLED') THEN
DAYS = "C"
CALL CDD("",TODAY,Y.BILL.DATE,DAYS)
Y.DAYS = ABS(DAYS)
I=JJ
END
NEXT I
O.DATA = Y.DAYS :"*": Y.BILL.DATE
END

RETURN
END

Please Log in or Create an account to join the conversation.

  • Lenovo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #22433 by Lenovo
Replied by Lenovo on topic SUBROUTINE correction
Please support on this urgent matter

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds