fix(sales): render PDFs in client timezone
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Historial de modificaciones de ventas</h1>
|
||||
<p class="subtitle">{{ $tenant->nombre }} · Generado el {{ $generatedAt->format('d/m/Y H:i') }}</p>
|
||||
<p class="subtitle">{{ $tenant->nombre }} · Generado el {{ $generatedAt->copy()->timezone($timeZone)->format('d/m/Y H:i') }}</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -44,8 +44,8 @@
|
||||
@forelse ($modifications as $modification)
|
||||
@php($sale = $modification->trackable)
|
||||
<tr>
|
||||
<td>{{ $modification->changed_at->format('d/m/Y') }}</td>
|
||||
<td>{{ $modification->changed_at->format('H:i:s') }}</td>
|
||||
<td>{{ $modification->changed_at->copy()->timezone($timeZone)->format('d/m/Y') }}</td>
|
||||
<td>{{ $modification->changed_at->copy()->timezone($timeZone)->format('H:i:s') }}</td>
|
||||
<td>#{{ $modification->trackable_id }}</td>
|
||||
<td>{{ $sale?->nombre_apellido ?: 'Sin nombre' }}</td>
|
||||
<td>{{ $modification->attribute }}</td>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Historial de ventas</h1>
|
||||
<p class="subtitle">{{ $tenant->nombre }} · Generado el {{ $generatedAt->format('d/m/Y H:i') }}</p>
|
||||
<p class="subtitle">{{ $tenant->nombre }} · Generado el {{ $generatedAt->copy()->timezone($timeZone)->format('d/m/Y H:i') }}</p>
|
||||
|
||||
<div class="summary">
|
||||
Total de ventas confirmadas en este reporte: <strong>${{ number_format((float) $confirmedSalesTotal, 2, ',', '.') }}</strong>
|
||||
@@ -44,7 +44,7 @@
|
||||
@forelse ($sales as $sale)
|
||||
<tr>
|
||||
<td>#{{ $sale->id }}</td>
|
||||
<td>{{ $sale->created_at?->format('d/m/Y H:i') ?? '-' }}</td>
|
||||
<td>{{ $sale->created_at?->copy()->timezone($timeZone)->format('d/m/Y H:i') ?? '-' }}</td>
|
||||
<td>{{ $sale->nombre_apellido ?: 'Sin nombre' }}</td>
|
||||
<td class="center">{{ (int) ($sale->quantity ?? 0) }}</td>
|
||||
<td>{{ match ($sale->status) {
|
||||
|
||||
Reference in New Issue
Block a user