$expenseArray = $expenseDAO->RetrieveRecordArray("codigoChamado IN (" . $callEnumeration . ")");
// localiza todos os custos indiretos no período
$indirectCostDAO = new IndirectCostDAO($dataConnector->mysqlConnection);
$indirectCostDAO->showErrors = 1;
$indirectCostIdArray = $indirectCostDAO->GetIds("chamadoServico_id IN (" . $callEnumeration . ") GROUP BY custoIndireto_id");
$idEnumeration = "";
foreach ($indirectCostIdArray as $indirectCostId) {
    if (!empty($idEnumeration)) {
        $idEnumeration .= ", ";
    }
    $idEnumeration = $idEnumeration . $indirectCostId;
}
if (empty($idEnumeration)) {
    $idEnumeration = "0";
}
$indirectCostArray = $indirectCostDAO->RetrieveRecordArray("id IN (" . $idEnumeration . ")");
// localiza todos os gastos com consumíveis no período
$supplyRequestDAO = new SupplyRequestDAO($dataConnector->mysqlConnection);
$supplyRequestDAO->showErrors = 1;
$requestItemDAO = new RequestItemDAO($dataConnector->mysqlConnection);
$requestItemDAO->showErrors = 1;
$pediodFilter = "data >= '" . $startDate . " 00:00' AND data <= '" . $endDate . " 23:59' ";
$supplyRequestArray = $supplyRequestDAO->RetrieveRecordArray("codigoCartaoEquipamento IN (" . $equipmentEnumeration . ") AND " . $pediodFilter);
if (sizeof($expenseArray) < 1 && sizeof($indirectCostArray) < 1 && sizeof($supplyRequestArray) < 1) {
    echo "<tr>";
    echo "    <td colspan='4' align='center'>Nenhum registro encontrado!</td>";
    echo "</tr>";
    exit;
}
$somaTotais = 0;
$productionInputDAO = new ProductionInputDAO($dataConnector->mysqlConnection);
Example #2
0
include_once "../../DataAccessObjects/ProductionInputDAO.php";
include_once "../../DataTransferObjects/ProductionInputDTO.php";
// Abre a conexao com o banco de dados
$dataConnector = new DataConnector('mySql');
$dataConnector->OpenConnection();
if ($dataConnector->mysqlConnection == null) {
    echo 'Não foi possível se connectar ao bando de dados!';
    exit;
}
// Cria os objetos de mapeamento objeto-relacional
$indirectCostDAO = new IndirectCostDAO($dataConnector->mysqlConnection);
$indirectCostDAO->showErrors = 1;
$productionInputDAO = new ProductionInputDAO($dataConnector->mysqlConnection);
$productionInputDAO->showErrors = 1;
// Traz os custos indiretos cadastrados
$indirectCostArray = $indirectCostDAO->RetrieveRecordArray();
?>
    <h1>Administração - Custos Indiretos</h1>
    <h1><?php 
echo str_pad('_', 60, '_', STR_PAD_LEFT);
?>
</h1>
    <div style="clear:both;">
        <br/><br/>
    </div>

    <form id="fLista" name="fLista" action="Frontend/<?php 
echo $currentDir;
?>
/acao.php" method="post">
        <div class="clear">