<?php use_helper('UrlFunctions'); ?>
<?php

if(isset($delete)){
  if($id){
    $o_ArBancoDP = new ArBancoDP();
    $o_ArBancoDP->setIdbanco($id);
    $o_ArBancoDP->setEliminado("1");
    $o_ArBancoDP->setFechaeliminado(date( "Y-m-d H:i:s" ));
    $o_ArBancoDP->setUsuarioeliminado(myUser::getUser()->getUserId());
    
    $bResult = $o_ArBancoDP->delete();
    
    if($bResult){
      ?>
      <script language="JavaScript">
      parent.objMainTab.reqBody('<?=buildUrl('bancocta/list')?>','001&delete=1&cod=<?=$id?>');
      parent.objMainTab.windowsCloseAll();
      </script>
      <?
      
    }else{
       $url = buildUrl('cli/delete', "block=".$block."&error=1");
    }
  } 
}
