mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-05 14:51:07 +00:00
30 lines
754 B
PHP
30 lines
754 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Facades\Pdf;
|
|
use App\Models\CompanySetting;
|
|
use App\Support\Pdf\PdfPageSetup;
|
|
use Illuminate\Support\Facades\App;
|
|
|
|
class CustomerStatementPdfService
|
|
{
|
|
public function render(array $statement)
|
|
{
|
|
$customer = $statement['customer'];
|
|
$company = $customer->company;
|
|
|
|
App::setLocale(CompanySetting::getSetting('language', $company->id));
|
|
|
|
view()->share([
|
|
'statement' => $statement,
|
|
'customer' => $customer,
|
|
'company' => $company,
|
|
'currency' => $statement['currency'],
|
|
'logo' => $company->logo_path,
|
|
]);
|
|
|
|
return Pdf::loadView('app.pdf.reports.customer-statement', [], PdfPageSetup::forReports());
|
|
}
|
|
}
|