<?php use_helper('UrlFunctions');

$o_BalanceGeneralBean = new BalanceGeneralBean();

$o_BalanceGeneralBean->setIdSucursal($id);	
$o_BalanceGeneralBean->setFecha($Fecha);
$o_BalanceGeneralBean->setFechaFinal($Fecha);

$o_BalanceGeneralDP = new BalanceGeneralDP($o_BalanceGeneralBean);
$a_o_resumenDiario = $o_BalanceGeneralDP->select();

?>
<img src="/images/common/spacer.gif" width="10">
<table class="cuerpo" width="98%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="0">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td class="titleBody">
            <li>Balance General</li>
            <span class="subtitle"><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:::&nbsp;Ficha de Balance General</I></span></td>
          <td align="right" valign="baseline">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
      <script type="text/javascript">
        validatePass = function(){
          
            valid.onSubmit = false;
          
        }
      </script>
  <tr>
    <td valign="top">
      <form id="form1" name="form1" method="POST">
      <input type="hidden" name="control" value="1">
        <table hspace="20px" class="marco" width="99%">
          <tr>
            <td valign="top">
               <table width="100%" border="0" cellpadding="5" cellspacing="0" style="background: #E3E9E2">
          		<tr>
    				  <td height="0">
    				 
    					<table width="100%" border="1" cellpadding="5" cellspacing="0">
      					 <?
	    					if(is_array($a_o_resumenDiario)){
	    						foreach ($a_o_resumenDiario as $key => $o_resumenHeader) {
									?>
									<tr>
		          						<td width="20%"><label class="label">Sucursal</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getNombreSucursal();?></label></td>		
		          					</tr>
									<tr>
		          						<td><label class="label">Administrador</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getNombreAdministrador();?></label></td>		
		          					</tr>
		          					<tr>
		          						<td><label class="label">F.Balance</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getFecha();?></label></td>		
		          					</tr>
		          					<tr>
		          						<td><label class="label">Total Balance Dia</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getTotalBalanceDia();?></label></td>		
		          					</tr>
		          						<tr>
		          						<td><label class="label">Total Gastos Generales</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getTotalGastoGeneral();?></label></td>		
		          					</tr>
		          					<tr>
		          						<td><label class="label">Total Balance Ingresos</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getTotalIngreso();?></label></td>		
		          					</tr>
		          					<tr>
		          						<td><label class="label">Total Adelanto Sueldo</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getTotalAdelantoSueldo();?></label></td>		
		          					</tr>
		          					<tr>
		          						<td><label class="label">Total</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getTotal();?></label></td>		
		          					</tr>
		          					<tr>
		          						<td><label class="label">U.Creaci&oacute;n</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getUsuarioCreacion();?></label></td>		
		          					</tr>
		          					<tr>
		          						<td><label class="label">F.Creaci&oacute;n</label></td>		
		      							<td><label class="label1"><?php echo $o_resumenHeader->getFechaCreacion();?></label></td>		
		          					</tr>
									<?php    							
	    						}
	    					}
	    				?>  
	    					
	    				</table>  
	    				 <table width="100%" border="0" cellspacing="0" cellpadding="0">
						  <tr>
							 <td><img src="/images/common/spacer.gif" width="10"></td>
						  </tr>
						  <tr>
							<td align="center">
							  <input type="hidden" name="typeSubmit" id="typeSubmit">
							  <input class="button" type="button" value="Volver" onclick="parent.objMainTab.reqBody('<?=buildUrl('bdg/list')?>','001')"/>
							</td>
						  </tr>
						  <tr>
							<td height="10">&nbsp;</td>
						  </tr>
						</table> 							
    				</td>
                </tr>
              </table>   	
      </form>
			<script type="text/javascript">
				var valid = new Validation('form1', {immediate : true});
			</script>
    </td>
  </tr>
</table>
