<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<!------ Include the above in your HEAD tag ---------->


<!--BEGIN HEAD-->
<!--<small>-->
<div id="container" style="width:95%; margin-left:2vw">
    <div class="card border-info mb-3 text-center">
        <div class="card-header">
            <h5 class="card-title text-dark text-left">LIDER AR CONDICIONADO AUTOMOTIVO</h5>
            <h6 class="card-subtitle mb-2 text-muted text-left"">CNPJ:13.385.986/0001-07 -CF/DF:07.568.784/001-76</h6>
            <h6 class="card-subtitle mb-2 text-muted text-left"">SMSE CJ 3 LT 4 B SAMAMBAIA-SUL</h6>
            <h6 class="card-subtitle mb-2 text-muted text-left"">(61) 98164-0789</h6>
            <h5 class="card-title text-dark">ORDEM DE SERVICO # <?php echo $manutencao->ID_PREVENTIVA ?></h5>
        </div>

        <div class="card-header">

            <div class="row">
                <div class="col-md-6"><h5 class="card-title text-dark text-left">Cliente: VIACAO PIONEIRA LTDA</h5>
                </div>
                <div class="col-md-6"><h5 class="card-title text-dark text-left">Codigo: 0010 </h5></div>
            </div>
            <div class="row">
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Comercial: 61 2106.9400</h6>
                </div>
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Comercial: 61 2106.9446</h6>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Cidade: Brasilia</h6></div>
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Estado: DF</h6></div>
            </div>

            <div class="row">
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">CNPJ: 05.830.982/0001-62</h6>
                </div>
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Pessoa p/ Contato:
                    OSEIAS</h6></div>
            </div>


        </div>
        <div class="card-header">
            <h5 class="card-title text-dark">INFORMACOES DA OS</h5>
            <div class="row">
                <div class="col-md-6"><h5 class="card-title text-dark text-left">
                        Garagem: <?php echo $manutencao->GARAGEM ?></h5></div>
                <div class="col-md-6"><h5 class="card-title text-dark text-left">Prefixo
                        Veiculo: <?php echo $manutencao->PREFIXO . ' - ' . $manutencao->PLACA ?></h5></div>
            </div>
            <div class="row">
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Tipo de Atendimento:
                    Manutencao <?php echo $manutencao->DS_TIPO_MANUTENCAO == 'C' ? 'Corretiva' : 'Preventiva' ?></h6>
                </div>
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Local de Atendimento: Externo
                    - Empresa</h6></div>
            </div>
            <div class="row">
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"
                    ">Solicitante: <?php echo $manutencao->SOLICITANTE ?></h6></div>
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Tel. Solicitante:</h6></div>
            </div>

            <div class="row">
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Data de
                    Cadastro: <?php echo date(('d/m/Y'), strtotime($manutencao->DT_PREVENTIVA)); ?> </h6></div>
            </div>
            <div class="row">
                <div class="col-md-6"><h6 class="card-subtitle mb-2 text-muted text-left"">Tecnico
                    Responsavel: <?php echo $manutencao->nomeFuncionario ?> </h6></div>

            </div>
            <?php if ($manutencao->DT_FINALIZACAO) { ?>
                <h2 style="color: red; font-style: italic; margin-left: 40px;">
                    Data Finalização: <?php echo date('d/m/Y', strtotime($manutencao->DT_FINALIZACAO)) ?> </h2>
            <?php } ?>
        </div>
        <div class="card-header">
            <h6 class="card-subtitle mb-2 text-muted text-left"">Defeito Reclamado:</h6>
            <h6 class="card-subtitle mb-2 text-muted text-left"">AR NAO ESFRIA</h6>
        </div>
        <div class="card-header" style="background-color: #9e9e9e">
            <h5 class="card-title">SERVICOS REALIZADOS</h5>
        </div>
        <div class="card-body">
            <table class="table table-hover group table-striped">
                <table class="table table-hover group table-striped">
                    <thead>
                    <tr style="font-size: x-small">
                        <th>#</th>
                        <th>DESCRÇÃO</th>
                        <th>GRUPO</th>
                        <th>FREQUENCIA</th>
                        <th>APLICACAO</th>
                        <th>GARANTIA</th>
                    </tr>
                    </thead>
                    <tbody>

                    <?php foreach ($servicosPorManutencao as $p) { ?>
                        <tr style="font-size: small">
                            <td><?php echo $p->ID_SERVICO ?></td>
                            <td><?php echo $p->DS_DESCRICAO_SERVICO ?></td>
                            <td style="font-size: x-small"><?php echo $p->DS_GRUPO ?></td>
                            <td><?php echo $p->DS_FREQUENCIA ?></td>
                            <td><?php echo $p->DS_APLICACAO ?></td>
                            <td><?php echo $p->NU_MESES_GARANTIA ?></td>
                        </tr>
                    <?php } ?>

                    </tbody>
                </table>

                <div class="card-footer text-muted">

                </div>
        </div>

        <div class="card-header" style="background-color: #9e9e9e">
            <h5 class="card-title">Produtos / Pecas Utilizadas</h5>
        </div>
        <div class="card-body">
            <table class="table table-hover group table-striped">
                <table class="table table-hover group table-striped">
                    <thead>
                    <tr style="font-size: x-small">
                        <th>#</th>
                        <th>DESCRÇÃO</th>
                        <th>FABRICANTE</th>
                        <th>MARCA</th>
                        <th>GRUPO</th>
                        <th>GARANTIA</th>
                        <th>VIDA ÚTIL</th>
                        <th>UNID MEDIDA</th>
                        <th>QTDE USADA</th>
                    </tr>
                    </thead>
                    <tbody>

                    <?php foreach ($pecasPorManutencao as $p) { ?>
                        <tr style="font-size: small">
                            <td><?php echo $p->ID_PECA ?></td>
                            <td><?php echo $p->DS_DESCRICAO_PECA ?></td>
                            <td style="font-size: x-small"><?php echo $p->DS_FABRICANTE ?></td>
                            <td><?php echo $p->DS_MARCA ?></td>
                            <td><?php echo $p->DS_GRUPO ?></td>
                            <td style="font-size: x-small"><span
                                        class="label label-danger"><?php echo $p->NU_MESES_GARANTIA . ' Meses' ?></span>
                            </td>
                            <td style="font-size: x-small"><?php echo $p->NU_MESES_VIDA_UTIL . ' Meses' ?></td>
                            <td><?php echo $p->DS_UNIDADE_MEDIDA ?></td>
                            <td><?php echo $p->NU_QUANTIDADE ?></td>
                        </tr>
                    <?php } ?>

                    </tbody>
                </table>

                <div class="card-footer text-muted">

                </div>
        </div>


    </div>
</div>


