TYPE=VIEW
query=select `sh`.`sub_head` AS `sub_head`,`b`.`date` AS `open_date`,`b`.`code` AS `acc_no`,`b`.`Amt` AS `amt`,(sum(`v`.`cr`) - sum(`v`.`dr`)) AS `cler_bal`,`b`.`interest` AS `interest`,round((((sum(`v`.`cr`) - sum(`v`.`dr`)) * (timestampdiff(DAY,max(`v`.`date`),\'2025-11-20\') / 365)) * (`b`.`interest` / 100)),0) AS `Int_pay`,timestampdiff(DAY,max(`v`.`date`),\'2025-11-20\') AS `days` from `co-operativebank-198`.`borrowing1` `b` join `co-operativebank-198`.`voucher` `v` join `co-operativebank-198`.`sub_head` `sh` where ((`v`.`Acc_no` = `b`.`code`) and (`sh`.`code` = `v`.`sub_head`) and (`sh`.`code` = `b`.`sub_head`) and (`v`.`date` <= \'2025-11-19\')) group by `b`.`code`
md5=08b7fc9abdf7f1414f4ee83ed439d665
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=2
with_check_option=0
timestamp=2025-11-19 05:40:50
create-version=1
source=SELECT sh.sub_head,b.date as open_date,b.code as acc_no,b.amt,sum(v.cr)-sum(v.dr) as cler_bal,b.interest,round((sum(v.cr)-sum(dr))*(timestampdiff(day,max(v.date),\'2025-11-20\')/365)*(b.interest/100)) as Int_pay,timestampdiff(day,max(v.date),\'2025-11-20\') as days  FROM `borrowing1` B, VOUCHER V,sub_head sh WHERE V.acc_no=b.code and sh.code=v.sub_head and sh.code=b.sub_head and v.date<=\'2025-11-19\' group by b.code
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `sh`.`sub_head` AS `sub_head`,`b`.`date` AS `open_date`,`b`.`code` AS `acc_no`,`b`.`Amt` AS `amt`,(sum(`v`.`cr`) - sum(`v`.`dr`)) AS `cler_bal`,`b`.`interest` AS `interest`,round((((sum(`v`.`cr`) - sum(`v`.`dr`)) * (timestampdiff(DAY,max(`v`.`date`),\'2025-11-20\') / 365)) * (`b`.`interest` / 100)),0) AS `Int_pay`,timestampdiff(DAY,max(`v`.`date`),\'2025-11-20\') AS `days` from `co-operativebank-198`.`borrowing1` `b` join `co-operativebank-198`.`voucher` `v` join `co-operativebank-198`.`sub_head` `sh` where ((`v`.`Acc_no` = `b`.`code`) and (`sh`.`code` = `v`.`sub_head`) and (`sh`.`code` = `b`.`sub_head`) and (`v`.`date` <= \'2025-11-19\')) group by `b`.`code`
