<?php
    $controller = 'Special-requisition';
    $action = 'print';

    include $_SERVER["DOCUMENT_ROOT"].'/app/include/bootstrap.php';?>
<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link href="<?php echo ROOT_HOST?>/public/bootstrap/css/bootstrap.min.css" rel="stylesheet">     
</head><?php
/* INFORMACION EMPRESA */
$empresa = new CompanyEntity();
$empresa->setOptions($empresa->getById(1)); 

$nombreEmpresa  = $empresa->getName();
$direccion      = $empresa->getAddress();
$ciudadEstadoZC = $empresa->getCity().', '.$empresa->getState().' '.$empresa->getZipCode();
$telefono       = $empresa->getPhone();  

/* SPECIAL REQUISITION INFORMATION */
$entity = new SpecialRequisitionRepository();
$entity->setOptions($entity->getById($_GET['idReq']));
?>
<div id="printArea">
    <div style="font-family: Arial,Helvetica Neue,Helvetica,sans-serif;margin-top:0px">
        <div style="text-align: left; margin-left:0px;margin-top: 0px; padding:1px">
            <h4 style="font-size: 11px;margin-bottom:0px"><b>Orden Especial #: </b><?php echo $entity->getReqNumber(); ?></h4>
            <h4 style=" font-size: 11px;margin-bottom:0px"><b>Cliente: </b><?php echo $entity->getCustomerName(); ?></h4>
            <h4 style=" font-size: 11px;margin-bottom:0px"><b>Entrega: </b><?php echo $entity->getFormatDeliveryDate();?></h4>
      <?php #if($entity->getBalance() > 0){?>
                <h4 style=" font-size: 11px;margin-bottom:0px"><b>Saldo pendiente: </b><?php echo " $".number_format($entity->getBalance(),2);?></h4>
      <?php #}?>            
        </div>  
    </div>
</div>
    <script type="text/javascript">
        self.print();
    </script>
</body>
</html>
