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