TYPE=VIEW
query=select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),concat(\'BY \',`co-operativebank-purbadekhali`.`headvoucher`.`sub_head`,\' A/C\',\' -\',`co-operativebank-purbadekhali`.`headvoucher`.`acc_no`),concat(\'BY \',`co-operativebank-purbadekhali`.`headvoucher`.`sub_head`,\' A/C\')) AS `sub_head`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `dr`,0 AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = \'14101\')) union all select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,concat(\'BY INTEREST\',\' A/C\') AS `sub_head`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `dr`,0 AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = (\'14101\' + 48000))) union all select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,\'TO CASH A/C\' AS `sub_head`,0 AS `dr`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`deposit_type` = \'CASH\') and (`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and ((`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = \'14101\') or (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = (\'14101\' + 48000)))) union all select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,\'TO TRANSFER A/C\' AS `sub_head`,0 AS `dr`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`deposit_type` = \'TRANSFER\') and (`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and ((`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = \'14101\') or (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = (\'14101\' + 48000))))
md5=2877211165fd4eb9189ce18d07572074
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2025-09-03 07:37:39
create-version=1
source=select sub_head as headname,shcode as code,if(htcode=\'28000\' or htcode=\'22000\',CONCAT(\'BY \',sub_head,\' A/C\',\' -\',acc_no),CONCAT(\'BY \',sub_head,\' A/C\')) AS sub_head,if(htcode=\'28000\' or htcode=\'22000\',sum(cr),sum(dr)) as dr,0 cr,0 as interest, hcode as head,htcode htcode,0 as m_count from headvoucher where   date=\'2025-09-03\'  AND SHCODE=\'14101\' union all select sub_head as headname,shcode as code,CONCAT(\'BY INTEREST\',\' A/C\') AS sub_head,if(htcode=\'28000\' or htcode=\'22000\',sum(cr),sum(dr)) as  dr,0 cr,0 as interest, hcode as head,htcode htcode,0 as m_count from headvoucher where   date=\'2025-09-03\'  AND SHCODE=\'14101\'+48000 union all select sub_head as headname,shcode as code,\'TO CASH A/C\' AS sub_head,0 dr,if(htcode=\'28000\' or htcode=\'22000\',sum(cr),sum(dr)) cr,0 as interest, hcode as head,htcode htcode,0 as m_count from headvoucher where  deposit_type=\'CASH\' and date=\'2025-09-03\'  AND (SHCODE=\'14101\' OR SHCODE=\'14101\'+48000) union all select sub_head as headname,shcode as code,\'TO TRANSFER A/C\' AS sub_head,0 dr,if(htcode=\'28000\' or htcode=\'22000\',sum(cr),sum(dr)) cr,0 as interest, hcode as head,htcode htcode,0 as m_count from headvoucher where  deposit_type=\'TRANSFER\' and date=\'2025-09-03\'  AND (SHCODE=\'14101\' OR SHCODE=\'14101\'+48000)
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),concat(\'BY \',`co-operativebank-purbadekhali`.`headvoucher`.`sub_head`,\' A/C\',\' -\',`co-operativebank-purbadekhali`.`headvoucher`.`acc_no`),concat(\'BY \',`co-operativebank-purbadekhali`.`headvoucher`.`sub_head`,\' A/C\')) AS `sub_head`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `dr`,0 AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = \'14101\')) union all select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,concat(\'BY INTEREST\',\' A/C\') AS `sub_head`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `dr`,0 AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = (\'14101\' + 48000))) union all select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,\'TO CASH A/C\' AS `sub_head`,0 AS `dr`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`deposit_type` = \'CASH\') and (`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and ((`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = \'14101\') or (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = (\'14101\' + 48000)))) union all select `co-operativebank-purbadekhali`.`headvoucher`.`sub_head` AS `headname`,`co-operativebank-purbadekhali`.`headvoucher`.`shcode` AS `code`,\'TO TRANSFER A/C\' AS `sub_head`,0 AS `dr`,if(((`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'28000\') or (`co-operativebank-purbadekhali`.`headvoucher`.`htcode` = \'22000\')),sum(`co-operativebank-purbadekhali`.`headvoucher`.`cr`),sum(`co-operativebank-purbadekhali`.`headvoucher`.`dr`)) AS `cr`,0 AS `interest`,`co-operativebank-purbadekhali`.`headvoucher`.`hcode` AS `head`,`co-operativebank-purbadekhali`.`headvoucher`.`htcode` AS `htcode`,0 AS `m_count` from `co-operativebank-purbadekhali`.`headvoucher` where ((`co-operativebank-purbadekhali`.`headvoucher`.`deposit_type` = \'TRANSFER\') and (`co-operativebank-purbadekhali`.`headvoucher`.`date` = \'2025-09-03\') and ((`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = \'14101\') or (`co-operativebank-purbadekhali`.`headvoucher`.`shcode` = (\'14101\' + 48000))))
