TYPE=VIEW
query=select (((select sum(`co-operativebank-244`.`headvoucher`.`cr`) AS `bal` from `co-operativebank-244`.`headvoucher` USE INDEX (`by_date`) USE INDEX (`by_main_head`) USE INDEX (`by_type`) USE INDEX (`by_htcode`) where (((`co-operativebank-244`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'46000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'32000\')) and (`co-operativebank-244`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-244`.`headvoucher`.`date` <= curdate()))) - (select sum(`co-operativebank-244`.`headvoucher`.`dr`) AS `bal` from `co-operativebank-244`.`headvoucher` USE INDEX (`by_date`) USE INDEX (`by_main_head`) USE INDEX (`by_type`) USE INDEX (`by_htcode`) where (((`co-operativebank-244`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'32000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-244`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-244`.`headvoucher`.`date` <= curdate())))) - (select (sum(`co-operativebank-244`.`headvoucher`.`cr`) - sum(`co-operativebank-244`.`headvoucher`.`dr`)) AS `bal` from `co-operativebank-244`.`headvoucher` USE INDEX (`by_date`) USE INDEX (`by_main_head`) USE INDEX (`by_type`) USE INDEX (`by_htcode`) where (((`co-operativebank-244`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'22000\')) and (`co-operativebank-244`.`headvoucher`.`date` <= curdate())))) AS `opbal`
md5=0f9b5e92bd136dd220ddf9349ad3be75
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2025-11-19 04:30:04
create-version=1
source=select ( ( (  select sum(  `co-operativebank-244`.`headvoucher`.`cr`  )  AS  `bal`  from  `co-operativebank-244`.`headvoucher`  USE  INDEX (  `by_htcode`  )  USE  INDEX (  `by_type`  )  USE  INDEX (  `by_main_head`  )  USE  INDEX (  `by_date`  )  where ( ( (  `co-operativebank-244`.`headvoucher`.`type`  =  \'CASH\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'11000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'13000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'14000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'21000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'23000\' ) or (  `co-operativebank-244`.`headvoucher`.`main_head`  =  \'50000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'41000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'42000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'43000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'44000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'46000\' ) or (  `co-operativebank-244`.`headvoucher`.`main_head`  =  \'60000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'34000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'35000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'37000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'32000\' ) ) and (  `co-operativebank-244`.`headvoucher`.`htcode`  <>  \'64000\' ) and (  `co-operativebank-244`.`headvoucher`.`date`  <= curdate(  )  ) ) ) - (  select sum(  `co-operativebank-244`.`headvoucher`.`dr`  )  AS  `bal`  from  `co-operativebank-244`.`headvoucher`  USE  INDEX (  `by_htcode`  )  USE  INDEX (  `by_type`  )  USE  INDEX (  `by_main_head`  )  USE  INDEX (  `by_date`  )  where ( ( (  `co-operativebank-244`.`headvoucher`.`type`  =  \'CASH\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'11000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'13000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'14000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'23000\' ) or (  `co-operativebank-244`.`headvoucher`.`main_head`  =  \'60000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'34000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'35000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'37000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'32000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'21000\' ) or (  `co-operativebank-244`.`headvoucher`.`main_head`  =  \'50000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'41000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'42000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'43000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'44000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'46000\' ) )  and (  `co-operativebank-244`.`headvoucher`.`htcode`  <>  \'64000\' ) and (  `co-operativebank-244`.`headvoucher`.`date`  <= curdate(  )  ) ) ) ) - (  select ( sum(  `co-operativebank-244`.`headvoucher`.`cr`  )  - sum(  `co-operativebank-244`.`headvoucher`.`dr`  )  )  AS  `bal`  from  `co-operativebank-244`.`headvoucher`  USE  INDEX (  `by_htcode`  )  USE  INDEX (  `by_type`  )  USE  INDEX (  `by_main_head`  )  USE  INDEX (  `by_date`  )  where ( ( (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'28000\' ) or (  `co-operativebank-244`.`headvoucher`.`htcode`  =  \'22000\' ) ) and (  `co-operativebank-244`.`headvoucher`.`date`  <= curdate(  )  ) ) ) ) AS  `opbal`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select (((select sum(`co-operativebank-244`.`headvoucher`.`cr`) AS `bal` from `co-operativebank-244`.`headvoucher` USE INDEX (`by_date`) USE INDEX (`by_main_head`) USE INDEX (`by_type`) USE INDEX (`by_htcode`) where (((`co-operativebank-244`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'46000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'32000\')) and (`co-operativebank-244`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-244`.`headvoucher`.`date` <= curdate()))) - (select sum(`co-operativebank-244`.`headvoucher`.`dr`) AS `bal` from `co-operativebank-244`.`headvoucher` USE INDEX (`by_date`) USE INDEX (`by_main_head`) USE INDEX (`by_type`) USE INDEX (`by_htcode`) where (((`co-operativebank-244`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'32000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-244`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-244`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-244`.`headvoucher`.`date` <= curdate())))) - (select (sum(`co-operativebank-244`.`headvoucher`.`cr`) - sum(`co-operativebank-244`.`headvoucher`.`dr`)) AS `bal` from `co-operativebank-244`.`headvoucher` USE INDEX (`by_date`) USE INDEX (`by_main_head`) USE INDEX (`by_type`) USE INDEX (`by_htcode`) where (((`co-operativebank-244`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-244`.`headvoucher`.`htcode` = \'22000\')) and (`co-operativebank-244`.`headvoucher`.`date` <= curdate())))) AS `opbal`
