TYPE=VIEW
query=select `la`.`acc_no` AS `acc_no`,`la`.`name` AS `name`,`la`.`father_name` AS `father_name`,`la`.`address` AS `address`,`la`.`mobile` AS `mobile`,`li`.`issue_date` AS `issue_date`,`li`.`loan_amt` AS `loan_amt`,concat(`li`.`ins_type`,\' [ \',`li`.`duration`,`li`.`duration_type`,\' ]\') AS `ist_type`,round((`li`.`loan_amt` / `li`.`loan_inst`),0) AS `inst_ant`,`li`.`imst_date` AS `due_date`,if((`li`.`tdate` <= `li`.`fianl_date`),0,`li`.`clear_amt`) AS `od_amt`,`li`.`clear_amt` AS `clear_amt`,round(if((`li`.`tdate` <= `li`.`fianl_date`),0,(((((`li`.`clear_amt` * (`li`.`od_days` / 365)) * (`li`.`od_int` / 100)) + ((`li`.`clear_amt` * (`li`.`cc_days` / 365)) * (`li`.`cc_int` / 100))) + `li`.`cc_int_due`) + `li`.`od_int_due`)),0) AS `od_int_a`,round(if((`li`.`tdate` <= `li`.`fianl_date`),((((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`cc_int` / 100)) + `li`.`cc_int_due`) + `li`.`od_int_due`),0),0) AS `cc_int_a`,if((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 21),`li`.`clear_amt`,0) AS `standard`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 21) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 36)),`li`.`clear_amt`,0) AS `sub_standard`,0 AS `r_value`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 36) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 48)),`li`.`clear_amt`,0) AS `d1`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 48) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 72)),`li`.`clear_amt`,0) AS `d2`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 72) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 111111111111111108)),`li`.`clear_amt`,0) AS `d3`,0 AS `unsecure`,0 AS `loss`,`li`.`days` AS `days` from `co-operativebank-kutubpur`.`loan_inf` `li` join `co-operativebank-kutubpur`.`loan_account` `la` where ((`la`.`acc_no` = `li`.`acc_no`) and (`li`.`clear_amt` >= 0) and (`li`.`clear_amt` <> 0)) group by `li`.`acc_no`
md5=4aa403c8c88628572b769012686e45ae
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2026-02-17 11:53:55
create-version=1
source=SELECT la.acc_no,la.name,la.father_name,la.address,la.mobile,li.issue_date,li.loan_amt,concat(li.ins_type,\' [ \',li.duration,li.duration_type,\' ]\') as ist_type,round(loan_amt/loan_inst) as inst_ant,imst_date as due_date,(if(tdate<=li.fianl_date,0,clear_amt)) as od_amt,clear_amt,round(if(tdate<=li.fianl_date,0,clear_amt*(od_days/365)*(li.od_int/100)+clear_amt*(cc_days/365)*(cc_int/100)+cc_int_due+od_int_due)) as od_int_a,round(if(tdate<=li.fianl_date,clear_amt*(days/365)*(cc_int/100)+cc_int_due+od_int_due,0)) as cc_int_a,if(timestampdiff(MONTH,li.fianl_date,tdate)<21,clear_amt,0) as standard ,if(timestampdiff(MONTH,li.fianl_date,tdate)>=21 and timestampdiff(MONTH,li.fianl_date,tdate)<36,clear_amt,0) as sub_standard,0 as r_value,if(timestampdiff(MONTH,li.fianl_date,tdate)>=36 and timestampdiff(MONTH,li.fianl_date,tdate)<48,clear_amt,0) as d1,if(timestampdiff(MONTH,li.fianl_date,tdate)>=48 and timestampdiff(MONTH,li.fianl_date,tdate)<72,clear_amt,0) as d2,if(timestampdiff(MONTH,li.fianl_date,tdate)>=72 and timestampdiff(MONTH,li.fianl_date,tdate)<111111111111111108 ,clear_amt,0) as d3,0 as unsecure,0 as loss,li.days as days  FROM loan_inf li,loan_account la WHERE la.acc_no=li.acc_no and li.clear_amt>=0 and li.clear_amt<>0 group by li.acc_no
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `la`.`acc_no` AS `acc_no`,`la`.`name` AS `name`,`la`.`father_name` AS `father_name`,`la`.`address` AS `address`,`la`.`mobile` AS `mobile`,`li`.`issue_date` AS `issue_date`,`li`.`loan_amt` AS `loan_amt`,concat(`li`.`ins_type`,\' [ \',`li`.`duration`,`li`.`duration_type`,\' ]\') AS `ist_type`,round((`li`.`loan_amt` / `li`.`loan_inst`),0) AS `inst_ant`,`li`.`imst_date` AS `due_date`,if((`li`.`tdate` <= `li`.`fianl_date`),0,`li`.`clear_amt`) AS `od_amt`,`li`.`clear_amt` AS `clear_amt`,round(if((`li`.`tdate` <= `li`.`fianl_date`),0,(((((`li`.`clear_amt` * (`li`.`od_days` / 365)) * (`li`.`od_int` / 100)) + ((`li`.`clear_amt` * (`li`.`cc_days` / 365)) * (`li`.`cc_int` / 100))) + `li`.`cc_int_due`) + `li`.`od_int_due`)),0) AS `od_int_a`,round(if((`li`.`tdate` <= `li`.`fianl_date`),((((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`cc_int` / 100)) + `li`.`cc_int_due`) + `li`.`od_int_due`),0),0) AS `cc_int_a`,if((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 21),`li`.`clear_amt`,0) AS `standard`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 21) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 36)),`li`.`clear_amt`,0) AS `sub_standard`,0 AS `r_value`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 36) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 48)),`li`.`clear_amt`,0) AS `d1`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 48) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 72)),`li`.`clear_amt`,0) AS `d2`,if(((timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) >= 72) and (timestampdiff(MONTH,`li`.`fianl_date`,`li`.`tdate`) < 111111111111111108)),`li`.`clear_amt`,0) AS `d3`,0 AS `unsecure`,0 AS `loss`,`li`.`days` AS `days` from `co-operativebank-kutubpur`.`loan_inf` `li` join `co-operativebank-kutubpur`.`loan_account` `la` where ((`la`.`acc_no` = `li`.`acc_no`) and (`li`.`clear_amt` >= 0) and (`li`.`clear_amt` <> 0)) group by `li`.`acc_no`
