TYPE=VIEW
query=select (((select sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`cr`) AS `bal` from `co-operativebank-dkmadhabpur`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-dkmadhabpur`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'46000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'32000\')) and (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-dkmadhabpur`.`headvoucher`.`date` < \'2025-08-22\'))) - (select sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`dr`) AS `bal` from `co-operativebank-dkmadhabpur`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-dkmadhabpur`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'32000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-dkmadhabpur`.`headvoucher`.`date` < \'2025-08-22\')))) - (select (sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`cr`) - sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`dr`)) AS `bal` from `co-operativebank-dkmadhabpur`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'22000\')) and (`co-operativebank-dkmadhabpur`.`headvoucher`.`date` < \'2025-08-22\')))) AS `opbal`
md5=aa7865285ee6ff0316bd82df828f7864
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=2
with_check_option=0
timestamp=2025-08-22 08:22:27
create-version=1
source=SELECT ((SELECT  SUM( cr )  bal FROM headvoucher USE INDEX (by_htcode) WHERE ( type=\'CASH\' or htcode =  \'11000\' OR htcode =  \'13000\' OR htcode =  \'14000\' OR htcode = \'21000\' OR htcode =  \'23000\' OR main_head =  \'50000\' OR htcode =  \'41000\' OR htcode =  \'42000\' OR htcode =  \'43000\' OR htcode =  \'44000\' OR htcode =  \'46000\' OR main_head =  \'60000\' OR htcode =  \'34000\' OR htcode =  \'35000\' OR htcode =  \'37000\' OR htcode =  \'32000\'  ) and htcode<>\'64000\'  AND DATE <\'2025-08-22\' )- ( SELECT  SUM( dr )  bal FROM headvoucher USE INDEX (by_htcode) WHERE ( type=\'CASH\'  or htcode =  \'11000\' OR htcode =  \'13000\' OR htcode =  \'14000\' OR htcode =  \'23000\' OR main_head =  \'60000\' OR htcode =  \'34000\' OR htcode =  \'35000\' OR htcode =  \'37000\' OR htcode =  \'32000\'   OR htcode = \'21000\' OR main_head =  \'50000\' OR htcode =  \'41000\' OR htcode =  \'42000\' OR htcode =  \'43000\' OR htcode =  \'44000\' OR htcode =  \'46000\' ) and htcode<>\'64000\'  AND DATE <\'2025-08-22\' ) - (SELECT  SUM( cr ) - SUM( dr )  bal FROM headvoucher USE INDEX (by_htcode) WHERE ( htcode =  \'28000\' OR htcode =  \'22000\' ) AND DATE <\'2025-08-22\')) as opbal
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select (((select sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`cr`) AS `bal` from `co-operativebank-dkmadhabpur`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-dkmadhabpur`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'46000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'32000\')) and (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-dkmadhabpur`.`headvoucher`.`date` < \'2025-08-22\'))) - (select sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`dr`) AS `bal` from `co-operativebank-dkmadhabpur`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-dkmadhabpur`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'32000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-dkmadhabpur`.`headvoucher`.`date` < \'2025-08-22\')))) - (select (sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`cr`) - sum(`co-operativebank-dkmadhabpur`.`headvoucher`.`dr`)) AS `bal` from `co-operativebank-dkmadhabpur`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-dkmadhabpur`.`headvoucher`.`htcode` = \'22000\')) and (`co-operativebank-dkmadhabpur`.`headvoucher`.`date` < \'2025-08-22\')))) AS `opbal`
