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