nFloat() public static method

Mostra o Valor no float Formatado
public static nFloat ( string $number, integer $decimals = 2, boolean $showThousands = false ) : string
$number string
$decimals integer
$showThousands boolean
return string
 /**
  * Retorna o campo "valor" do boleto
  *
  * @return float
  */
 public function getValorUnitario()
 {
     return Util::nFloat($this->valorUnitario, 2, false);
 }
 public function getValorMulta($default = ' ')
 {
     return Util::nFloat($this->isEmpty($this->valorMulta) ? $default : $this->valorMulta);
 }
Example #3
0
 protected function processarTrailer(array $trailer)
 {
     $this->trailer->quantidadeTitulos = (int) $this->rem(18, 25, $trailer) + (int) $this->rem(58, 65, $trailer) + (int) $this->rem(178, 185, $trailer);
     $this->trailer->valorTitulos = Util::nFloat($this->rem(221, 234, $trailer) / 100);
     $this->trailer->quantidadeErros = (int) $this->totais['erros'];
     $this->trailer->quantidadeEntradas = (int) $this->totais['entradas'];
     $this->trailer->quantidadeLiquidados = (int) $this->totais['liquidados'];
     $this->trailer->quantidadeBaixados = (int) $this->totais['baixados'];
     $this->trailer->quantidadeAlterados = (int) $this->totais['alterados'];
 }
Example #4
0
 protected function processarTrailer(array $trailer)
 {
     $this->getTrailer()->setQuantidadeTitulos((int) $this->count())->setValorTitulos((double) Util::nFloat($this->totais['valor_recebido'], 2, false))->setQuantidadeErros((int) $this->totais['erros'])->setQuantidadeEntradas((int) $this->totais['entradas'])->setQuantidadeLiquidados((int) $this->totais['liquidados'])->setQuantidadeBaixados((int) $this->totais['baixados'])->setQuantidadeAlterados((int) $this->totais['alterados']);
     return true;
 }
Example #5
0
 /**
  * @param array $trailerLote
  *
  * @return boolean
  */
 protected function processarTrailerLote(array $trailer)
 {
     $this->getTrailerLote()->setLoteServico($this->rem(4, 7, $trailer))->setTipoRegistro($this->rem(8, 8, $trailer))->setQtdRegistroLote((int) $this->rem(18, 23, $trailer))->setQtdTitulosCobrancaSimples((int) $this->rem(24, 29, $trailer))->setValorTotalTitulosCobrancaSimples(Util::nFloat($this->rem(30, 46, $trailer)) / 100, 2, false)->setQtdTitulosCobrancaVinculada((int) $this->rem(47, 52, $trailer))->setValorTotalTitulosCobrancaVinculada(Util::nFloat($this->rem(53, 69, $trailer)) / 100, 2, false)->setQtdTitulosCobrancaCaucionada((int) $this->rem(70, 75, $trailer))->setValorTotalTitulosCobrancaCaucionada(Util::nFloat($this->rem(76, 92, $trailer)) / 100, 2, false)->setQtdTitulosCobrancaDescontada((int) $this->rem(93, 98, $trailer))->setValorTotalTitulosCobrancaDescontada(Util::nFloat($this->rem(99, 115, $trailer)) / 100, 2, false)->setNumeroAvisoLancamento($this->rem(116, 123, $trailer));
     return true;
 }
Example #6
0
 protected function processarTrailer(array $trailer)
 {
     $this->trailer->quantidadeTitulos = (int) $this->i;
     $this->trailer->valorTitulos = Util::nFloat(0);
     $this->trailer->quantidadeErros = (int) $this->totais['erros'];
     $this->trailer->quantidadeEntradas = (int) $this->totais['entradas'];
     $this->trailer->quantidadeLiquidados = (int) $this->totais['liquidados'];
     $this->trailer->quantidadeBaixados = (int) $this->totais['baixados'];
     $this->trailer->quantidadeAlterados = (int) $this->totais['alterados'];
 }
Example #7
0
 protected function processarTrailer(array $trailer)
 {
     $this->getTrailer()->setQuantidadeTitulos($this->rem(18, 25, $trailer))->setValorTitulos(Util::nFloat($this->rem(26, 39, $trailer) / 100, 2, false))->setQuantidadeErros((int) $this->totais['erros'])->setQuantidadeEntradas((int) $this->totais['entradas'])->setQuantidadeLiquidados((int) $this->totais['liquidados'])->setQuantidadeBaixados((int) $this->totais['baixados'])->setQuantidadeAlterados((int) $this->totais['alterados']);
     return true;
 }
 protected function processarTrailer(array $trailer)
 {
     $this->trailer->quantidadeTitulos = (int) $this->i;
     $this->trailer->valorTitulos = Util::nFloat($this->totais['valor']);
     $this->trailer->avisos = (int) $this->rem(40, 47, $trailer) + (int) $this->rem(120, 137, $trailer) + (int) $this->rem(160, 167, $trailer);
     $this->trailer->quantidadeErros = (int) $this->totais['erros'];
     $this->trailer->quantidadeEntradas = (int) $this->totais['entradas'];
     $this->trailer->quantidadeLiquidados = (int) $this->totais['liquidados'];
     $this->trailer->quantidadeBaixados = (int) $this->totais['baixados'];
     $this->trailer->quantidadeAlterados = (int) $this->totais['alterados'];
 }