Andrew Wallo 3 месяцев назад
Родитель
Сommit
a28cb88395

+ 2
- 0
app/Filament/Company/Resources/Sales/EstimateResource.php Просмотреть файл

@@ -29,6 +29,7 @@ use App\Models\Accounting\DocumentLineItem;
29 29
 use App\Models\Accounting\Estimate;
30 30
 use App\Models\Common\Client;
31 31
 use App\Models\Common\Offering;
32
+use App\Services\CompanySettingsService;
32 33
 use App\Utilities\Currency\CurrencyAccessor;
33 34
 use App\Utilities\Currency\CurrencyConverter;
34 35
 use App\Utilities\RateCalculator;
@@ -92,6 +93,7 @@ class EstimateResource extends Resource
92 93
                                         ->label('Estimate date')
93 94
                                         ->live()
94 95
                                         ->default(now())
96
+                                        ->timezone(CompanySettingsService::getDefaultTimezone())
95 97
                                         ->columnSpan(2)
96 98
                                         ->afterStateUpdated(function (Forms\Set $set, Forms\Get $get, $state) {
97 99
                                             $date = $state;

+ 2
- 0
app/Services/CompanySettingsService.php Просмотреть файл

@@ -14,6 +14,8 @@ class CompanySettingsService
14 14
 
15 15
     public static function getSettings(?int $companyId = null): array
16 16
     {
17
+        $companyId ??= session('current_company_id');
18
+
17 19
         if (! $companyId) {
18 20
             return self::getDefaultSettings();
19 21
         }

Загрузка…
Отмена
Сохранить