TYPE=VIEW
query=select `v`.`date` AS `date`,`b`.`code` AS `acc_no`,`b`.`sub_head` AS `b_sub_head`,0 AS `cr`,0 AS `dr`,`b`.`loan_sub_head` AS `p_sub_head`,if(((`b`.`loan_sub_head` = \'23101A\') or (`b`.`loan_sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,sum(`v`.`cr`) AS `bcr`,sum(`v`.`dr`) AS `bdr` from (`co-operativebank`.`borrowing` `b` join `co-operativebank`.`voucher` `v`) where ((`v`.`sub_head` = `b`.`sub_head`) and (`v`.`Acc_no` = `b`.`code`)) group by `v`.`date`,`b`.`sub_head`,`b`.`date` union all select `v`.`date` AS `date`,`v`.`Acc_no` AS `acc_no`,`v`.`sub_head` AS `b_sub_head`,sum(`v`.`dr`) AS `cr`,sum(`v`.`cr`) AS `dr`,`v`.`sub_head` AS `p_sub_head`,if(((`v`.`sub_head` = \'23101A\') or (`v`.`sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,0 AS `cr`,0 AS `dr` from `co-operativebank`.`voucher` `v` where ((`v`.`date` <= \'2025-11-30\') and ((`v`.`head` = \'23100\') or (`v`.`head` = \'23200\') or (`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or ((`v`.`head` = \'23500\') and (`v`.`head` = \'23600\')))) group by `v`.`sub_head`,`v`.`date`
md5=d58c1ef56db6c66bfd49d3e3d25ec571
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2025-12-04 07:25:48
create-version=1
source=select `v`.`date` AS `date`,`b`.`code` AS `acc_no`,`b`.`sub_head` AS `b_sub_head`,0 AS `cr`,0 AS `dr`,`b`.`loan_sub_head` AS `p_sub_head`,if(((`b`.`loan_sub_head` = \'23101A\') or (`b`.`loan_sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,sum(`v`.`cr`) AS `bcr`,sum(`v`.`dr`) AS `bdr` from (`borrowing` `b` join `voucher` `v`) where ((`v`.`sub_head` = `b`.`sub_head`) and (`v`.`Acc_no` = `b`.`code`)) group by `v`.`date`,`b`.`sub_head`,`b`.`date` union all select `v`.`date` AS `date`,`v`.`Acc_no` AS `acc_no`,`v`.`sub_head` AS `b_sub_head`,sum(`v`.`dr`) AS `cr`,sum(`v`.`cr`) AS `dr`,`v`.`sub_head` AS `p_sub_head`,if(((`v`.`sub_head` = \'23101A\') or (`v`.`sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,0 AS `cr`,0 AS `dr` from `voucher` `v` where ((`v`.`date` <= \'2025-11-30\') and ((`v`.`head` = \'23100\') or (`v`.`head` = \'23200\') or (`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or ((`v`.`head` = \'23500\') and (`v`.`head` = \'23600\')))) group by `v`.`sub_head`,v.date
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `v`.`date` AS `date`,`b`.`code` AS `acc_no`,`b`.`sub_head` AS `b_sub_head`,0 AS `cr`,0 AS `dr`,`b`.`loan_sub_head` AS `p_sub_head`,if(((`b`.`loan_sub_head` = \'23101A\') or (`b`.`loan_sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,sum(`v`.`cr`) AS `bcr`,sum(`v`.`dr`) AS `bdr` from (`co-operativebank`.`borrowing` `b` join `co-operativebank`.`voucher` `v`) where ((`v`.`sub_head` = `b`.`sub_head`) and (`v`.`Acc_no` = `b`.`code`)) group by `v`.`date`,`b`.`sub_head`,`b`.`date` union all select `v`.`date` AS `date`,`v`.`Acc_no` AS `acc_no`,`v`.`sub_head` AS `b_sub_head`,sum(`v`.`dr`) AS `cr`,sum(`v`.`cr`) AS `dr`,`v`.`sub_head` AS `p_sub_head`,if(((`v`.`sub_head` = \'23101A\') or (`v`.`sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,0 AS `cr`,0 AS `dr` from `co-operativebank`.`voucher` `v` where ((`v`.`date` <= \'2025-11-30\') and ((`v`.`head` = \'23100\') or (`v`.`head` = \'23200\') or (`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or ((`v`.`head` = \'23500\') and (`v`.`head` = \'23600\')))) group by `v`.`sub_head`,`v`.`date`
