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

Charge routine

More
2 months 1 week ago #24635 by elie
Charge routine was created by elie
Dears,

I need to define a CHARGE.ROUTINE on the level of FT.COMMISSION.TYPE. Hence i wasnt able to find any exemple or a help for the routine structure.
Does anyone has any routine that could help me creates my own?
I was able to create one but unable to revert the result back from it.
Kindly assist

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

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
2 months 1 week ago #24637 by jpb

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

  • silvergem
  • silvergem's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • TAFC|R12/R13, TAFJ|R20
More
2 months 1 week ago #24638 by silvergem
Replied by silvergem on topic Charge routine
Here is another example
****************************************************************
* VERSION             : 1.0                          
* DATE CREATED        : 05-Mar-2021
* DESCRIPTION         : Calculate the Accrued interest based on percentage defined at FT.COMMISSION.TYPE Application                            
SUBROUTINE XXX.FEE.BASED.INT.ACCRUAL(CUSTOMER.ID,Y.DEAL.AMOUNT,Y.DEAL.CCY,Y.CCY.MKT,Y.CROSS.RATE,Y.CROSS.CCY,Y.DWN.CCY,Y.PASS.DATA,Y.CUST.CDN,Y.CHARGE.AMOUNT)
 
    $INSERT ../T24_BP I_COMMON
    $INSERT ../T24_BP I_EQUATE
    $INSERT ../T24_BP I_F.LMM.ACCOUNT.BALANCES
    $INSERT ../T24_BP I_F.FT.COMMISSION.TYPE

    GOSUB INIT
    GOSUB READ.FILES
    GOSUB PROCESS

RETURN
 
INIT:
    FN.LMM.ACCOUNT.BALANCES = 'F.LMM.ACCOUNT.BALANCES'
    FV.LMM.ACCOUNT.BALANCES = ''
    CALL OPF(FN.LMM.ACCOUNT.BALANCES,FV.LMM.ACCOUNT.BALANCES)

    FN.FT.COMM.TYPE         = 'F.FT.COMMISSION.TYPE'
    FV.FT.COMM.TYPE         = ''
    CALL OPF(FN.FT.COMM.TYPE, FV.FT.COMM.TYPE)

    Y.ID.LMM                = ID.NEW : "00"
    Y.ID.FT.COM             = Y.PASS.DATA<1>
RETURN

READ.FILES:
    CALL F.READ(FN.LMM.ACCOUNT.BALANCES,Y.ID.LMM,R.LMM.ACCOUNT.BALANCES,FV.LMM.ACCOUNT.BALANCES,LMM.ERR)    
    Y.ACCRUED.INT.PAY = R.LMM.ACCOUNT.BALANCES<LD27.OUTS.CUR.ACC.I.PAY>

    CALL F.READ(FN.FT.COMM.TYPE,Y.ID.FT.COM,R.FT.COMM.TYPE,FV.FT.COMM.TYPE,FT.ERR)
RETURN

PROCESS:
    IF NOT(LMM.ERR AND FT.ERR) AND Y.DEAL.CCY THEN
        LOCATE Y.DEAL.CCY IN R.FT.COMM.TYPE<FT4.CURRENCY,1> SETTING CCY.IDX THEN
            Y.CCY.FIX.AMT    = R.FT.COMM.TYPE<FT4.FLAT.AMT,CCY.IDX>
            Y.CCY.PERCENTAGE = R.FT.COMM.TYPE<FT4.PERCENTAGE,CCY.IDX>
        END

        IF CCY.IDX NE 0 THEN
            Y.CHARGE.AMOUNT = Y.ACCRUED.INT.PAY * (Y.CCY.PERCENTAGE / 100)
        END
    END
RETURN

END

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

Time to create page: 0.085 seconds