TYPE=VIEW
query=select `co-operativebank-kutubpur`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-kutubpur`.`headvoucher`.`htcode` AS `code`,`co-operativebank-kutubpur`.`headvoucher`.`head_type` AS `head_type`,(sum(`co-operativebank-kutubpur`.`headvoucher`.`cr`) - sum(`co-operativebank-kutubpur`.`headvoucher`.`dr`)) AS `cur_bal`,\'0\' AS `bal`,`co-operativebank-kutubpur`.`headvoucher`.`shcode` AS `shcode`,`co-operativebank-kutubpur`.`headvoucher`.`main_head` AS `main_head` from `co-operativebank-kutubpur`.`headvoucher` where ((`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12301\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12302\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19205\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19206\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19203\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19207\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19211\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19212\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19214\') and ((`co-operativebank-kutubpur`.`headvoucher`.`main_head` = 10000) or (`co-operativebank-kutubpur`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-kutubpur`.`headvoucher`.`date` <= \'2022-03-31\') and ((`co-operativebank-kutubpur`.`headvoucher`.`cr` <> 0) or (`co-operativebank-kutubpur`.`headvoucher`.`dr` <> 0))) group by `co-operativebank-kutubpur`.`headvoucher`.`htcode` union select \'2\' AS `sl_no`,\'12000\' AS `code`,\'RESERVES & SURPLUS\' AS `head_type`,sum(`co-operativebank-kutubpur`.`approciation`.`amt`) AS `cur_bal`,0 AS `bal`,\'\' AS `shcode`,\'10000\' AS `main_hyead` from `co-operativebank-kutubpur`.`approciation` where ((`co-operativebank-kutubpur`.`approciation`.`date` <= \'2022-03-31\') and (`co-operativebank-kutubpur`.`approciation`.`sub_head` <> \'12301\')) group by `co-operativebank-kutubpur`.`approciation`.`main_head` union select `co-operativebank-kutubpur`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-kutubpur`.`headvoucher`.`htcode` AS `code`,`co-operativebank-kutubpur`.`headvoucher`.`head_type` AS `head_type`,\'0\' AS `cur_bal`,(sum(`co-operativebank-kutubpur`.`headvoucher`.`cr`) - sum(`co-operativebank-kutubpur`.`headvoucher`.`dr`)) AS `bal`,`co-operativebank-kutubpur`.`headvoucher`.`shcode` AS `shcode`,`co-operativebank-kutubpur`.`headvoucher`.`main_head` AS `main_head` from `co-operativebank-kutubpur`.`headvoucher` where ((`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12301\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12302\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19205\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19206\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19203\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19207\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19211\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19212\') and ((`co-operativebank-kutubpur`.`headvoucher`.`main_head` = 10000) or (`co-operativebank-kutubpur`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-kutubpur`.`headvoucher`.`date` <= \'2021-03-31\') and ((`co-operativebank-kutubpur`.`headvoucher`.`cr` <> 0) or (`co-operativebank-kutubpur`.`headvoucher`.`dr` <> 0))) group by `co-operativebank-kutubpur`.`headvoucher`.`htcode` union all select \'2\' AS `sl_no`,\'12000\' AS `code`,\'RESERVES & SURPLUS\' AS `head_type`,\'0\' AS `cur_bal`,sum(`co-operativebank-kutubpur`.`approciation`.`amt`) AS `bal`,\'\' AS `shcode`,\'10000\' AS `main_hyead` from `co-operativebank-kutubpur`.`approciation` where ((`co-operativebank-kutubpur`.`approciation`.`date` <= \'2021-03-31\') and (`co-operativebank-kutubpur`.`approciation`.`sub_head` <> \'12301\')) group by `co-operativebank-kutubpur`.`approciation`.`main_head`
md5=4ed590f8685cfa789964353d4a0334d3
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2022-07-08 12:33:10
create-version=1
source=select `hslno` AS `sl_no`,`htcode` AS `code`,`head_type` AS `head_type`,(sum(`cr`) - sum(`dr`)) AS `cur_bal`,\'0\' AS `bal`,`shcode` AS `shcode`,`main_head` AS `main_head` from ((headvoucher )) where ((`shcode` <> \'12301\') and (`shcode` <> \'12302\')    and (`shcode`<> \'19205\')  and (`shcode`<> \'19206\')  and (`shcode`<> \'19203\') and (`shcode`<> \'19207\') and (`shcode`<> \'19211\')  and (`shcode`<> \'19212\') and (`shcode`<> \'19214\') and ((`main_head` = 10000) or (htcode=\'46000\'))   and (`date` <= \'2022-03-31\') and ((`cr` <> 0) or (`dr` <> 0))) group by `htcode` union all SELECT \'2\' as sl_no,\'12000\' as code,\'RESERVES & SURPLUS\' as head_type,sum(amt) as cur_bal,0 bal,\'\' shcode,\'10000\' main_hyead FROM `approciation` where `date` <= \'2022-03-31\' and sub_head<>\'12301\' group by main_head union select `hslno` AS `sl_no`,`htcode` AS `code`,`head_type` AS `head_type`,\'0\' AS `cur_bal`,(sum(`cr`) - sum(`dr`)) AS `bal`,`shcode` AS `shcode`,`main_head` AS `main_head` from ((headvoucher )) where ((`shcode` <> \'12301\') and (`shcode` <> \'12302\')    and (`shcode`<> \'19205\')  and (`shcode`<> \'19206\')  and (`shcode`<> \'19203\') and (`shcode`<> \'19207\') and (`shcode`<> \'19211\') and (`shcode`<> \'19212\') and ((`main_head` = 10000) or (htcode=\'46000\'))   and (`date` <= \'2021-03-31\') and ((`cr` <> 0) or (`dr` <> 0))) group by `htcode` union all SELECT \'2\' as sl_no,\'12000\' as code,\'RESERVES & SURPLUS\' as head_type,\'0\' as cur_bal,sum(amt) bal,\'\' shcode,\'10000\' main_hyead FROM `approciation` where `date` <= \'2021-03-31\' and sub_head<>\'12301\' group by main_head
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `co-operativebank-kutubpur`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-kutubpur`.`headvoucher`.`htcode` AS `code`,`co-operativebank-kutubpur`.`headvoucher`.`head_type` AS `head_type`,(sum(`co-operativebank-kutubpur`.`headvoucher`.`cr`) - sum(`co-operativebank-kutubpur`.`headvoucher`.`dr`)) AS `cur_bal`,\'0\' AS `bal`,`co-operativebank-kutubpur`.`headvoucher`.`shcode` AS `shcode`,`co-operativebank-kutubpur`.`headvoucher`.`main_head` AS `main_head` from `co-operativebank-kutubpur`.`headvoucher` where ((`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12301\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12302\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19205\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19206\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19203\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19207\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19211\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19212\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19214\') and ((`co-operativebank-kutubpur`.`headvoucher`.`main_head` = 10000) or (`co-operativebank-kutubpur`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-kutubpur`.`headvoucher`.`date` <= \'2022-03-31\') and ((`co-operativebank-kutubpur`.`headvoucher`.`cr` <> 0) or (`co-operativebank-kutubpur`.`headvoucher`.`dr` <> 0))) group by `co-operativebank-kutubpur`.`headvoucher`.`htcode` union select \'2\' AS `sl_no`,\'12000\' AS `code`,\'RESERVES & SURPLUS\' AS `head_type`,sum(`co-operativebank-kutubpur`.`approciation`.`amt`) AS `cur_bal`,0 AS `bal`,\'\' AS `shcode`,\'10000\' AS `main_hyead` from `co-operativebank-kutubpur`.`approciation` where ((`co-operativebank-kutubpur`.`approciation`.`date` <= \'2022-03-31\') and (`co-operativebank-kutubpur`.`approciation`.`sub_head` <> \'12301\')) group by `co-operativebank-kutubpur`.`approciation`.`main_head` union select `co-operativebank-kutubpur`.`headvoucher`.`hslno` AS `sl_no`,`co-operativebank-kutubpur`.`headvoucher`.`htcode` AS `code`,`co-operativebank-kutubpur`.`headvoucher`.`head_type` AS `head_type`,\'0\' AS `cur_bal`,(sum(`co-operativebank-kutubpur`.`headvoucher`.`cr`) - sum(`co-operativebank-kutubpur`.`headvoucher`.`dr`)) AS `bal`,`co-operativebank-kutubpur`.`headvoucher`.`shcode` AS `shcode`,`co-operativebank-kutubpur`.`headvoucher`.`main_head` AS `main_head` from `co-operativebank-kutubpur`.`headvoucher` where ((`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12301\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'12302\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19205\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19206\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19203\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19207\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19211\') and (`co-operativebank-kutubpur`.`headvoucher`.`shcode` <> \'19212\') and ((`co-operativebank-kutubpur`.`headvoucher`.`main_head` = 10000) or (`co-operativebank-kutubpur`.`headvoucher`.`htcode` = \'46000\')) and (`co-operativebank-kutubpur`.`headvoucher`.`date` <= \'2021-03-31\') and ((`co-operativebank-kutubpur`.`headvoucher`.`cr` <> 0) or (`co-operativebank-kutubpur`.`headvoucher`.`dr` <> 0))) group by `co-operativebank-kutubpur`.`headvoucher`.`htcode` union all select \'2\' AS `sl_no`,\'12000\' AS `code`,\'RESERVES & SURPLUS\' AS `head_type`,\'0\' AS `cur_bal`,sum(`co-operativebank-kutubpur`.`approciation`.`amt`) AS `bal`,\'\' AS `shcode`,\'10000\' AS `main_hyead` from `co-operativebank-kutubpur`.`approciation` where ((`co-operativebank-kutubpur`.`approciation`.`date` <= \'2021-03-31\') and (`co-operativebank-kutubpur`.`approciation`.`sub_head` <> \'12301\')) group by `co-operativebank-kutubpur`.`approciation`.`main_head`
