{{ $j }}
|
{{ $category->nome }}
|
@php
$cpf = $category->cpf;
if (strlen($cpf) === 11) {
$cpf = substr_replace($cpf, '.', 3, 0);
$cpf = substr_replace($cpf, '.', 7, 0);
$cpf = substr_replace($cpf, '-', 11, 0);
} elseif (strlen($cpf) === 14) {
$cpf = substr_replace($cpf, '.', 2, 0);
$cpf = substr_replace($cpf, '.', 6, 0);
$cpf = substr_replace($cpf, '/', 10, 0);
$cpf = substr_replace($cpf, '-', 15, 0);
}
@endphp
{{ $cpf }}
|
@php
$telefone = $category->telefone;
if (strlen($telefone) === 11) {
$telefone = substr_replace($telefone, '(', 0, 0);
$telefone = substr_replace($telefone, ')', 3, 0);
$telefone = substr_replace($telefone, ' ', 4, 0);
$telefone = substr_replace($telefone, ' ', 6, 0);
$telefone = substr_replace($telefone, '-', 11, 0);
}
@endphp{{ $telefone }} |
{{ $category->email }} |
{{ $proposta->valorUnitario }} |
@php
$valor = limpaValor($category->valortotal);
$tamanhoValor = strlen($valor);
if ($tamanhoValor > 2 && $valor[$tamanhoValor - 3] != ',') {
$valor = substr_replace($valor, ',', $tamanhoValor, 0);
$valor = substr_replace($valor, '0', $tamanhoValor + 1, 0);
$valor = substr_replace($valor, '0', $tamanhoValor + 2, 0);
}
$tamanhoValor = strlen($valor);
if ($tamanhoValor > 6) {
$valor = substr_replace($valor, '.', -6, 0);
}
if ($tamanhoValor > 10) {
$valor = substr_replace($valor, '.', -10, 0);
}
if ($tamanhoValor > 15) {
$valor = substr_replace($valor, '.', -15, 0);
}
$valor = substr_replace($valor, ' ', 0, 0);
$valor = substr_replace($valor, '$', 0, 0);
$valor = substr_replace($valor, 'R', 0, 0);
@endphp
{{ $valor }} |
{{ date('d/m/Y', strtotime($category->created_at)) }} |
@if(isset($category->proposta))
@endif
|
|
@endforeach
@endif
@endforeach