Published on : July 13, 2020

What is Sanction Amount?
Sets the Range for the Sanction Amount and Validates whether the Provided Sanction Amount is Valid or Not

Service Used: sublan_eligibility.sanction_amount

Keys used in this section are

required
Sanction amount required or notInteger  
minMinimum allowed sanction amount for productInteger
max
Maximum allowed sanction amount for productInteger
outer_max
Outer max range for the productInteger
fixedFixed Sanction amount value Integer
defaultdefault Sanction amount valueInteger
sanction_amount_foir
Sanction amount foirInteger
sanction_amount_bai (for self-employed)
Sanction amount business annual incomeInteger
sanction_amount_bms (for self-employed)
Sanction amount BMSInteger
sanction_amount_city
Sanction amount cityInteger
sanction_amount_ltv
Sanction amount ltvInteger
deviation
DeviationVarchar
inc
The Increments in which the sanction amount can be givenInteger

Logic: Validate Sanction amount

input_sanction_amount 
---------------
get the sanction amount from loan details

required
------------
default= 'calc'
Can be overwritten by rtsettings object

max
----------------
calculated current_max value

outer_max
-----------------
Outer max range for the product

initial_max
---------------
Get max from settings if present OR
Get outer_min from settings if present OR
min (max, outer_max)

deviation_max
---------------
default= min (max, outer_max)
else get it from settings.

min
----------
Get min from settings if present OR
Get outer_min from settings if present OR
max (min, outer_min)

outer_min
-------------
Outer minrange for the product

deviation_min
---------------
default= max (min, outer_min)
else get it from settings.

fixed
----------------
sanction_amount = Calculate if sanction amount is not set and fixed is present in the settings

default
-------------
sanction_amount = Calculate if sanction amount is not set and default is present in the settings

sanction_amount_foir
-------------------
min (sanction_amount_foir, current_max value)

sanction_amount_bai
-------------------
min (sanction_amount_bai, current_max value )

sanction_amount_bms
-------------------
min (sanction_amount_bms, current_max value)

sanction_amount_city
-------------------
min (sanction_amount_city , current_max value)

sanction_amount_ltv
-------------------
min (sanction_amount_ltv , current_max value)

sanction_amount_doc_combo
-------------------
min (sanction_amount_doc_combo , current_max value)

available_credit_limit
min (available_credit_limit, current_max value)

deviation
---------------
either yes or no
it can be overwritten by rtsettings

sanction_amount
--------------
if sanction amount is not present, set to current min

deviation_on_sanction_amount
---------------
either yes or no
it can be overwritten by rtsettings

inc
Get inc from settings

sanction_amount_first
----------------
calculated current min value

sanction_amount_last
-----------------
Amount calculated by adding 'inc' into current minimum value

Output :

 "sanction_amount"           =>  array(21) 
[
"debug" => array(1)
"input_sanction_amount" => string(5) "50000"
"required" => string(3) "yes"
"initial_max" => int(1000000)
"deviation_max" => int(1000000)
"min" => int(50000)
"deviation_min" => int(50000)
"sanction_amount_foir" => float(984507)
"sanction_amount_doc_combo" => float(984507)
"available_credit_limit" => string(10) "1000000.00"
"max" => float(984507)
"deviation" => string(2) "no"
"sanction_amount" => float(50000)
"deviation_on_sanction_amount" => string(2) "no"
"inc" => int(25000)
"sanction_amount_first" => int(50000)
"sanction_amount_last" => int(975000)
"sanction_amounts" => array(38)
[
50000 => int(50000)
75000 => int(75000)
100000 => int(100000)
125000 => int(125000)
150000 => int(150000)
175000 => int(175000)
200000 => int(200000)
225000 => int(225000)
250000 => int(250000)
275000 => int(275000)
300000 => int(300000)
325000 => int(325000)
350000 => int(350000)
375000 => int(375000)
400000 => int(400000)
425000 => int(425000)
450000 => int(450000)
475000 => int(475000)
500000 => int(500000)
525000 => int(525000)
550000 => int(550000)
575000 => int(575000)
600000 => int(600000)
625000 => int(625000)
650000 => int(650000)
675000 => int(675000)
700000 => int(700000)
725000 => int(725000)
750000 => int(750000)
775000 => int(775000)
800000 => int(800000)
825000 => int(825000)
850000 => int(850000)
875000 => int(875000)
900000 => int(900000)
925000 => int(925000)
950000 => int(950000)
975000 => int(975000)
]
"adjusted_sanction_amount" => int(975000)
"status" => string(7) "success"
"message" => string(26) "sanction amount calculated"
]

Visual Output: