TYPE=VIEW
query=select `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,\'\' AS `Opening`,round(sum(`h`.`cr`),0) AS `received`,round(sum(`h`.`dr`),0) AS `refund`,0 AS `total_no_acc` from `co-operativebank-henria`.`headvoucher` `h` where ((`h`.`date` >= \'2024-04-24\') and (`h`.`date` <= \'2024-04-24\') and (`h`.`htcode` = \'14000\') and (`h`.`hcode` <> \'14600\')) group by `h`.`shcode` union all select `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,round((sum(`h`.`cr`) - sum(`h`.`dr`)),0) AS `Opening`,0 AS `received`,0 AS `refund`,0 AS `total_no_acc` from `co-operativebank-henria`.`headvoucher` `h` where ((`h`.`date` < \'2024-04-24\') and (`h`.`htcode` = \'14000\') and (`h`.`hcode` <> \'14600\')) group by `h`.`shcode` union all select `co-operativebank-henria`.`voucher`.`sub_head` AS `shcode`,`co-operativebank-henria`.`voucher`.`sub_head` AS `sub_head`,\'\' AS `Opening`,0 AS `received`,0 AS `refund`,count(0) AS `total_no_acc` from `co-operativebank-henria`.`voucher` where ((`co-operativebank-henria`.`voucher`.`date` >= \'2024-04-24\') and (`co-operativebank-henria`.`voucher`.`date` <= \'2024-04-24\') and (`co-operativebank-henria`.`voucher`.`vch_type` = \'Opnn Bal\') and ((`co-operativebank-henria`.`voucher`.`head` = \'14100\') or (`co-operativebank-henria`.`voucher`.`head` = \'14200\') or (`co-operativebank-henria`.`voucher`.`head` = \'14300\'))) group by `co-operativebank-henria`.`voucher`.`sub_head`
md5=3134f8207bc4a451cfde4eb3983298b2
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2024-04-24 02:10:58
create-version=1
source=SELECT `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,\'\' as Opening,round(sum(cr),0) as received ,round(sum(dr),0) as refund,0 as total_no_acc  FROM `headvoucher` h WHERE date>=\'2024-04-24\' and date<=\'2024-04-24\' and htcode=\'14000\' and hcode<>\'14600\' group by `h`.`shcode` union all SELECT `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,round((sum(cr)-sum(dr)),0) as Opening,0 as received ,0 as refund,0 as total_no_acc  FROM `headvoucher` h WHERE date<\'2024-04-24\'  and htcode=\'14000\' and hcode<>\'14600\' group by `h`.`shcode` union all select sub_head as shcode,sub_head,\'\' as Opening,0 as received ,0 as refund, count(0) as total_no_acc from voucher where date>=\'2024-04-24\' and date<=\'2024-04-24\'  and vch_type=\'Opnn Bal\' and (head=\'14100\' or head=\'14200\' or head=\'14300\')  group by sub_head
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,\'\' AS `Opening`,round(sum(`h`.`cr`),0) AS `received`,round(sum(`h`.`dr`),0) AS `refund`,0 AS `total_no_acc` from `co-operativebank-henria`.`headvoucher` `h` where ((`h`.`date` >= \'2024-04-24\') and (`h`.`date` <= \'2024-04-24\') and (`h`.`htcode` = \'14000\') and (`h`.`hcode` <> \'14600\')) group by `h`.`shcode` union all select `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,round((sum(`h`.`cr`) - sum(`h`.`dr`)),0) AS `Opening`,0 AS `received`,0 AS `refund`,0 AS `total_no_acc` from `co-operativebank-henria`.`headvoucher` `h` where ((`h`.`date` < \'2024-04-24\') and (`h`.`htcode` = \'14000\') and (`h`.`hcode` <> \'14600\')) group by `h`.`shcode` union all select `co-operativebank-henria`.`voucher`.`sub_head` AS `shcode`,`co-operativebank-henria`.`voucher`.`sub_head` AS `sub_head`,\'\' AS `Opening`,0 AS `received`,0 AS `refund`,count(0) AS `total_no_acc` from `co-operativebank-henria`.`voucher` where ((`co-operativebank-henria`.`voucher`.`date` >= \'2024-04-24\') and (`co-operativebank-henria`.`voucher`.`date` <= \'2024-04-24\') and (`co-operativebank-henria`.`voucher`.`vch_type` = \'Opnn Bal\') and ((`co-operativebank-henria`.`voucher`.`head` = \'14100\') or (`co-operativebank-henria`.`voucher`.`head` = \'14200\') or (`co-operativebank-henria`.`voucher`.`head` = \'14300\'))) group by `co-operativebank-henria`.`voucher`.`sub_head`
