TYPE=VIEW
query=select `co-operativebank`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank`.`headvoucher`.`hcode` AS `code`,`co-operativebank`.`headvoucher`.`head` AS `head`,`co-operativebank`.`headvoucher`.`head_type` AS `head_type`,if(((`co-operativebank`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank`.`headvoucher`.`cr`) - sum(`co-operativebank`.`headvoucher`.`dr`)),(sum(`co-operativebank`.`headvoucher`.`dr`) - sum(`co-operativebank`.`headvoucher`.`cr`))) AS `bal` from `co-operativebank`.`headvoucher` where ((((`co-operativebank`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank`.`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=c02d0664b1912f4b5681b820339dd29d
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2025-10-04 07:46:53
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`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank`.`headvoucher`.`htcode` AS `htcode`,`co-operativebank`.`headvoucher`.`hcode` AS `code`,`co-operativebank`.`headvoucher`.`head` AS `head`,`co-operativebank`.`headvoucher`.`head_type` AS `head_type`,if(((`co-operativebank`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank`.`headvoucher`.`htcode` = \'22000\')),(sum(`co-operativebank`.`headvoucher`.`cr`) - sum(`co-operativebank`.`headvoucher`.`dr`)),(sum(`co-operativebank`.`headvoucher`.`dr`) - sum(`co-operativebank`.`headvoucher`.`cr`))) AS `bal` from `co-operativebank`.`headvoucher` where ((((`co-operativebank`.`headvoucher`.`hcode` > \'20000\') and (`co-operativebank`.`headvoucher`.`hcode` < \'40000\')) or ((`co-operativebank`.`headvoucher`.`hcode` > \'60000\') and (`co-operativebank`.`headvoucher`.`hcode` < \'70000\'))) and (`co-operativebank`.`headvoucher`.`htcode` <> \'31000\') and (`co-operativebank`.`headvoucher`.`htcode` <> \'39000\')) group by `co-operativebank`.`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`
