TYPE=VIEW
query=select `co-operativebank-mitrachak`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-mitrachak`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank-mitrachak`.`headvoucher`.`hcode` AS `code`,`co-operativebank-mitrachak`.`headvoucher`.`head` AS `head`,`co-operativebank-mitrachak`.`headvoucher`.`head_type` AS `head_type`,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` from `co-operativebank-mitrachak`.`headvoucher` where ((((`co-operativebank-mitrachak`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank-mitrachak`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank-mitrachak`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank-mitrachak`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank-mitrachak`.`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=5469116503179944ed42dcb8a9e50cce
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2026-02-18 06:34:03
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=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `co-operativebank-mitrachak`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-mitrachak`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank-mitrachak`.`headvoucher`.`hcode` AS `code`,`co-operativebank-mitrachak`.`headvoucher`.`head` AS `head`,`co-operativebank-mitrachak`.`headvoucher`.`head_type` AS `head_type`,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` from `co-operativebank-mitrachak`.`headvoucher` where ((((`co-operativebank-mitrachak`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank-mitrachak`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank-mitrachak`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank-mitrachak`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank-mitrachak`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank-mitrachak`.`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`
