本文整理汇总了PHP中Format::valorView方法的典型用法代码示例。如果您正苦于以下问题:PHP Format::valorView方法的具体用法?PHP Format::valorView怎么用?PHP Format::valorView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Format
的用法示例。
在下文中一共展示了Format::valorView方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPesoFemeaAttribute
public function getPesoFemeaAttribute($peso)
{
if (!empty($this->attributes['peso_femea'])) {
return $this->attributes['peso_femea'] = Format::valorView($peso, 2);
} else {
return 0;
}
}
示例2: Dados
function Dados()
{
$this->AddPage();
$w = [95, 41, 25];
$this->SetFillColor(0);
$this->SetTextColor(250);
$this->Cell($w[0], 6, utf8_decode('Corretor'), 1, 0, 'L', 1);
$this->Cell($w[1], 6, utf8_decode('Romaneio de Expedição'), 1, 0, 'L', 1);
$this->Cell($w[1], 6, utf8_decode('Romaneio Fiscal'), 1, 0, 'L', 1);
$this->Cell($w[2], 6, utf8_decode('ICMS'), 1, 0, 'L', 1);
$this->Cell($w[2], 6, utf8_decode('Pauta Fiscal'), 1, 0, 'L', 1);
$this->Cell($w[2], 6, utf8_decode('Saldo (KG)'), 1, 0, 'L', 1);
$this->Cell($w[2], 6, utf8_decode('Corte (%)'), 1, 0, 'L', 1);
$this->Ln();
$this->SetFont('Arial', '', 8);
$this->SetFillColor('220');
$this->SetTextColor(0);
$this->SetDrawColor(150);
$fill = 0;
$romaneio = 0;
$fiscal = 0;
$valor_fiscal = 0;
foreach (Corretor::all() as $corretor) {
$this->Cell($w[0], 6, utf8_decode($corretor->codigo_interno . ' - ' . $corretor->nome), 1, 0, 'L', $fill);
$this->Cell($w[1], 6, Format::valorView($corretor->peso_romaneio, 2), 1, 0, 'R', $fill);
$this->Cell($w[1], 6, Format::valorView($corretor->peso_fiscal, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, 'R$ ' . Format::valorView($corretor->icms, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, Format::valorView($corretor->pauta_fiscal, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, Format::valorView($corretor->peso_fiscal - $corretor->peso_romaneio, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, Format::valorView($corretor->corte, 2) . ' %', 1, 0, 'R', $fill);
$this->Ln();
$romaneio = $romaneio + $corretor->peso_romaneio;
$fiscal = $fiscal + $corretor->peso_fiscal;
$valor_fiscal = $valor_fiscal + $corretor->icms;
$fill = !$fill;
}
$this->SetFillColor(0);
$this->SetTextColor(250);
$this->Cell($w[0], 6, utf8_decode('TOTAIS'), 1, 0, 'L', $fill);
$this->Cell($w[1], 6, Format::valorView($romaneio, 2), 1, 0, 'R', $fill);
$this->Cell($w[1], 6, Format::valorView($fiscal, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, 'R$ ' . Format::valorView($valor_fiscal, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, Format::valorView($valor_fiscal / $fiscal, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, Format::valorView($fiscal - $romaneio, 2), 1, 0, 'R', $fill);
$this->Cell($w[2], 6, Format::valorView(($fiscal - $romaneio) / $romaneio * 100, 2) . ' %', 1, 0, 'R', $fill);
}
示例3: listar
public function listar($fefas)
{
$this->Cell(15, 4, 'Data Compra', 1, 0, "C", 1);
$this->Cell(37, 4, 'GTA', 1, 0, "C", 1);
$this->Cell(10, 4, 'SERIE', 1, 0, "C", 1);
$this->Cell(45, 4, 'NFP', 1, 0, "C", 1);
$this->Cell(40, 4, 'MUNICIPIO', 1, 0, "C", 1);
$this->Cell(40, 4, 'PRODUTOR', 1, 0, "C", 1);
$this->Cell(40, 4, 'PROPRIEDADE', 1, 0, "C", 1);
$this->Cell(15, 4, 'MACHO', 1, 0, "C", 1);
$this->Cell(15, 4, 'FEMEA', 1, 0, "C", 1);
$this->Cell(20, 4, 'TOTAL', 1, 0, "C", 1);
$this->Ln();
$totalMacho = 0;
$totalFemea = 0;
$this->SetFont('Arial', '', 6);
foreach ($fefas as $fefa) {
$this->Cell(15, 4, Format::dateView($fefa->data_compra), 1, 0, "C", 0);
$this->Cell(37, 4, $fefa->gta, 1, 0, "L", 0);
$this->Cell(10, 4, $fefa->gta_serie, 1, 0, "C", 0);
$this->Cell(45, 4, substr($fefa->nfp, 0, 40), 1, 0, "L", 0);
$this->Cell(40, 4, utf8_decode($fefa->cidade), 1, 0, "L", 0);
$this->Cell(40, 4, substr($fefa->produtor, 0, 29), 1, 0, "L", 0);
$this->Cell(40, 4, substr($fefa->propriedade, 0, 29), 1, 0, "L", 0);
$this->Cell(15, 4, $fefa->qtd_macho, 1, 0, "L", 0);
$this->Cell(15, 4, $fefa->qtd_femea, 1, 0, "L", 0);
$this->Cell(20, 4, $fefa->qtd_macho + $fefa->qtd_femea, 1, 0, "L", 0);
$totalMacho = $totalMacho + $fefa->qtd_macho;
$totalFemea = $totalFemea + $fefa->qtd_femea;
$this->Ln();
}
$this->Ln();
$this->Cell(30, 4, 'QTD MACHOS', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView($totalMacho), 1, 0, "R", 0);
$this->Ln();
$this->Cell(30, 4, 'QTD FEMEA', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView($totalFemea), 1, 0, "R", 0);
$this->Ln();
$this->Cell(30, 4, 'TOTAL QTD', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView($totalFemea + $totalMacho, 0), 1, 0, "R", 0);
}
示例4: listar
public function listar($fefas)
{
$this->Cell(25, 4, 'Data Compra', 1, 0, "C", 1);
$this->Cell(25, 4, 'NFE', 1, 0, "C", 1);
$this->Cell(25, 4, 'Qtd. Macho', 1, 0, "C", 1);
$this->Cell(25, 4, 'Peso Macho', 1, 0, "C", 1);
$this->Cell(25, 4, 'Qtd. Femea', 1, 0, "C", 1);
$this->Cell(25, 4, 'Peso Femea', 1, 0, "C", 1);
$this->Cell(0, 4, 'Municipio', 1, 0, "C", 1);
$this->Ln();
foreach ($fefas as $fefa) {
$this->Cell(25, 4, Format::dateView($fefa->data_compra), 1, 0, "C", 0);
$this->Cell(25, 4, $fefa->nfe, 1, 0, "C", 0);
$this->Cell(25, 4, $fefa->qtd_macho, 1, 0, "R", 0);
$this->Cell(25, 4, $fefa->peso_macho, 1, 0, "R", 0);
$this->Cell(25, 4, $fefa->qtd_femea, 1, 0, "R", 0);
$this->Cell(25, 4, $fefa->peso_femea, 1, 0, "R", 0);
$this->Cell(0, 4, substr(utf8_decode($fefa->cidade), 0, 22), 1, 0, "L", 0);
$this->Ln();
}
$this->Ln();
$this->Cell(30, 4, 'QTD MACHOS', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView($fefas->sum('qtd_macho')), 1, 0, "R", 0);
$this->Cell(30, 4, 'PESO MACHOS', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView(Fefa::getTotalPeso('M', Input::get('cidade', null)), 2), 1, 0, "R", 0);
$this->Ln();
$this->Cell(30, 4, 'QTD FEMEA', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView($fefas->sum('qtd_femea')), 1, 0, "R", 0);
$this->Cell(30, 4, 'PESO FEMEA', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView(Fefa::getTotalPeso('F', Input::get('cidade', null)), 2), 1, 0, "R", 0);
$this->Ln();
$this->Cell(30, 4, 'TOTAL QTD', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView($fefas->sum('qtd_femea') + $fefas->sum('qtd_macho'), 0), 1, 0, "R", 0);
$this->Cell(30, 4, 'TOTAL PESO', 1, 0, "R", 1);
$this->Cell(25, 4, Format::valorView(Fefa::getTotalPeso('M', Input::get('cidade', null)) + Fefa::getTotalPeso('F', Input::get('cidade', null)), 2), 1, 0, "R", 0);
}
示例5: getPretencaoAttribute
public function getPretencaoAttribute()
{
if (!empty($this->attributes['pretencao'])) {
return Format::valorView($this->attributes['pretencao']);
}
}
示例6: getRemuneracaoAttribute
public function getRemuneracaoAttribute()
{
return Format::valorView($this->attributes['remuneracao']);
}
示例7: getPesoFemeaAttribute
public function getPesoFemeaAttribute()
{
$total = 0;
foreach ($this->produtos as $produto) {
if ($produto->animal->sexo == 'F') {
$total = $total + $produto->peso_item;
}
}
return Format::valorView($total, 2);
}