소스 검색

wip timezone handling

3.x
Andrew Wallo 2 달 전
부모
커밋
9a5c519bdc
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2
    2
      app/Livewire/Company/Service/ConnectedAccount/ListInstitutions.php
  2. 2
    2
      app/Services/AccountService.php

+ 2
- 2
app/Livewire/Company/Service/ConnectedAccount/ListInstitutions.php 파일 보기

@@ -92,8 +92,8 @@ class ListInstitutions extends Component implements HasActions, HasForms
92 92
                     ->required()
93 93
                     ->timezone(CompanySettingsService::getDefaultTimezone())
94 94
                     ->placeholder('Select a start date for importing transactions.')
95
-                    ->minDate(now()->subDays(PlaidService::TRANSACTION_DAYS_REQUESTED)->toDateString())
96
-                    ->maxDate(now()->toDateString()),
95
+                    ->minDate(company_today()->subDays(PlaidService::TRANSACTION_DAYS_REQUESTED)->toDateString())
96
+                    ->maxDate(company_today()->toDateString()),
97 97
             ])
98 98
             ->action(function (array $data, ConnectedBankAccount $connectedBankAccount) {
99 99
                 $selectedBankAccountId = $data['bank_account_id'] ?? $connectedBankAccount->bank_account_id;

+ 2
- 2
app/Services/AccountService.php 파일 보기

@@ -377,7 +377,7 @@ class AccountService
377 377
 
378 378
     public function getUnpaidClientInvoices(?string $asOfDate = null): Builder
379 379
     {
380
-        $asOfDate = $asOfDate ?? now()->toDateString();
380
+        $asOfDate = $asOfDate ?? company_today()->toDateString();
381 381
         $driver = DB::getDriverName();
382 382
 
383 383
         $datediff = $driver === 'pgsql'
@@ -400,7 +400,7 @@ class AccountService
400 400
 
401 401
     public function getUnpaidVendorBills(?string $asOfDate = null): Builder
402 402
     {
403
-        $asOfDate = $asOfDate ?? now()->toDateString();
403
+        $asOfDate = $asOfDate ?? company_today()->toDateString();
404 404
         $driver = DB::getDriverName();
405 405
 
406 406
         $datediff = $driver === 'pgsql'

Loading…
취소
저장