TYPE=VIEW
query=select `co-operativebank-henria`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-henria`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank-henria`.`headvoucher`.`hcode` AS `code`,`co-operativebank-henria`.`headvoucher`.`head` AS `head`,`co-operativebank-henria`.`headvoucher`.`head_type` AS `head_type`,if(((`co-operativebank-henria`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-henria`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-henria`.`headvoucher`.`cr`) - sum(`co-operativebank-henria`.`headvoucher`.`dr`)),(sum(`co-operativebank-henria`.`headvoucher`.`dr`) - sum(`co-operativebank-henria`.`headvoucher`.`cr`))) AS `bal` from `co-operativebank-henria`.`headvoucher` where ((((`co-operativebank-henria`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank-henria`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank-henria`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank-henria`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank-henria`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank-henria`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank-henria`.`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=22276c3258d10f3996d607b59b3898ef
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=2
with_check_option=0
timestamp=2026-01-06 03:40:45
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-henria`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-henria`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank-henria`.`headvoucher`.`hcode` AS `code`,`co-operativebank-henria`.`headvoucher`.`head` AS `head`,`co-operativebank-henria`.`headvoucher`.`head_type` AS `head_type`,if(((`co-operativebank-henria`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-henria`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank-henria`.`headvoucher`.`cr`) - sum(`co-operativebank-henria`.`headvoucher`.`dr`)),(sum(`co-operativebank-henria`.`headvoucher`.`dr`) - sum(`co-operativebank-henria`.`headvoucher`.`cr`))) AS `bal` from `co-operativebank-henria`.`headvoucher` where ((((`co-operativebank-henria`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank-henria`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank-henria`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank-henria`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank-henria`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank-henria`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank-henria`.`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`
