TYPE=VIEW
query=select (((select sum(`co-operativebank-199`.`headvoucher`.`cr`) from `co-operativebank-199`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-199`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'46000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'32000\')) and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-199`.`headvoucher`.`date` < \'2025-12-23\'))) - (select sum(`co-operativebank-199`.`headvoucher`.`dr`) from `co-operativebank-199`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-199`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'32000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-199`.`headvoucher`.`date` < \'2025-12-23\')))) - (select (sum(`co-operativebank-199`.`headvoucher`.`cr`) - sum(`co-operativebank-199`.`headvoucher`.`dr`)) from `co-operativebank-199`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-199`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'22000\')) and (`co-operativebank-199`.`headvoucher`.`date` < \'2025-12-23\')))) AS `opbal`
md5=fefdf35bfe74eb4a9601a58e2ea6d0a8
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2025-12-23 10:23:41
create-version=1
source=SELECT 
\n        (
\n        (SELECT SUM(cr) FROM headvoucher USE INDEX (by_htcode) 
\n        WHERE 
\n            (type=\'CASH\' OR htcode=\'11000\' OR htcode=\'13000\' OR htcode=\'14000\' 
\n            OR htcode=\'21000\' OR htcode=\'23000\' OR main_head=\'50000\' OR htcode=\'41000\' 
\n            OR htcode=\'42000\' OR htcode=\'43000\' OR htcode=\'44000\' OR htcode=\'46000\' 
\n            OR main_head=\'60000\' OR htcode=\'34000\' OR htcode=\'35000\' OR htcode=\'37000\' 
\n            OR htcode=\'32000\') 
\n            AND htcode <> \'64000\' 
\n            AND DATE < \'2025-12-23\'
\n        ) - (SELECT SUM(dr) FROM headvoucher USE INDEX (by_htcode) 
\n            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\') 
\n            AND htcode <> \'64000\' AND DATE < \'2025-12-23\') - (SELECT SUM(cr) - SUM(dr) 
\n            FROM headvoucher USE INDEX (by_htcode) WHERE (htcode=\'28000\' OR htcode=\'22000\') AND DATE < \'2025-12-23\' ) ) as opbal
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select (((select sum(`co-operativebank-199`.`headvoucher`.`cr`) from `co-operativebank-199`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-199`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'46000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'32000\')) and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-199`.`headvoucher`.`date` < \'2025-12-23\'))) - (select sum(`co-operativebank-199`.`headvoucher`.`dr`) from `co-operativebank-199`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-199`.`headvoucher`.`type` = \'CASH\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'11000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'13000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'14000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'23000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'60000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'34000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'35000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'37000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'32000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'21000\') or (`co-operativebank-199`.`headvoucher`.`main_head` = \'50000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'41000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'42000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'43000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'44000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'64000\') and (`co-operativebank-199`.`headvoucher`.`date` < \'2025-12-23\')))) - (select (sum(`co-operativebank-199`.`headvoucher`.`cr`) - sum(`co-operativebank-199`.`headvoucher`.`dr`)) from `co-operativebank-199`.`headvoucher` USE INDEX (`by_htcode`) where (((`co-operativebank-199`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'22000\')) and (`co-operativebank-199`.`headvoucher`.`date` < \'2025-12-23\')))) AS `opbal`
