protected function pImpostoDanfeHelper($x, $y, $w, $h, $titulo, $campoImposto)
{
$valorImposto = '0, 00';
$the_field = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0);
if (isset($the_field)) {
$the_value = $the_field->nodeValue;
if (!empty($the_value)) {
$valorImposto = number_format($the_value, 2, ",", ".");
}
}
$fontTitulo = array('font' => $this->fontePadrao, 'size' => 6, 'style' => '');
$fontValor = array('font' => $this->fontePadrao, 'size' => 10, 'style' => 'B');
$this->pTextBox($x, $y, $w, $h, $titulo, $fontTitulo, 'T', 'L', 1, '');
$this->pTextBox($x, $y, $w, $h, $valorImposto, $fontValor, 'B', 'R', 0, '');
$next_x = $x + $w;
return $next_x;
}