DanfeEtiqueta
extends DaCommon
in package
Table of Contents
Properties
- $aFont : array<string|int, mixed>
- $canceled : mixed
- $cancelFlag : bool
- $compra : mixed
- $creditos : string
- $debugmode : bool
- $decimalPlaces : int
- $descPercent : mixed
- $dest : mixed
- $det : mixed
- $dom : mixed
- $email : mixed
- $emit : mixed
- $enderDest : mixed
- $enderEmit : mixed
- $fontePadrao : string
- $formatoChave : mixed
- $hBoxLinha : mixed
- $hLinha : mixed
- $hMaxLinha : mixed
- $hPrint : float
- $ICMSTot : mixed
- $ide : mixed
- $imposto : mixed
- $infAdFisco : mixed
- $infAdic : mixed
- $infCpl : mixed
- $infNFe : mixed
- $infProt : mixed
- $itens : mixed
- $logoAlign : string
- $logomarca : string
- $margem : mixed
- $margesq : int
- $marginf : int
- $margsup : int
- $maxH : float
- $maxW : float
- $nfe : mixed
- $nfeProc : mixed
- $numdepec : string
- $orientacao : string
- $pag : mixed
- $papel : string|array<string|int, mixed>
- $paperlength : mixed
- $paperwidth : mixed
- $pdf : Pdf
- $powered : bool
- $submessage : mixed
- $textoAdic : mixed
- $tpAmb : mixed
- $tpEmis : mixed
- $tpImp : mixed
- $urlQR : mixed
- $vTroco : mixed
- $wPrint : float
- $xIni : float
- $xml : mixed
- $yIni : float
Methods
- __construct() : mixed
- Construtor
- creditsIntegratorFooter() : void
- Add the credits to the integrator in the footer message
- debugMode() : bool
- Ativa ou desativa o modo debug
- depecNumber() : void
- Numero DPEC
- logoParameters() : void
- Set logo e sua posição
- printParameters() : void
- Define parametros de impressão
- render() : string
- Renderiza o pdf
- setCancelFlag() : mixed
- Atribui uma sinalização de cancelamento externa
- setDefaultDecimalPlaces() : mixed
- Seta o numero de casas decimais a serem usadas como padrão
- setDefaultFont() : mixed
- Seta a fonte padrão é times
- setEmitEmail() : mixed
- setFont() : mixed
- Seta a fonte a ser usada times ou arial
- setMargins() : mixed
- Seta as margens de impressão em mm
- setPaperLength() : mixed
- Seta a largura do papel de impressão em mm
- setPaperWidth() : mixed
- Seta a largura do papel de impressão em mm
- toDateTime() : DateTime|false
- Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para \DateTime
- toTimestamp() : int
- Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para timestamp unix
- adjustImage() : string
- Ajusta a imagem do logo
- bloco1() : mixed
- bloco2() : mixed
- bloco3() : mixed
- bloco4() : mixed
- bloco5() : mixed
- formatField() : string
- Função de formatação de strings onde o cerquilha # é um coringa que será substituido por digitos contidos em campo.
- getTagDate() : string
- Recupera e reformata a data do padrão da NFe para dd/mm/aaaa
- getTagValue() : string
- Extrai o valor do node DOM
- modulo11() : int
- camcula digito de controle modulo 11
- monta() : mixed
- Metodo de montagem do PDF
- tipoPag() : mixed
- ymdTodmy() : string
- Converte datas no formato YMD (ex. 2009-11-02) para o formato brasileiro 02/11/2009)
- loadXml() : mixed
- Carrega os dados do xml na classe
Properties
$aFont
protected
array<string|int, mixed>
$aFont
= []
$canceled
protected
mixed
$canceled
= false
$cancelFlag
protected
bool
$cancelFlag
= false
$compra
protected
mixed
$compra
$creditos
protected
string
$creditos
$debugmode
protected
bool
$debugmode
$decimalPlaces
protected
int
$decimalPlaces
$descPercent
protected
mixed
$descPercent
= 0.38
$dest
protected
mixed
$dest
$det
protected
mixed
$det
$dom
protected
mixed
$dom
protected
mixed
$email
= null
$emit
protected
mixed
$emit
$enderDest
protected
mixed
$enderDest
$enderEmit
protected
mixed
$enderEmit
$fontePadrao
protected
string
$fontePadrao
= 'arial'
$formatoChave
protected
mixed
$formatoChave
= "#### #### #### #### #### #### #### #### #### #### ####"
$hBoxLinha
protected
mixed
$hBoxLinha
= 6
$hLinha
protected
mixed
$hLinha
= 3
$hMaxLinha
protected
mixed
$hMaxLinha
= 5
$hPrint
protected
float
$hPrint
$ICMSTot
protected
mixed
$ICMSTot
$ide
protected
mixed
$ide
$imposto
protected
mixed
$imposto
$infAdFisco
protected
mixed
$infAdFisco
$infAdic
protected
mixed
$infAdic
$infCpl
protected
mixed
$infCpl
$infNFe
protected
mixed
$infNFe
$infProt
protected
mixed
$infProt
$itens
protected
mixed
$itens
= []
$logoAlign
protected
string
$logoAlign
= 'C'
$logomarca
protected
string
$logomarca
= ''
$margem
protected
mixed
$margem
= 3
$margesq
protected
int
$margesq
= 2
$marginf
protected
int
$marginf
= 2
$margsup
protected
int
$margsup
= 2
$maxH
protected
float
$maxH
$maxW
protected
float
$maxW
$nfe
protected
mixed
$nfe
$nfeProc
protected
mixed
$nfeProc
$numdepec
protected
string
$numdepec
$orientacao
protected
string
$orientacao
$pag
protected
mixed
$pag
$papel
protected
string|array<string|int, mixed>
$papel
$paperlength
protected
mixed
$paperlength
= 150
$paperwidth
protected
mixed
$paperwidth
= 100
protected
Pdf
$pdf
$powered
protected
bool
$powered
= true
$submessage
protected
mixed
$submessage
= null
$textoAdic
protected
mixed
$textoAdic
$tpAmb
protected
mixed
$tpAmb
$tpEmis
protected
mixed
$tpEmis
$tpImp
protected
mixed
$tpImp
$urlQR
protected
mixed
$urlQR
= ''
$vTroco
protected
mixed
$vTroco
$wPrint
protected
float
$wPrint
$xIni
protected
float
$xIni
$xml
protected
mixed
$xml
$yIni
protected
float
$yIni
Methods
__construct()
Construtor
public
__construct(string $xml) : mixed
Parameters
- $xml : string
Tags
creditsIntegratorFooter()
Add the credits to the integrator in the footer message
public
creditsIntegratorFooter([string $message = '' ][, bool $powered = true ]) : void
Parameters
- $message : string = ''
-
Mensagem do integrador a ser impressa no rodapé das paginas
- $powered : bool = true
debugMode()
Ativa ou desativa o modo debug
public
debugMode([bool $activate = null ]) : bool
Parameters
- $activate : bool = null
-
Ativa ou desativa o modo debug
Tags
Return values
booldepecNumber()
Numero DPEC
public
depecNumber(string $numdepec) : void
Parameters
- $numdepec : string
logoParameters()
Set logo e sua posição
public
logoParameters(string $logo[, string $logoAlign = null ][, bool $mode_bw = false ]) : void
Parameters
- $logo : string
- $logoAlign : string = null
- $mode_bw : bool = false
-
se true converte a imagem em branco e preto
printParameters()
Define parametros de impressão
public
printParameters([string $orientacao = '' ][, string $papel = 'A4' ][, int $margSup = 2 ][, int $margEsq = 2 ]) : void
Parameters
- $orientacao : string = ''
- $papel : string = 'A4'
- $margSup : int = 2
- $margEsq : int = 2
render()
Renderiza o pdf
public
render([string $logo = '' ]) : string
Parameters
- $logo : string = ''
Return values
stringsetCancelFlag()
Atribui uma sinalização de cancelamento externa
public
setCancelFlag([bool $cancelFlag = true ]) : mixed
Parameters
- $cancelFlag : bool = true
setDefaultDecimalPlaces()
Seta o numero de casas decimais a serem usadas como padrão
public
setDefaultDecimalPlaces(int $dec) : mixed
Parameters
- $dec : int
setDefaultFont()
Seta a fonte padrão é times
public
setDefaultFont([string $font = 'times' ]) : mixed
Parameters
- $font : string = 'times'
setEmitEmail()
public
setEmitEmail(mixed $email) : mixed
Parameters
- $email : mixed
setFont()
Seta a fonte a ser usada times ou arial
public
setFont([string $font = 'arial' ]) : mixed
Parameters
- $font : string = 'arial'
setMargins()
Seta as margens de impressão em mm
public
setMargins([int $width = 1 ]) : mixed
Parameters
- $width : int = 1
setPaperLength()
Seta a largura do papel de impressão em mm
public
setPaperLength([mixed $length = 150 ]) : mixed
Parameters
- $length : mixed = 150
setPaperWidth()
Seta a largura do papel de impressão em mm
public
setPaperWidth([int $width = 100 ]) : mixed
Parameters
- $width : int = 100
toDateTime()
Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para \DateTime
public
toDateTime(string $input) : DateTime|false
Parameters
- $input : string
Return values
DateTime|falsetoTimestamp()
Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para timestamp unix
public
toTimestamp(string $input) : int
Parameters
- $input : string
Return values
intadjustImage()
Ajusta a imagem do logo
protected
adjustImage(string $logo[, bool $turn_bw = false ]) : string
Parameters
- $logo : string
- $turn_bw : bool = false
Tags
Return values
stringbloco1()
protected
bloco1(mixed $y) : mixed
Parameters
- $y : mixed
bloco2()
protected
bloco2(mixed $y) : mixed
Parameters
- $y : mixed
bloco3()
protected
bloco3(mixed $y) : mixed
Parameters
- $y : mixed
bloco4()
protected
bloco4(mixed $y) : mixed
Parameters
- $y : mixed
bloco5()
protected
bloco5(mixed $y) : mixed
Parameters
- $y : mixed
formatField()
Função de formatação de strings onde o cerquilha # é um coringa que será substituido por digitos contidos em campo.
protected
formatField([string $campo = '' ][, string $mascara = '' ]) : string
Parameters
- $campo : string = ''
-
String a ser formatada
- $mascara : string = ''
-
Regra de formatção da string (ex. ##.###.###/####-##)
Return values
string —Retorna o campo formatado
getTagDate()
Recupera e reformata a data do padrão da NFe para dd/mm/aaaa
protected
getTagDate(DOM $theObj, string $keyName[, string $extraText = '' ]) : string
Parameters
- $theObj : DOM
- $keyName : string
-
identificador da TAG do xml
- $extraText : string = ''
-
prefixo do retorno
Tags
Return values
stringgetTagValue()
Extrai o valor do node DOM
protected
getTagValue(object $theObj, string $keyName[, string $extraTextBefore = '' ][, mixed $extraTextAfter = '' ][, mixed $itemNum = 0 ]) : string
Parameters
- $theObj : object
-
Instancia de DOMDocument ou DOMElement
- $keyName : string
-
identificador da TAG do xml
- $extraTextBefore : string = ''
-
prefixo do retorno
- $extraTextAfter : mixed = ''
- $itemNum : mixed = 0
Return values
stringmodulo11()
camcula digito de controle modulo 11
protected
modulo11([string $numero = '' ]) : int
Parameters
- $numero : string = ''
Return values
int —modulo11 do numero passado
monta()
Metodo de montagem do PDF
protected
monta([mixed $logo = '' ]) : mixed
Parameters
- $logo : mixed = ''
tipoPag()
protected
tipoPag(mixed $tPag) : mixed
Parameters
- $tPag : mixed
ymdTodmy()
Converte datas no formato YMD (ex. 2009-11-02) para o formato brasileiro 02/11/2009)
protected
ymdTodmy([string $data = '' ]) : string
Parameters
- $data : string = ''
-
Parâmetro extraido da NFe
Return values
string —Formatada para apresentação da data no padrão brasileiro
loadXml()
Carrega os dados do xml na classe
private
loadXml() : mixed