TYPE=VIEW
query=select `co-operativebank-242`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-242`.`head`.`code` AS `code`,`co-operativebank-242`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-242`.`voucher`.`dr`) - sum(`co-operativebank-242`.`voucher`.`cr`)) AS `bal` from (((`co-operativebank-242`.`voucher` join `co-operativebank-242`.`sub_head`) join `co-operativebank-242`.`head`) join `co-operativebank-242`.`head_type`) where ((`co-operativebank-242`.`voucher`.`sub_head` = `co-operativebank-242`.`sub_head`.`code`) and (`co-operativebank-242`.`sub_head`.`head` = `co-operativebank-242`.`head`.`code`) and (`co-operativebank-242`.`head`.`head_type` = `co-operativebank-242`.`head_type`.`code`) and (((`co-operativebank-242`.`voucher`.`sub_head` > \'60000\') and (`co-operativebank-242`.`voucher`.`sub_head` < \'70000\')) or (`co-operativebank-242`.`head_type`.`code` = \'23000\') or (`co-operativebank-242`.`head_type`.`code` = \'21000\')) and (`co-operativebank-242`.`voucher`.`date` < \'2016-04-01\')) group by `co-operativebank-242`.`voucher`.`sub_head` union all select `co-operativebank-242`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-242`.`head`.`code` AS `code`,`co-operativebank-242`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-242`.`voucher`.`cr`) - sum(`co-operativebank-242`.`voucher`.`dr`)) AS `(sum(cr)-sum(dr))` from (((`co-operativebank-242`.`voucher` join `co-operativebank-242`.`sub_head`) join `co-operativebank-242`.`head`) join `co-operativebank-242`.`head_type`) where ((`co-operativebank-242`.`voucher`.`sub_head` = `co-operativebank-242`.`sub_head`.`code`) and (`co-operativebank-242`.`sub_head`.`head` = `co-operativebank-242`.`head`.`code`) and (`co-operativebank-242`.`head`.`head_type` = `co-operativebank-242`.`head_type`.`code`) and (`co-operativebank-242`.`voucher`.`date` < \'2016-04-01\') and ((`co-operativebank-242`.`head_type`.`code` = \'22000\') or (`co-operativebank-242`.`head_type`.`code` = \'28000\'))) group by `co-operativebank-242`.`voucher`.`sub_head`
md5=83b6199968a43d417e747ff16ae1b576
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=1
with_check_option=0
timestamp=2025-09-15 05:24:36
create-version=1
source=select  `co-operativebank-242`.`voucher`.`sub_head`  AS  `sub_head` ,\n `co-operativebank-242`.`head`.`code`  AS  `code` ,\n `co-operativebank-242`.`head_type`.`code`  AS  `head_type` ,\n( sum(  `co-operativebank-242`.`voucher`.`dr`  )  - sum(  `co-operativebank-242`.`voucher`.`cr`  )  ) AS  `bal`  from ( ( (  `co-operativebank-242`.`voucher`  join  `co-operativebank-242`.`sub_head`  ) join  `co-operativebank-242`.`head`  ) join  `co-operativebank-242`.`head_type`  ) where ( (  `co-operativebank-242`.`voucher`.`sub_head`  =  `co-operativebank-242`.`sub_head`.`code`  ) and (  `co-operativebank-242`.`sub_head`.`head`  =  `co-operativebank-242`.`head`.`code`  ) and (  `co-operativebank-242`.`head`.`head_type`  =  `co-operativebank-242`.`head_type`.`code`  ) and ( ( (  `co-operativebank-242`.`voucher`.`sub_head`  >  \'60000\' ) and (  `co-operativebank-242`.`voucher`.`sub_head`  <  \'70000\' ) ) or (  `co-operativebank-242`.`head_type`.`code`  =  \'23000\' ) or (  `co-operativebank-242`.`head_type`.`code`  =  \'21000\' ) ) and (  `co-operativebank-242`.`voucher`.`date`  <  \'2016-04-01\' ) ) group  by  `co-operativebank-242`.`voucher`.`sub_head`  union  all  select  `co-operativebank-242`.`voucher`.`sub_head`  AS  `sub_head` ,\n `co-operativebank-242`.`head`.`code`  AS  `code` ,\n `co-operativebank-242`.`head_type`.`code`  AS  `head_type` ,\n( sum(  `co-operativebank-242`.`voucher`.`cr`  )  - sum(  `co-operativebank-242`.`voucher`.`dr`  )  ) AS  `(sum(cr)-sum(dr))`  from ( ( (  `co-operativebank-242`.`voucher`  join  `co-operativebank-242`.`sub_head`  ) join  `co-operativebank-242`.`head`  ) join  `co-operativebank-242`.`head_type`  ) where ( (  `co-operativebank-242`.`voucher`.`sub_head`  =  `co-operativebank-242`.`sub_head`.`code`  ) and (  `co-operativebank-242`.`sub_head`.`head`  =  `co-operativebank-242`.`head`.`code`  ) and (  `co-operativebank-242`.`head`.`head_type`  =  `co-operativebank-242`.`head_type`.`code`  ) and (  `co-operativebank-242`.`voucher`.`date`  <  \'2016-04-01\' ) and ( (  `co-operativebank-242`.`head_type`.`code`  =  \'22000\' ) or (  `co-operativebank-242`.`head_type`.`code`  =  \'28000\' ) ) ) group  by  `co-operativebank-242`.`voucher`.`sub_head`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `co-operativebank-242`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-242`.`head`.`code` AS `code`,`co-operativebank-242`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-242`.`voucher`.`dr`) - sum(`co-operativebank-242`.`voucher`.`cr`)) AS `bal` from (((`co-operativebank-242`.`voucher` join `co-operativebank-242`.`sub_head`) join `co-operativebank-242`.`head`) join `co-operativebank-242`.`head_type`) where ((`co-operativebank-242`.`voucher`.`sub_head` = `co-operativebank-242`.`sub_head`.`code`) and (`co-operativebank-242`.`sub_head`.`head` = `co-operativebank-242`.`head`.`code`) and (`co-operativebank-242`.`head`.`head_type` = `co-operativebank-242`.`head_type`.`code`) and (((`co-operativebank-242`.`voucher`.`sub_head` > \'60000\') and (`co-operativebank-242`.`voucher`.`sub_head` < \'70000\')) or (`co-operativebank-242`.`head_type`.`code` = \'23000\') or (`co-operativebank-242`.`head_type`.`code` = \'21000\')) and (`co-operativebank-242`.`voucher`.`date` < \'2016-04-01\')) group by `co-operativebank-242`.`voucher`.`sub_head` union all select `co-operativebank-242`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-242`.`head`.`code` AS `code`,`co-operativebank-242`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-242`.`voucher`.`cr`) - sum(`co-operativebank-242`.`voucher`.`dr`)) AS `(sum(cr)-sum(dr))` from (((`co-operativebank-242`.`voucher` join `co-operativebank-242`.`sub_head`) join `co-operativebank-242`.`head`) join `co-operativebank-242`.`head_type`) where ((`co-operativebank-242`.`voucher`.`sub_head` = `co-operativebank-242`.`sub_head`.`code`) and (`co-operativebank-242`.`sub_head`.`head` = `co-operativebank-242`.`head`.`code`) and (`co-operativebank-242`.`head`.`head_type` = `co-operativebank-242`.`head_type`.`code`) and (`co-operativebank-242`.`voucher`.`date` < \'2016-04-01\') and ((`co-operativebank-242`.`head_type`.`code` = \'22000\') or (`co-operativebank-242`.`head_type`.`code` = \'28000\'))) group by `co-operativebank-242`.`voucher`.`sub_head`
