protected function pDadosAdicionaisDANFE($x, $y, $h)
{
//##################################################################################
//DADOS ADICIONAIS
$texto = "DADOS ADICIONAIS";
if ($this->orientacao == 'P') {
$w = $this->wPrint;
} else {
$w = $this->wPrint - $this->wCanhoto;
}
$aFont = array('font' => $this->fontePadrao, 'size' => 7, 'style' => 'B');
$this->pTextBox($x, $y, $w, 8, $texto, $aFont, 'T', 'L', 0, '');
//INFORMAÇÕES COMPLEMENTARES
$texto = "INFORMAÇÕES COMPLEMENTARES";
$y += 3;
$w = $this->wAdic;
$aFont = array('font' => $this->fontePadrao, 'size' => 6, 'style' => 'B');
$this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
//o texto com os dados adicionais foi obtido na função montaDANFE
//e carregado em uma propriedade privada da classe
//$this->wAdic com a largura do campo
//$this->textoAdic com o texto completo do campo
$y += 1;
$aFont = array('font' => $this->fontePadrao, 'size' => 7, 'style' => '');
$this->pTextBox($x, $y + 2, $w - 2, $h - 3, $this->textoAdic, $aFont, 'T', 'L', 0, '', false);
//RESERVADO AO FISCO
$texto = "RESERVADO AO FISCO";
$x += $w;
$y -= 1;
if ($this->orientacao == 'P') {
$w = $this->wPrint - $w;
} else {
$w = $this->wPrint - $w - $this->wCanhoto;
}
$aFont = array('font' => $this->fontePadrao, 'size' => 6, 'style' => 'B');
$this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
//inserir texto informando caso de contingência
// 1 - Normal - emissão normal;
// 2 - Contingência FS - emissão em contingência com impressão do DANFE em Formulário de Segurança;
// 3 - Contingência SCAN - emissão em contingência no Sistema de Contingência do Ambiente Nacional;
// 4 - Contingência DPEC - emissão em contingência com envio da Declaração
// Prévia de Emissão em Contingência;
// 5 - Contingência FS-DA - emissão em contingência com impressão do DANFE em Formulário de
// Segurança para Impressão de Documento Auxiliar de Documento Fiscal Eletrônico (FS-DA);
// 6 - Contingência SVC-AN
// 7 - Contingência SVC-RS
$xJust = $this->pSimpleGetValue($this->ide, 'xJust', 'Justificativa: ');
$dhCont = $this->pSimpleGetValue($this->ide, 'dhCont', ' Entrada em contingência : ');
$texto = '';
switch ($this->tpEmis) {
case 2:
$texto = 'CONTINGÊNCIA FS' . $dhCont . $xJust;
break;
case 3:
$texto = 'CONTINGÊNCIA SCAN' . $dhCont . $xJust;
break;
case 4:
$texto = 'CONTINGÊNCIA DPEC' . $dhCont . $xJust;
break;
case 5:
$texto = 'CONTINGÊNCIA FSDA' . $dhCont . $xJust;
break;
case 6:
$texto = 'CONTINGÊNCIA SVC-AN' . $dhCont . $xJust;
break;
case 7:
$texto = 'CONTINGÊNCIA SVC-RS' . $dhCont . $xJust;
break;
}
$y += 2;
$aFont = array('font' => $this->fontePadrao, 'size' => 7, 'style' => '');
$this->pTextBox($x, $y, $w - 2, $h - 3, $texto, $aFont, 'T', 'L', 0, '', false);
return $y + $h;
}