TYPE=VIEW
query=select `co-operativebank-mitrachak`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`)),(sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-mitrachak`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-mitrachak`.`headvoucher` where ((`co-operativebank-mitrachak`.`headvoucher`.`date` < \'2025-04-01\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` <> \'24400\')) group by `co-operativebank-mitrachak`.`headvoucher`.`shcode` union all select `co-operativebank-mitrachak`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`)),(sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-mitrachak`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-mitrachak`.`headvoucher` where ((`co-operativebank-mitrachak`.`headvoucher`.`date` < \'2025-04-01\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` = \'24400\') and (`co-operativebank-mitrachak`.`headvoucher`.`acc_no` <> \'\')) group by `co-operativebank-mitrachak`.`headvoucher`.`shcode`
md5=7966581665ce66250ec0aea3647e061a
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2026-03-05 12:16:00
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-04-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-04-01\' and hcode=\'24400\' and acc_no<>\'\' group by shcode
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `co-operativebank-mitrachak`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`)),(sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-mitrachak`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-mitrachak`.`headvoucher` where ((`co-operativebank-mitrachak`.`headvoucher`.`date` < \'2025-04-01\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` <> \'24400\')) group by `co-operativebank-mitrachak`.`headvoucher`.`shcode` union all select `co-operativebank-mitrachak`.`headvoucher`.`shcode` AS `SHCODE`,if(((`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-mitrachak`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`)),(sum(`co-operativebank-mitrachak`.`headvoucher`.`dr`) - sum(`co-operativebank-mitrachak`.`headvoucher`.`cr`))) AS `BAL`,`co-operativebank-mitrachak`.`headvoucher`.`acc_no` AS `acc_no` from `co-operativebank-mitrachak`.`headvoucher` where ((`co-operativebank-mitrachak`.`headvoucher`.`date` < \'2025-04-01\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` = \'24400\') and (`co-operativebank-mitrachak`.`headvoucher`.`acc_no` <> \'\')) group by `co-operativebank-mitrachak`.`headvoucher`.`shcode`
