TYPE=VIEW
query=select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,sum(`v1`.`cr`) AS `CASH`,\'0\' AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from `co-operativebank-keshabchak`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-keshabchak`.`quick_name` `an` USE INDEX (`by_acc_no`) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2025-12-31\') and (`v1`.`deposit_type` = \'CASH\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) union all select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,\'0\' AS `CASH`,sum(`v1`.`cr`) AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from `co-operativebank-keshabchak`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-keshabchak`.`quick_name` `an` USE INDEX (`by_acc_no`) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2025-12-31\') and (`v1`.`deposit_type` = \'TRANSFER\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`)
md5=b51a7811e9dfe4502b6e350f79bf8135
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2025-12-31 07:31:15
create-version=1
source=select v1.no,if(v1.acc_no=\'\',v1.cash_acc,v1.acc_no) as acc_no,name as name,lfno,sum(cr) as CASH,\'0\' as TRAN,date,v1.sub_head from voucher v1 USE INDEX (by_acc_no,by_cash_acc,by_date,by_sub_head),quick_name an USE INDEX (by_acc_no) where (v1.acc_no=an.acc_no or v1.cash_acc=an.acc_no) and v1.sub_head>57000 and v1.sub_head<=57999 and v1.sub_head=\'57907\' and v1.date=\'2025-12-31\' AND DEPOSIT_TYPE=\'CASH\' AND cR<>\'0\'  group by if(v1.acc_no=\'\',v1.cash_acc,v1.acc_no) union all select v1.no,if(v1.acc_no=\'\',v1.cash_acc,v1.acc_no) as acc_no,name as name,lfno,\'0\' as CASH,sum(cr) as TRAN,date,v1.sub_head from voucher v1 USE INDEX (by_acc_no,by_cash_acc,by_date,by_sub_head),quick_name an USE INDEX (by_acc_no) where (v1.acc_no=an.acc_no or v1.cash_acc=an.acc_no) and v1.sub_head>57000 and v1.sub_head<=57999 and v1.sub_head=\'57907\' and v1.date=\'2025-12-31\' AND DEPOSIT_TYPE=\'TRANSFER\' AND cR<>\'0\'  group by if(v1.acc_no=\'\',v1.cash_acc,v1.acc_no)
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,sum(`v1`.`cr`) AS `CASH`,\'0\' AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from `co-operativebank-keshabchak`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-keshabchak`.`quick_name` `an` USE INDEX (`by_acc_no`) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2025-12-31\') and (`v1`.`deposit_type` = \'CASH\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) union all select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,\'0\' AS `CASH`,sum(`v1`.`cr`) AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from `co-operativebank-keshabchak`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-keshabchak`.`quick_name` `an` USE INDEX (`by_acc_no`) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2025-12-31\') and (`v1`.`deposit_type` = \'TRANSFER\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`)
