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-211`.`borrowing` `b` join `co-operativebank-211`.`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-211`.`voucher` `v` where ((`v`.`date` <= \'2026-01-29\') 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=9015ed51900b31973f159c966b6afc2f
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2026-01-29 04:30:36
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` <= \'2026-01-29\') 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=utf8
connection_cl_name=utf8_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-211`.`borrowing` `b` join `co-operativebank-211`.`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-211`.`voucher` `v` where ((`v`.`date` <= \'2026-01-29\') 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`
