Staff Loan Deductions – Fast Formula

Staff Loan Deductions – Fast Formula

No Comments on Staff Loan Deductions – Fast Formula
INPUTS ARE Disbursement_Amount,
Total_Installements,Amt_Paid_So_Far,Installement_So_Far

DEFAULT FOR SALARY_ADVANCE_REPAYMENT_AMOUNT_ENTRY_VALUE IS 0.00

DEFAULT FOR TOTAL_PAYMENTS_ASG_RUN IS 0.00

DEFAULT FOR AMT_PAID_SO_FAR IS 0.00

DEFAULT FOR LOAN_AMT IS 0.00

DEFAULT FOR Total_Installements IS 0.00

DEFAULT FOR Installement_So_Far IS 0.00

Pay_value=0.00

/*IF THE AMOUNT IS FULLY PAID CLOSE THE LOAN*/

IF ( (AMT_PAID_SO_FAR) >= Disbursement_Amount)

THEN
(
STOP_ENTRY = ‘YES’
RETURN STOP_ENTRY
)

 

IF ( (AMT_PAID_SO_FAR) >= Disbursement_Amount)

THEN

(

STOP_ENTRY = ‘YES’

RETURN STOP_ENTRY

)

/*Checking the Loan Amt Paid is less than Disbursement Amount */

IF (AMT_PAID_SO_FAR < Disbursement_Amount)

THEN

(

/* IF THE AMOUNT IS NOT AVAILABLE AS INPUT VALUE THEN GO FOR CALCULATION */

IF (SALARY_ADVANCE_REPAYMENT_AMOUNT_ENTRY_VALUE was defaulted)

THEN

(

message1=’Total installments is ‘+to_char(Total_Installements)

PAY_VALUE=(Disbursement_Amount – Amt_Paid_So_Far)/ (Total_Installements-Installement_So_Far)

)

ELSE

/*IF AN AMOUNT IS ENTERED FOR DEDUCTION FOR THE MONTH TAKE IT*/

(

PAY_VALUE = SALARY_ADVANCE_REPAYMENT_AMOUNT_ENTRY_VALUE

/*IF THE DEDUCTION AMOUNT IS GREATER THAN THE SUME DISBURSEMENT AMOUNT AND MONTHLY EMI */

IF (Disbursement_Amount) < (PAY_VALUE+AMT_PAID_SO_FAR)

THEN

(

PAY_VALUE=Disbursement_Amount-AMT_PAID_SO_FAR

)

)

)

/*IF THE AMOUNT IS NOT AVAILABLE IN THE SALARY FOR DEDUCTION */

if (PAY_VALUE > TOTAL_PAYMENTS_ASG_RUN ) 

then

(PAY_VALUE = TOTAL_PAYMENTS_ASG_RUN)

PAID_SOFAR = AMT_PAID_SO_FAR + PAY_VALUE

Installement_So_Far = Installement_So_Far +1

RETURN PAY_VALUE,PAID_SOFAR,Installement_So_Far,message1

 

About the author:

Leave a comment

Back to Top