TYPE=VIEW
query=select `co-operativebank-neturia`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-neturia`.`head`.`code` AS `code`,`co-operativebank-neturia`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-neturia`.`voucher`.`dr`) - sum(`co-operativebank-neturia`.`voucher`.`cr`)) AS `bal` from (((`co-operativebank-neturia`.`voucher` join `co-operativebank-neturia`.`sub_head`) join `co-operativebank-neturia`.`head`) join `co-operativebank-neturia`.`head_type`) where ((`co-operativebank-neturia`.`voucher`.`sub_head` = `co-operativebank-neturia`.`sub_head`.`code`) and (`co-operativebank-neturia`.`sub_head`.`head` = `co-operativebank-neturia`.`head`.`code`) and (`co-operativebank-neturia`.`head`.`head_type` = `co-operativebank-neturia`.`head_type`.`code`) and (((`co-operativebank-neturia`.`voucher`.`sub_head` > \'60000\') and (`co-operativebank-neturia`.`voucher`.`sub_head` < \'70000\')) or (`co-operativebank-neturia`.`head_type`.`code` = \'23000\') or (`co-operativebank-neturia`.`head_type`.`code` = \'21000\')) and (`co-operativebank-neturia`.`voucher`.`date` < \'2016-04-01\')) group by `co-operativebank-neturia`.`voucher`.`sub_head` union all select `co-operativebank-neturia`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-neturia`.`head`.`code` AS `code`,`co-operativebank-neturia`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-neturia`.`voucher`.`cr`) - sum(`co-operativebank-neturia`.`voucher`.`dr`)) AS `(sum(cr)-sum(dr))` from (((`co-operativebank-neturia`.`voucher` join `co-operativebank-neturia`.`sub_head`) join `co-operativebank-neturia`.`head`) join `co-operativebank-neturia`.`head_type`) where ((`co-operativebank-neturia`.`voucher`.`sub_head` = `co-operativebank-neturia`.`sub_head`.`code`) and (`co-operativebank-neturia`.`sub_head`.`head` = `co-operativebank-neturia`.`head`.`code`) and (`co-operativebank-neturia`.`head`.`head_type` = `co-operativebank-neturia`.`head_type`.`code`) and (`co-operativebank-neturia`.`voucher`.`date` < \'2016-04-01\') and ((`co-operativebank-neturia`.`head_type`.`code` = \'22000\') or (`co-operativebank-neturia`.`head_type`.`code` = \'28000\'))) group by `co-operativebank-neturia`.`voucher`.`sub_head`
md5=81bb1c419eddac7ecc112780129b6748
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=1
with_check_option=0
timestamp=2021-08-30 16:46:54
create-version=1
source=select  `co-operativebank-neturia`.`voucher`.`sub_head`  AS  `sub_head` ,\n `co-operativebank-neturia`.`head`.`code`  AS  `code` ,\n `co-operativebank-neturia`.`head_type`.`code`  AS  `head_type` ,\n( sum(  `co-operativebank-neturia`.`voucher`.`dr`  )  - sum(  `co-operativebank-neturia`.`voucher`.`cr`  )  ) AS  `bal`  from ( ( (  `co-operativebank-neturia`.`voucher`  join  `co-operativebank-neturia`.`sub_head`  ) join  `co-operativebank-neturia`.`head`  ) join  `co-operativebank-neturia`.`head_type`  ) where ( (  `co-operativebank-neturia`.`voucher`.`sub_head`  =  `co-operativebank-neturia`.`sub_head`.`code`  ) and (  `co-operativebank-neturia`.`sub_head`.`head`  =  `co-operativebank-neturia`.`head`.`code`  ) and (  `co-operativebank-neturia`.`head`.`head_type`  =  `co-operativebank-neturia`.`head_type`.`code`  ) and ( ( (  `co-operativebank-neturia`.`voucher`.`sub_head`  >  \'60000\' ) and (  `co-operativebank-neturia`.`voucher`.`sub_head`  <  \'70000\' ) ) or (  `co-operativebank-neturia`.`head_type`.`code`  =  \'23000\' ) or (  `co-operativebank-neturia`.`head_type`.`code`  =  \'21000\' ) ) and (  `co-operativebank-neturia`.`voucher`.`date`  <  \'2016-04-01\' ) ) group  by  `co-operativebank-neturia`.`voucher`.`sub_head`  union  all  select  `co-operativebank-neturia`.`voucher`.`sub_head`  AS  `sub_head` ,\n `co-operativebank-neturia`.`head`.`code`  AS  `code` ,\n `co-operativebank-neturia`.`head_type`.`code`  AS  `head_type` ,\n( sum(  `co-operativebank-neturia`.`voucher`.`cr`  )  - sum(  `co-operativebank-neturia`.`voucher`.`dr`  )  ) AS  `(sum(cr)-sum(dr))`  from ( ( (  `co-operativebank-neturia`.`voucher`  join  `co-operativebank-neturia`.`sub_head`  ) join  `co-operativebank-neturia`.`head`  ) join  `co-operativebank-neturia`.`head_type`  ) where ( (  `co-operativebank-neturia`.`voucher`.`sub_head`  =  `co-operativebank-neturia`.`sub_head`.`code`  ) and (  `co-operativebank-neturia`.`sub_head`.`head`  =  `co-operativebank-neturia`.`head`.`code`  ) and (  `co-operativebank-neturia`.`head`.`head_type`  =  `co-operativebank-neturia`.`head_type`.`code`  ) and (  `co-operativebank-neturia`.`voucher`.`date`  <  \'2016-04-01\' ) and ( (  `co-operativebank-neturia`.`head_type`.`code`  =  \'22000\' ) or (  `co-operativebank-neturia`.`head_type`.`code`  =  \'28000\' ) ) ) group  by  `co-operativebank-neturia`.`voucher`.`sub_head`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `co-operativebank-neturia`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-neturia`.`head`.`code` AS `code`,`co-operativebank-neturia`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-neturia`.`voucher`.`dr`) - sum(`co-operativebank-neturia`.`voucher`.`cr`)) AS `bal` from (((`co-operativebank-neturia`.`voucher` join `co-operativebank-neturia`.`sub_head`) join `co-operativebank-neturia`.`head`) join `co-operativebank-neturia`.`head_type`) where ((`co-operativebank-neturia`.`voucher`.`sub_head` = `co-operativebank-neturia`.`sub_head`.`code`) and (`co-operativebank-neturia`.`sub_head`.`head` = `co-operativebank-neturia`.`head`.`code`) and (`co-operativebank-neturia`.`head`.`head_type` = `co-operativebank-neturia`.`head_type`.`code`) and (((`co-operativebank-neturia`.`voucher`.`sub_head` > \'60000\') and (`co-operativebank-neturia`.`voucher`.`sub_head` < \'70000\')) or (`co-operativebank-neturia`.`head_type`.`code` = \'23000\') or (`co-operativebank-neturia`.`head_type`.`code` = \'21000\')) and (`co-operativebank-neturia`.`voucher`.`date` < \'2016-04-01\')) group by `co-operativebank-neturia`.`voucher`.`sub_head` union all select `co-operativebank-neturia`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-neturia`.`head`.`code` AS `code`,`co-operativebank-neturia`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-neturia`.`voucher`.`cr`) - sum(`co-operativebank-neturia`.`voucher`.`dr`)) AS `(sum(cr)-sum(dr))` from (((`co-operativebank-neturia`.`voucher` join `co-operativebank-neturia`.`sub_head`) join `co-operativebank-neturia`.`head`) join `co-operativebank-neturia`.`head_type`) where ((`co-operativebank-neturia`.`voucher`.`sub_head` = `co-operativebank-neturia`.`sub_head`.`code`) and (`co-operativebank-neturia`.`sub_head`.`head` = `co-operativebank-neturia`.`head`.`code`) and (`co-operativebank-neturia`.`head`.`head_type` = `co-operativebank-neturia`.`head_type`.`code`) and (`co-operativebank-neturia`.`voucher`.`date` < \'2016-04-01\') and ((`co-operativebank-neturia`.`head_type`.`code` = \'22000\') or (`co-operativebank-neturia`.`head_type`.`code` = \'28000\'))) group by `co-operativebank-neturia`.`voucher`.`sub_head`
