TYPE=VIEW
query=select `co-operativebank-246`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-246`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-246`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-246`.`headvoucher`.`cr`) - sum(`co-operativebank-246`.`headvoucher`.`dr`)),(sum(`co-operativebank-246`.`headvoucher`.`dr`) - sum(`co-operativebank-246`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-246`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-246`.`headvoucher` where ((`co-operativebank-246`.`headvoucher`.`date` < \'2025-03-01\') and (`co-operativebank-246`.`headvoucher`.`hcode` <> \'24400\')) group by `co-operativebank-246`.`headvoucher`.`shcode` union all select `co-operativebank-246`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-246`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-246`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-246`.`headvoucher`.`cr`) - sum(`co-operativebank-246`.`headvoucher`.`dr`)),(sum(`co-operativebank-246`.`headvoucher`.`dr`) - sum(`co-operativebank-246`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-246`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-246`.`headvoucher` where ((`co-operativebank-246`.`headvoucher`.`date` < \'2025-03-01\') and (`co-operativebank-246`.`headvoucher`.`hcode` = \'24400\') and (`co-operativebank-246`.`headvoucher`.`acc_no` <> \'\')) group by `co-operativebank-246`.`headvoucher`.`shcode`
md5=7dac2916a51ccc331a2f0069747b35b6
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2026-02-05 11:04:33
create-version=1
source=SELECT SHCODE,IF(HTCODE=\'28000\' or htcode=\'22000\' ,SUM(cr)-sum(dr),sum(dr)-sum(cr)) BAL,acc_no FROM headvoucher where date<\'2025-03-01\' and hcode<>\'24400\' group by shcode union all SELECT SHCODE,IF(HTCODE=\'28000\' or htcode=\'22000\' ,SUM(cr)-sum(dr),sum(dr)-sum(cr)) BAL,acc_no FROM headvoucher where date<\'2025-03-01\' and hcode=\'24400\' and acc_no<>\'\' group by shcode
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `co-operativebank-246`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-246`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-246`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-246`.`headvoucher`.`cr`) - sum(`co-operativebank-246`.`headvoucher`.`dr`)),(sum(`co-operativebank-246`.`headvoucher`.`dr`) - sum(`co-operativebank-246`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-246`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-246`.`headvoucher` where ((`co-operativebank-246`.`headvoucher`.`date` < \'2025-03-01\') and (`co-operativebank-246`.`headvoucher`.`hcode` <> \'24400\')) group by `co-operativebank-246`.`headvoucher`.`shcode` union all select `co-operativebank-246`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-246`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-246`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-246`.`headvoucher`.`cr`) - sum(`co-operativebank-246`.`headvoucher`.`dr`)),(sum(`co-operativebank-246`.`headvoucher`.`dr`) - sum(`co-operativebank-246`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-246`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-246`.`headvoucher` where ((`co-operativebank-246`.`headvoucher`.`date` < \'2025-03-01\') and (`co-operativebank-246`.`headvoucher`.`hcode` = \'24400\') and (`co-operativebank-246`.`headvoucher`.`acc_no` <> \'\')) group by `co-operativebank-246`.`headvoucher`.`shcode`
