- Forum
- T24 Technical Discussions
- T24 Development & Customization
- Routine to calculate number of days in arrears,
×
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...
Routine to calculate number of days in arrears,
- Winfred_Lubega
- Topic Author
- Offline
- Senior Member
-
- Me
Less
More
- Posts: 52
- Thank you received: 0
8 years 7 months ago #20587
by Winfred_Lubega
Routine to calculate number of days in arrears, was created by Winfred_Lubega
Please help with a routine for calculating number of days in arrears and number of missed payments
Please Log in or Create an account to join the conversation.
- madhulatha
-
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 6
8 years 4 months ago #20965
by madhulatha
Replied by madhulatha on topic Routine to calculate number of days in arrears,
CDT: Description Calculates forward or previous date from a start date using the number of days. Arguments (REGION, DATE, DAYS)
Incoming: REGION Region code
DATE Start date, YYYYMMDD
DAYS The number of days forward in the format + or -, the number of days, working or calendar
eg : +99C, -6W, +66W+3C
Returned: DATE The calculated date
ETEXT Error message if unsuccessful
Example: Y.DATE='20130225', DAYS='+2C' ,REGION =''
CALL CDT(REGION,Y.DATE,DAYS)
Incoming: REGION Region code
DATE Start date, YYYYMMDD
DAYS The number of days forward in the format + or -, the number of days, working or calendar
eg : +99C, -6W, +66W+3C
Returned: DATE The calculated date
ETEXT Error message if unsuccessful
Example: Y.DATE='20130225', DAYS='+2C' ,REGION =''
CALL CDT(REGION,Y.DATE,DAYS)
Please Log in or Create an account to join the conversation.
- VK
-
- Offline
- Platinum Member
-
- Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
Less
More
- Posts: 1209
- Thank you received: 158
8 years 4 months ago #20967
by VK
Cheers
VK
Replied by VK on topic Routine to calculate number of days in arrears,
Hi
I afraid that's not what the topic starter wants... He needs to translate the business requirements "output number of days in arrears and number of missed payments" into the technical solution... Before calculating the difference its necessary to understand where to get the date for calculation...
Unfortunately I can't be of help here.
I afraid that's not what the topic starter wants... He needs to translate the business requirements "output number of days in arrears and number of missed payments" into the technical solution... Before calculating the difference its necessary to understand where to get the date for calculation...
Unfortunately I can't be of help here.
Cheers
VK
Please Log in or Create an account to join the conversation.
- concern
-
- Offline
- Premium Member
-
- R20 | TAFJ | ORACLE
Less
More
- Posts: 89
- Thank you received: 4
4 years 5 days ago #23372
by concern
Replied by concern on topic Routine to calculate number of days in arrears,
Did you get the routine name? I am also looking for it.
Please Log in or Create an account to join the conversation.
- silvergem
-
- Offline
- Elite Member
-
- TAFC|R12/R13, TAFJ|R20
Less
More
- Posts: 270
- Thank you received: 21
4 years 7 hours ago #23384
by silvergem
Replied by silvergem on topic Routine to calculate number of days in arrears,
The core function for days calculation is CDT and CDD, but getting the missed payment is another thing
Please Log in or Create an account to join the conversation.
- chanthachantha
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
3 years 9 months ago #23451
by chanthachantha
Replied by chanthachantha on topic Routine to calculate number of days in arrears,
Example:
Start date: 20210909
End date: 20250909
How to calculate number of day include with working and holiday?
Start date: 20210909
End date: 20250909
How to calculate number of day include with working and holiday?
Please Log in or Create an account to join the conversation.
- silvergem
-
- Offline
- Elite Member
-
- TAFC|R12/R13, TAFJ|R20
Less
More
- Posts: 270
- Thank you received: 21
3 years 9 months ago - 3 years 9 months ago #23452
by silvergem
Replied by silvergem on topic Routine to calculate number of days in arrears,
You may refer for dates routines on this one
t24 subroutines: t24 subroutine
. You can use CDD which return DATES difference for both working and calendar days. You can subtract the calendar to working days to get the actual difference. to calculate the holiday, you can count all holiday on HOLIDAY table
PROGRAM BUH.DAYS
$INSERT ../T24_BP I_COMMON
$INSERT ../T24_BP I_EQUATE
$INSERT ../T24_BP I_F.DATES
CALL LOAD.COMPANY ('BNK')
Y.DATE.S = "20210909"
Y.DATE.E = "20250909"
DAYS = "W"
GOSUB CHECK.DIFF
DAYS.WORKING = DAYS
DAYS = "C"
GOSUB CHECK.DIFF
DAYS.CALENDAR = DAYS
CRT "WORKING DAYS " : DAYS.WORKING
CRT "CALENDAR DAYS " : DAYS.CALENDAR
CRT "DIFFERENCE " : DAYS.CALENDAR - DAYS.WORKING
RETURN
CHECK.DIFF:
REGION = ""
CALL CDD (REGION, Y.DATE.S, Y.DATE.E, DAYS)
RETURN
END
Last edit: 3 years 9 months ago by silvergem.
Please Log in or Create an account to join the conversation.
- Forum
- T24 Technical Discussions
- T24 Development & Customization
- Routine to calculate number of days in arrears,
Time to create page: 0.048 seconds