Fix Laravel Pint formatting
This commit is contained in:
@@ -4,16 +4,14 @@ namespace App\Services\Finance;
|
||||
|
||||
class FinancialPdfReportService
|
||||
{
|
||||
public function __construct(private FinancialChartService $charts)
|
||||
{
|
||||
}
|
||||
public function __construct(private FinancialChartService $charts) {}
|
||||
|
||||
public function buildPdf(array $summary): string
|
||||
{
|
||||
$pdf = new \FPDF();
|
||||
$pdf = new \FPDF;
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Arial', 'B', 16);
|
||||
$pdf->Cell(0, 10, 'Financial Report for School Year: ' . ($summary['schoolYear'] ?? ''), 0, 1, 'C');
|
||||
$pdf->Cell(0, 10, 'Financial Report for School Year: '.($summary['schoolYear'] ?? ''), 0, 1, 'C');
|
||||
|
||||
$pdf->Ln(10);
|
||||
$pdf->SetFont('Arial', 'B', 12);
|
||||
@@ -37,12 +35,12 @@ class FinancialPdfReportService
|
||||
$pdf->SetFont('Arial', '', 11);
|
||||
foreach ($rows as $label => $amount) {
|
||||
$pdf->Cell(130, 10, $label, 1);
|
||||
$pdf->Cell(60, 10, '$' . number_format((float) $amount, 2), 1);
|
||||
$pdf->Cell(60, 10, '$'.number_format((float) $amount, 2), 1);
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
$barChart = $this->charts->generateBarChart($summary);
|
||||
if (!empty($barChart) && file_exists($barChart)) {
|
||||
if (! empty($barChart) && file_exists($barChart)) {
|
||||
$pdf->Ln(10);
|
||||
$pdf->SetFont('Arial', 'B', 12);
|
||||
$pdf->Cell(0, 10, 'Summary Graph', 0, 1);
|
||||
@@ -50,7 +48,7 @@ class FinancialPdfReportService
|
||||
}
|
||||
|
||||
$pieChart = $this->charts->generatePieChart($summary);
|
||||
if (!empty($pieChart) && file_exists($pieChart)) {
|
||||
if (! empty($pieChart) && file_exists($pieChart)) {
|
||||
$pdf->Ln(10);
|
||||
$pdf->SetFont('Arial', 'B', 12);
|
||||
$pdf->Cell(0, 10, 'Expense Breakdown', 0, 1);
|
||||
|
||||
Reference in New Issue
Block a user