TYPE=VIEW
query=select (((select sum(`heads_voucher`.`cr`) AS `bal` from `co-operativebank`.`heads_voucher` where (((`heads_voucher`.`type` = \'CASH\') or (`heads_voucher`.`htcode` = \'11000\') or (`heads_voucher`.`htcode` = \'13000\') or (`heads_voucher`.`htcode` = \'14000\') or (`heads_voucher`.`htcode` = \'23000\') or (`heads_voucher`.`main_head` = \'50000\') or (`heads_voucher`.`main_head` = \'40000\') or (`heads_voucher`.`main_head` = \'60000\') or (`heads_voucher`.`main_head` = \'30000\')) and (`heads_voucher`.`htcode` <> \'64000\') and (`heads_voucher`.`htcode` <> \'65000\') and (`heads_voucher`.`date` < \'2018-05-07\'))) - (select sum(`heads_voucher`.`dr`) AS `bal` from `co-operativebank`.`heads_voucher` where (((`heads_voucher`.`type` = \'CASH\') or (`heads_voucher`.`htcode` = \'11000\') or (`heads_voucher`.`htcode` = \'13000\') or (`heads_voucher`.`htcode` = \'14000\') or (`heads_voucher`.`htcode` = \'23000\') or (`heads_voucher`.`main_head` = \'60000\') or (`heads_voucher`.`main_head` = \'30000\') or (`heads_voucher`.`htcode` = \'21000\') or (`heads_voucher`.`main_head` = \'50000\') or (`heads_voucher`.`main_head` = \'40000\')) and (`heads_voucher`.`htcode` <> \'64000\') and (`heads_voucher`.`htcode` <> \'65000\') and (`heads_voucher`.`date` < \'2018-05-07\')))) - (select (sum(`heads_voucher`.`cr`) - sum(`heads_voucher`.`dr`)) AS `bal` from `co-operativebank`.`heads_voucher` where (((`heads_voucher`.`htcode` = \'28000\') or (`heads_voucher`.`htcode` = \'22000\')) and (`heads_voucher`.`date` < \'2018-05-07\')))) AS `opbal`
md5=345a9cfbc2e8a70d81d912b49d5f06de
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2018-05-08 05:45:35
create-version=1
source=SELECT ((SELECT  SUM( cr )  bal FROM heads_voucher WHERE ( type=\'CASH\' or htcode =  \'11000\' OR htcode =  \'13000\' OR htcode =  \'14000\' OR htcode =  \'23000\' OR main_head =  \'50000\' OR main_head =  \'40000\' OR main_head =  \'60000\' OR main_head =  \'30000\'    ) and htcode<>\'64000\' and  htcode <> \'65000\' AND DATE <\'2018-05-07\' )- ( SELECT  SUM( dr )  bal FROM heads_voucher WHERE ( type=\'CASH\'  or htcode =  \'11000\' OR htcode =  \'13000\' OR htcode =  \'14000\' OR htcode =  \'23000\' OR main_head =  \'60000\' OR main_head =  \'30000\' OR htcode = \'21000\' OR main_head =  \'50000\' OR main_head =  \'40000\'  ) and htcode<>\'64000\' and  htcode <> \'65000\' AND DATE <\'2018-05-07\' ) - (SELECT  SUM( cr ) - SUM( dr )  bal FROM heads_voucher WHERE ( htcode =  \'28000\' OR htcode =  \'22000\' ) AND DATE <\'2018-05-07\')) as opbal
client_cs_name=latin1
connection_cl_name=latin1_swedish_ci
view_body_utf8=select (((select sum(`heads_voucher`.`cr`) AS `bal` from `co-operativebank`.`heads_voucher` where (((`heads_voucher`.`type` = \'CASH\') or (`heads_voucher`.`htcode` = \'11000\') or (`heads_voucher`.`htcode` = \'13000\') or (`heads_voucher`.`htcode` = \'14000\') or (`heads_voucher`.`htcode` = \'23000\') or (`heads_voucher`.`main_head` = \'50000\') or (`heads_voucher`.`main_head` = \'40000\') or (`heads_voucher`.`main_head` = \'60000\') or (`heads_voucher`.`main_head` = \'30000\')) and (`heads_voucher`.`htcode` <> \'64000\') and (`heads_voucher`.`htcode` <> \'65000\') and (`heads_voucher`.`date` < \'2018-05-07\'))) - (select sum(`heads_voucher`.`dr`) AS `bal` from `co-operativebank`.`heads_voucher` where (((`heads_voucher`.`type` = \'CASH\') or (`heads_voucher`.`htcode` = \'11000\') or (`heads_voucher`.`htcode` = \'13000\') or (`heads_voucher`.`htcode` = \'14000\') or (`heads_voucher`.`htcode` = \'23000\') or (`heads_voucher`.`main_head` = \'60000\') or (`heads_voucher`.`main_head` = \'30000\') or (`heads_voucher`.`htcode` = \'21000\') or (`heads_voucher`.`main_head` = \'50000\') or (`heads_voucher`.`main_head` = \'40000\')) and (`heads_voucher`.`htcode` <> \'64000\') and (`heads_voucher`.`htcode` <> \'65000\') and (`heads_voucher`.`date` < \'2018-05-07\')))) - (select (sum(`heads_voucher`.`cr`) - sum(`heads_voucher`.`dr`)) AS `bal` from `co-operativebank`.`heads_voucher` where (((`heads_voucher`.`htcode` = \'28000\') or (`heads_voucher`.`htcode` = \'22000\')) and (`heads_voucher`.`date` < \'2018-05-07\')))) AS `opbal`
