TYPE=VIEW
query=select `co-operativebank-199`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-199`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank-199`.`headvoucher`.`hcode` AS `code`,`co-operativebank-199`.`headvoucher`.`head` AS `head`,`co-operativebank-199`.`headvoucher`.`head_type` AS `head_type`,if(((`co-operativebank-199`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-199`.`headvoucher`.`cr`) - sum(`co-operativebank-199`.`headvoucher`.`dr`)),(sum(`co-operativebank-199`.`headvoucher`.`dr`) - sum(`co-operativebank-199`.`headvoucher`.`cr`))) AS `bal` from `co-operativebank-199`.`headvoucher` where ((((`co-operativebank-199`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank-199`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank-199`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank-199`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank-199`.`headvoucher`.`htcode` union all select \'50\' AS `sl_no`,\'12000\' AS `htcode`,\'12100\' AS `code`,\'PROFIT & LOSS ACCOUNT\' AS `head`,\'PROFIT & LOSS A/C\' AS `head_type`,1 AS `bal`
md5=0dc6f1306569f5137ffb52b9f7e59610
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2026-01-19 07:14:26
create-version=1
source=select hslno as sl_no, htcode,hcode as code,head,head_type,if(htcode=\'28000\' or htcode=\'22000\',(sum(cr)-sum(dr)),(sum(dr)-sum(cr))) as bal from headvoucher where  ((hcode>\'20000\' and hcode<\'40000\') or (hcode>\'60000\' and hcode<\'70000\') ) and htcode<>\'31000\'  AND htcode<>\'39000\' group by htcode   asc  union all  select \'50\' as sl_no,\'12000\' as htcode, \'12100\' as code,\'PROFIT & LOSS ACCOUNT\'  as head,\'PROFIT & LOSS A/C\' as  head_type,1 as bal
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `co-operativebank-199`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-199`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank-199`.`headvoucher`.`hcode` AS `code`,`co-operativebank-199`.`headvoucher`.`head` AS `head`,`co-operativebank-199`.`headvoucher`.`head_type` AS `head_type`,if(((`co-operativebank-199`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-199`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-199`.`headvoucher`.`cr`) - sum(`co-operativebank-199`.`headvoucher`.`dr`)),(sum(`co-operativebank-199`.`headvoucher`.`dr`) - sum(`co-operativebank-199`.`headvoucher`.`cr`))) AS `bal` from `co-operativebank-199`.`headvoucher` where ((((`co-operativebank-199`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank-199`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank-199`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank-199`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank-199`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank-199`.`headvoucher`.`htcode` union all select \'50\' AS `sl_no`,\'12000\' AS `htcode`,\'12100\' AS `code`,\'PROFIT & LOSS ACCOUNT\' AS `head`,\'PROFIT & LOSS A/C\' AS `head_type`,1 AS `bal`
