TYPE=VIEW
query=select `co-operativebank-milani`.`headvoucher`.`shcode` AS `SHCODE`,ifnull((sum(`co-operativebank-milani`.`headvoucher`.`cr`) - sum(`co-operativebank-milani`.`headvoucher`.`dr`)),0) AS `BAL`,`co-operativebank-milani`.`headvoucher`.`hcode` AS `hcode`,sum(`co-operativebank-milani`.`headvoucher`.`cr`) AS `cr`,sum(`co-operativebank-milani`.`headvoucher`.`dr`) AS `dr` from `co-operativebank-milani`.`headvoucher` where ((`co-operativebank-milani`.`headvoucher`.`date` < \'2026-02-17\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17103\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17109\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17110\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17111\')) group by `co-operativebank-milani`.`headvoucher`.`shcode` union all select \'17103\' AS `SHCODE`,(sum(`co-operativebank-milani`.`headvoucher`.`cr`) - sum(`co-operativebank-milani`.`headvoucher`.`dr`)) AS `BAL`,`co-operativebank-milani`.`headvoucher`.`hcode` AS `hcode`,sum(`co-operativebank-milani`.`headvoucher`.`cr`) AS `cr`,sum(`co-operativebank-milani`.`headvoucher`.`dr`) AS `dr` from `co-operativebank-milani`.`headvoucher` where ((`co-operativebank-milani`.`headvoucher`.`date` < \'2026-02-17\') and ((`co-operativebank-milani`.`headvoucher`.`shcode` = \'17103\') or (`co-operativebank-milani`.`headvoucher`.`shcode` = \'17109\') or (`co-operativebank-milani`.`headvoucher`.`shcode` = \'17110\') or (`co-operativebank-milani`.`headvoucher`.`shcode` = \'17111\'))) union all select \'17109\' AS `SHCODE`,0 AS `BAL`,\'17100\' AS `hcode`,0 AS `cr`,0 AS `dr` union all select \'17110\' AS `SHCODE`,0 AS `BAL`,\'17100\' AS `hcode`,0 AS `cr`,0 AS `dr` union all select \'17111\' AS `SHCODE`,0 AS `BAL`,\'17100\' AS `hcode`,0 AS `cr`,0 AS `dr` union all select `co-operativebank-milani`.`approciation`.`sub_head` AS `SHCODE`,sum(`co-operativebank-milani`.`approciation`.`amt`) AS `BAL`,`co-operativebank-milani`.`approciation`.`head` AS `hcode`,0 AS `cr`,sum(`co-operativebank-milani`.`approciation`.`dramt`) AS `dr` from `co-operativebank-milani`.`approciation` where ((`co-operativebank-milani`.`approciation`.`date` < \'2026-02-17\') and (`co-operativebank-milani`.`approciation`.`amt` > 0)) group by `co-operativebank-milani`.`approciation`.`sub_head`
md5=b7d92bf7fc31702c5019c57fdc4a8a6e
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2026-02-17 13:12:33
create-version=1
source=SELECT SHCODE,ifnull((sum(cr)-sum(dr)),0) BAL,hcode,sum(cr) as cr,sum(dr) as dr FROM headvoucher where date<\'2026-02-17\' and ((`headvoucher`.`shcode` <> \'17103\') and (`headvoucher`.`shcode` <> \'17109\') and (`headvoucher`.`shcode` <> \'17110\') and (`headvoucher`.`shcode` <> \'17111\')) group by shcode union all select \'17103\' AS `SHCODE`,(sum(`headvoucher`.`cr`) - sum(`headvoucher`.`dr`)) AS `BAL`,hcode,sum(cr) as cr,sum(dr) as dr from `headvoucher` where ((`headvoucher`.`date` < \'2026-02-17\') and ((`headvoucher`.`shcode` = \'17103\') or (`headvoucher`.`shcode` = \'17109\') or (`headvoucher`.`shcode` = \'17110\') or (`headvoucher`.`shcode` = \'17111\'))) union all select \'17109\' AS `SHCODE`,0 AS `BAL`,\'17100\' as hcode,0 as cr,0 as dr union all select \'17110\' AS `SHCODE`,0 AS `BAL`,\'17100\' as hcode,0 as cr,0 as dr union all select \'17111\' AS `SHCODE`,0 AS `BAL`,\'17100\' as hcode,0 as cr,0 as dr union all select sub_head AS `SHCODE`,sum(amt) AS `BAL`,head as hcode,0 as cr,sum(dramt) as dr from approciation where date<\'2026-02-17\' and amt>0 group by sub_head
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `co-operativebank-milani`.`headvoucher`.`shcode` AS `SHCODE`,ifnull((sum(`co-operativebank-milani`.`headvoucher`.`cr`) - sum(`co-operativebank-milani`.`headvoucher`.`dr`)),0) AS `BAL`,`co-operativebank-milani`.`headvoucher`.`hcode` AS `hcode`,sum(`co-operativebank-milani`.`headvoucher`.`cr`) AS `cr`,sum(`co-operativebank-milani`.`headvoucher`.`dr`) AS `dr` from `co-operativebank-milani`.`headvoucher` where ((`co-operativebank-milani`.`headvoucher`.`date` < \'2026-02-17\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17103\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17109\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17110\') and (`co-operativebank-milani`.`headvoucher`.`shcode` <> \'17111\')) group by `co-operativebank-milani`.`headvoucher`.`shcode` union all select \'17103\' AS `SHCODE`,(sum(`co-operativebank-milani`.`headvoucher`.`cr`) - sum(`co-operativebank-milani`.`headvoucher`.`dr`)) AS `BAL`,`co-operativebank-milani`.`headvoucher`.`hcode` AS `hcode`,sum(`co-operativebank-milani`.`headvoucher`.`cr`) AS `cr`,sum(`co-operativebank-milani`.`headvoucher`.`dr`) AS `dr` from `co-operativebank-milani`.`headvoucher` where ((`co-operativebank-milani`.`headvoucher`.`date` < \'2026-02-17\') and ((`co-operativebank-milani`.`headvoucher`.`shcode` = \'17103\') or (`co-operativebank-milani`.`headvoucher`.`shcode` = \'17109\') or (`co-operativebank-milani`.`headvoucher`.`shcode` = \'17110\') or (`co-operativebank-milani`.`headvoucher`.`shcode` = \'17111\'))) union all select \'17109\' AS `SHCODE`,0 AS `BAL`,\'17100\' AS `hcode`,0 AS `cr`,0 AS `dr` union all select \'17110\' AS `SHCODE`,0 AS `BAL`,\'17100\' AS `hcode`,0 AS `cr`,0 AS `dr` union all select \'17111\' AS `SHCODE`,0 AS `BAL`,\'17100\' AS `hcode`,0 AS `cr`,0 AS `dr` union all select `co-operativebank-milani`.`approciation`.`sub_head` AS `SHCODE`,sum(`co-operativebank-milani`.`approciation`.`amt`) AS `BAL`,`co-operativebank-milani`.`approciation`.`head` AS `hcode`,0 AS `cr`,sum(`co-operativebank-milani`.`approciation`.`dramt`) AS `dr` from `co-operativebank-milani`.`approciation` where ((`co-operativebank-milani`.`approciation`.`date` < \'2026-02-17\') and (`co-operativebank-milani`.`approciation`.`amt` > 0)) group by `co-operativebank-milani`.`approciation`.`sub_head`
