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`.`headvoucher` `h` where ((`h`.`date` >= \'2026-01-01\') and (`h`.`date` <= \'2026-01-31\') 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`.`headvoucher` `h` where ((`h`.`date` < \'2026-01-01\') and (`h`.`htcode` = \'14000\') and (`h`.`hcode` <> \'14600\')) group by `h`.`shcode` union all select `co-operativebank`.`voucher`.`sub_head` AS `shcode`,`co-operativebank`.`voucher`.`sub_head` AS `sub_head`,\'\' AS `Opening`,0 AS `received`,0 AS `refund`,count(0) AS `total_no_acc` from `co-operativebank`.`voucher` where ((`co-operativebank`.`voucher`.`date` >= \'2026-01-01\') and (`co-operativebank`.`voucher`.`date` <= \'2026-01-31\') and (`co-operativebank`.`voucher`.`vch_type` = \'Opnn Bal\') and ((`co-operativebank`.`voucher`.`head` = \'14100\') or (`co-operativebank`.`voucher`.`head` = \'14200\') or (`co-operativebank`.`voucher`.`head` = \'14300\'))) group by `co-operativebank`.`voucher`.`sub_head`
md5=e75b595710b150521efca767ac329e71
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=2
with_check_option=0
timestamp=2026-02-02 10:47:08
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>=\'2026-01-01\' and date<=\'2026-01-31\' 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<\'2026-01-01\'  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>=\'2026-01-01\' and date<=\'2026-01-31\'  and vch_type=\'Opnn Bal\' and (head=\'14100\' or head=\'14200\' or head=\'14300\')  group by sub_head
client_cs_name=utf8
connection_cl_name=utf8_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`.`headvoucher` `h` where ((`h`.`date` >= \'2026-01-01\') and (`h`.`date` <= \'2026-01-31\') 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`.`headvoucher` `h` where ((`h`.`date` < \'2026-01-01\') and (`h`.`htcode` = \'14000\') and (`h`.`hcode` <> \'14600\')) group by `h`.`shcode` union all select `co-operativebank`.`voucher`.`sub_head` AS `shcode`,`co-operativebank`.`voucher`.`sub_head` AS `sub_head`,\'\' AS `Opening`,0 AS `received`,0 AS `refund`,count(0) AS `total_no_acc` from `co-operativebank`.`voucher` where ((`co-operativebank`.`voucher`.`date` >= \'2026-01-01\') and (`co-operativebank`.`voucher`.`date` <= \'2026-01-31\') and (`co-operativebank`.`voucher`.`vch_type` = \'Opnn Bal\') and ((`co-operativebank`.`voucher`.`head` = \'14100\') or (`co-operativebank`.`voucher`.`head` = \'14200\') or (`co-operativebank`.`voucher`.`head` = \'14300\'))) group by `co-operativebank`.`voucher`.`sub_head`
