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

if(isset($delete)){
  if($id){
    $o_GastoOperativoBean = new GastoOperativoBean();
    $o_GastoOperativoBean->setIdGastoOperativo($id);
    
    $o_GastoOperativoBean->setUsuarioEliminado(myUser::getUser()->getUserId());
    $o_GastoOperativoSystemClass = new GastoOperativoDP($o_GastoOperativoBean);
    $bResult = $o_GastoOperativoSystemClass->delete();
    
    if($bResult){
      ?>
      <script language="JavaScript">
      parent.objMainTab.reqBody('<?=buildUrl('gope/list')?>','001&delete=1&cod=<?=$o_GastoOperativoBean->getIdGastoOperativo()?>');
      parent.objMainTab.windowsCloseAll();
      </script>
      <?
      
    }else{
       $url = buildUrl('suc/delete', "block=".$block."&error=1");
    }
  } 
}
