NFePHP\Extras\Danfe::pGetTextoFatura PHP Method

pGetTextoFatura() protected method

pGetTextoFatura Gera a String do Texto da Fatura
protected pGetTextoFatura ( ) : a
return a String com o texto ou "";
    protected function pGetTextoFatura()
    {
        if (isset($this->cobr)) {
            $fat = $this->cobr->getElementsByTagName("fat")->item(0);
            if (isset($fat)) {
                $textoIndPag = "";
                $indPag = $this->pSimpleGetValue($this->ide, "indPag");
                if ($indPag == 0) {
                    $textoIndPag = "Pagamento à Vista - ";
                } elseif ($indPag == 1) {
                    $textoIndPag = "Pagamento à Prazo - ";
                }
                $nFat = $this->pSimpleGetValue($fat, "nFat", "Fatura: ");
                $vOrig = $this->pSimpleGetValue($fat, "vOrig", " Valor Original: ");
                $vDesc = $this->pSimpleGetValue($fat, "vDesc", " Desconto: ");
                $vLiq = $this->pSimpleGetValue($fat, "vLiq", " Valor Líquido: ");
                $texto = $textoIndPag . $nFat . $vOrig . $vDesc . $vLiq;
                return $texto;
            }
        }
        return "";
    }