Published on : July 10, 2020

What is bullet details
Sets the Range for the Bullet Details and Validates whether the Provided Bullet Details is Valid or Not

Service Used: sublan_eligibility.bullet_details

Keys used in this section are

collect
Bullet Collection ValueVarchar
method
Bullect collection periodVarchar  

Logic: Validate Bullet Details

collect
----------

1. schedule
2. Ondemand – not used
3. no
if collection value is not present set it to schedule

method
-----------

Bullet collection period
1. every_n_month
2. full_end
check the method against the settings and work on calculations

each_month
-------------
Bullet collection after each month
If method is every_n_month

start_date
-----------
Bullet collection start date
calculate date from start date and get the first date of previous month

end_date
----------
Bullet collection end date

generated_date
-------------
Sublan setup date

bullet_months
--------------
if the method is every_n_month and months is not present, return error

bullet_amount
--------------
Generate bullet amount by using no of bullet instalments

bbal
--------------
Bullet balance amount
Generate bullet amount by using no of bullet instalments

bullets_total
--------------
Total no of bullets

Output :

"bullet_details"            =>  array(16) 
[
"debug" => array(1)
"skip" => string(2) "no"
"collect" => string(8) "schedule"
"method" => string(13) "every_n_month"
"each_month" => int(6)
"no_of_instalments" => float(10)
"bullet_amount" => float(100000)
"bbal" => float(100000)
"schedule" => array(10)
"start_date" => string(8) "20210201"
"end_date" => string(8) "20250801"
"bullet_months" => int(6)
"bullets_total" => int(10)
"generated_date" => string(8) "20200710"
"status" => string(7) "success"
"message" => string(18) "bullets calculated"
]

Visual Output :