× 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...

Help with FT reversal and authorisation

  • craigs24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 months 2 weeks ago #24147 by craigs24
Help with FT reversal and authorisation was created by craigs24
Hi, im currently trying to work on a piece of code that checks if an FT has been authorised and reversed on the same day. Currently there is an extract being populated with FTs and this criteria needs to be added to remove from extract. Im trying to read the latest history record and complete this. Please see below code snippet. Any help/guidance is appreciated.

        CALL EB.READ.HISTORY.REC(F.FUNDS.TRANSFER.HIS,Y.FT.ID,R.FT.hist.rec,YERROR)
        
        IF R.FT.hist.rec<FT.RECORD.STATUS> EQ 'REVE' AND R.FT.hist.rec<FT.AUTH.DATE> EQ TODAY THEN
            RETURN
        END ELSE

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
More
11 months 2 weeks ago #24148 by VK
Hi
firstly, your code checks if a record was authorised today, so it won't work on earlier dates...

You have the AUTH.DATE but to learn when a record was reversed you only have DATE.TIME... and the date there can differ from the bank date.
 

Cheers
VK

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

  • craigs24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 months 2 weeks ago #24149 by craigs24
Replied by craigs24 on topic Help with FT reversal and authorisation
Thanks for the reply VK.

So what would the correct way to do this then if the DATE.TIME field contains the actual date rather than the system date?
Im trying to test on a system which is dated at the 4th May, meaning when it will be authorized and reversed on the 4th may in t24, however DATE.TIME will be 31st may.
I was using TODAY variable as i thought it would give the t24 system date and if that was = AUTH.DATE then it would work.
This will also be used in a production environment going forward.

Im trying to check if the transaction was reversed and authorised on the same day and to not populate in extract.

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
More
11 months 2 weeks ago #24150 by VK
Hi
you can use TODAY if you run this every day and save results somewhere.

An alternate way can be to attach a routine to VERSION.CONTROL for FT and on reverse save the bank date, say, to a local field or (if it's not possible to save it directly to FT record  - to a separate table).
 

Cheers
VK

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

  • craigs24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 months 2 weeks ago #24151 by craigs24
Replied by craigs24 on topic Help with FT reversal and authorisation
Hi, yeah it runs everyday as part of COB. Currently ive created a service and batch to produce online so i can test easier in staging but even after i make the change and compile, the extract is still populating when it shouldnt be.

I tried using AUTH.DATE and also tried PROCESSING.DATE like below:

CALL EB.READ.HISTORY.REC(F.FUNDS.TRANSFER.HIS,Y.FT.ID,R.FT.hist.rec,YERROR)

IF R.FT.hist.rec<FT.RECORD.STATUS> EQ 'REVE' AND R.FT.hist.rec<FT.PROCESSING.DATE> EQ TODAY THEN
RETURN
END ELSE

Any idea why it wouldnt work? Assuming Today returns the t24 system date which is the 4th May, the FTs are also the 4th May for both Auth and Processing dates.

Thank you

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
More
11 months 2 weeks ago #24152 by VK
hi
hard to guess..
Try to run your service in DEBUG mode and see what variables' contents from your IF are...
 

Cheers
VK

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

  • craigs24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 months 2 weeks ago #24153 by craigs24
Replied by craigs24 on topic Help with FT reversal and authorisation
Thanks VK, yeah the variable Y.FT.ID was never assigned. Have fixed now.
Currently having a problem with the extract producing over and over again until I manually stop the service so something not right in the code.

Thanks again

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

Time to create page: 0.120 seconds