TYPE=VIEW
query=select `v`.`date` AS `date`,if((`v`.`cr` > 0),concat(`sh1`.`sub_head`,\' A/C (\',`da`.`fd_sv_acc_no`,\')\'),concat(`sh2`.`sub_head`,\' A/C (\',`da`.`fd_sv_acc_no`,\')\')) AS `cr_ledger`,if((`v`.`dr` = 0),concat(`sh2`.`sub_head`,\' A/C (\',`v`.`Acc_no`,\')\'),concat(`sh1`.`sub_head`,\'A/C (\',`v`.`cash_acc`,\')\')) AS `dr_ledger`,if((`v`.`cr` > 0),`v`.`cr`,`v`.`dr`) AS `amt`,`l2`.`acc_type` AS `acc_type` from (((((`co-operativebank-simuldari`.`voucher` `v` join `co-operativebank-simuldari`.`ledger` `l1`) join `co-operativebank-simuldari`.`ledger` `l2`) join `co-operativebank-simuldari`.`sub_head` `sh1`) join `co-operativebank-simuldari`.`sub_head` `sh2`) join `co-operativebank-simuldari`.`deposit_acc` `da`) where ((`v`.`cash_acc` = `l1`.`acc_no`) and (`v`.`Acc_no` = `l2`.`acc_no`) and (`l1`.`sub_head` = `sh1`.`code`) and (`l2`.`sub_head` = `sh2`.`code`) and (`da`.`acc_no` = `v`.`Acc_no`))
md5=ed2a8788f0a85be67c09779b5fb7e4c1
updatable=1
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2021-07-22 15:12:36
create-version=1
source=select  `v`.`date`  AS  `date` ,\nif( (  `v`.`cr`  >0 ), concat(  `sh1`.`sub_head` ,  \' A/C (\',  `da`.`fd_sv_acc_no` ,  \')\'  ) , concat(  `sh2`.`sub_head` ,  \' A/C (\',  `da`.`fd_sv_acc_no` ,  \')\'  )  )  AS  `cr_ledger` ,\nif( (  `v`.`dr`  =0 ), concat(  `sh2`.`sub_head` ,  \' A/C (\',  `v`.`Acc_no` ,  \')\'  ) , concat(  `sh1`.`sub_head` ,  \'A/C (\',  `v`.`cash_acc` ,  \')\'  )  )  AS  `dr_ledger` ,\nif( (  `v`.`cr`  >0 ),  `v`.`cr` ,  `v`.`dr`  )  AS  `amt` ,\n `l2`.`acc_type`  AS  `acc_type`  from ( ( ( ( (  `co-operativebank-simuldari`.`voucher`  `v`  join  `co-operativebank-simuldari`.`ledger`  `l1`  ) join  `co-operativebank-simuldari`.`ledger`  `l2`  ) join  `co-operativebank-simuldari`.`sub_head`  `sh1`  ) join  `co-operativebank-simuldari`.`sub_head`  `sh2`  ) join  `co-operativebank-simuldari`.`deposit_acc`  `da`  ) where ( (  `v`.`cash_acc`  =  `l1`.`acc_no`  ) and (  `v`.`Acc_no`  =  `l2`.`acc_no`  ) and (  `l1`.`sub_head`  =  `sh1`.`code`  ) and (  `l2`.`sub_head`  =  `sh2`.`code`  ) and (  `da`.`acc_no`  =  `v`.`Acc_no`  ) )
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `v`.`date` AS `date`,if((`v`.`cr` > 0),concat(`sh1`.`sub_head`,\' A/C (\',`da`.`fd_sv_acc_no`,\')\'),concat(`sh2`.`sub_head`,\' A/C (\',`da`.`fd_sv_acc_no`,\')\')) AS `cr_ledger`,if((`v`.`dr` = 0),concat(`sh2`.`sub_head`,\' A/C (\',`v`.`Acc_no`,\')\'),concat(`sh1`.`sub_head`,\'A/C (\',`v`.`cash_acc`,\')\')) AS `dr_ledger`,if((`v`.`cr` > 0),`v`.`cr`,`v`.`dr`) AS `amt`,`l2`.`acc_type` AS `acc_type` from (((((`co-operativebank-simuldari`.`voucher` `v` join `co-operativebank-simuldari`.`ledger` `l1`) join `co-operativebank-simuldari`.`ledger` `l2`) join `co-operativebank-simuldari`.`sub_head` `sh1`) join `co-operativebank-simuldari`.`sub_head` `sh2`) join `co-operativebank-simuldari`.`deposit_acc` `da`) where ((`v`.`cash_acc` = `l1`.`acc_no`) and (`v`.`Acc_no` = `l2`.`acc_no`) and (`l1`.`sub_head` = `sh1`.`code`) and (`l2`.`sub_head` = `sh2`.`code`) and (`da`.`acc_no` = `v`.`Acc_no`))
