Andrew Wallo 3 个月前
父节点
当前提交
5a47fccd15

+ 2
- 1
app/Filament/Company/Resources/Purchases/BillResource.php 查看文件

@@ -461,7 +461,8 @@ class BillResource extends Resource
461 461
                             ->successNotificationTitle('Payment recorded')
462 462
                             ->form([
463 463
                                 Forms\Components\DatePicker::make('posted_at')
464
-                                    ->label('Date'),
464
+                                    ->label('Date')
465
+                                    ->timezone(CompanySettingsService::getDefaultTimezone()),
465 466
                                 Forms\Components\Grid::make()
466 467
                                     ->schema([
467 468
                                         Forms\Components\Select::make('bank_account_id')

+ 2
- 0
app/Filament/Company/Resources/Purchases/BillResource/Pages/PayBills.php 查看文件

@@ -11,6 +11,7 @@ use App\Models\Accounting\Transaction;
11 11
 use App\Models\Banking\BankAccount;
12 12
 use App\Models\Common\Vendor;
13 13
 use App\Models\Setting\Currency;
14
+use App\Services\CompanySettingsService;
14 15
 use App\Utilities\Currency\CurrencyAccessor;
15 16
 use App\Utilities\Currency\CurrencyConverter;
16 17
 use Filament\Actions;
@@ -152,6 +153,7 @@ class PayBills extends ListRecords
152 153
                         Forms\Components\DatePicker::make('posted_at')
153 154
                             ->label('Date')
154 155
                             ->default(now())
156
+                            ->timezone(CompanySettingsService::getDefaultTimezone())
155 157
                             ->softRequired(),
156 158
                         Forms\Components\Select::make('payment_method')
157 159
                             ->label('Payment method')

+ 3
- 1
app/Filament/Company/Resources/Purchases/BillResource/RelationManagers/PaymentsRelationManager.php 查看文件

@@ -7,6 +7,7 @@ use App\Enums\Accounting\TransactionType;
7 7
 use App\Models\Accounting\Bill;
8 8
 use App\Models\Accounting\Transaction;
9 9
 use App\Models\Banking\BankAccount;
10
+use App\Services\CompanySettingsService;
10 11
 use App\Utilities\Currency\CurrencyAccessor;
11 12
 use App\Utilities\Currency\CurrencyConverter;
12 13
 use Closure;
@@ -40,7 +41,8 @@ class PaymentsRelationManager extends RelationManager
40 41
             ->columns(1)
41 42
             ->schema([
42 43
                 Forms\Components\DatePicker::make('posted_at')
43
-                    ->label('Date'),
44
+                    ->label('Date')
45
+                    ->timezone(CompanySettingsService::getDefaultTimezone()),
44 46
                 Forms\Components\Grid::make()
45 47
                     ->schema([
46 48
                         Forms\Components\Select::make('bank_account_id')

+ 2
- 0
app/Filament/Company/Resources/Sales/InvoiceResource/Pages/RecordPayments.php 查看文件

@@ -11,6 +11,7 @@ use App\Models\Accounting\Transaction;
11 11
 use App\Models\Banking\BankAccount;
12 12
 use App\Models\Common\Client;
13 13
 use App\Models\Setting\Currency;
14
+use App\Services\CompanySettingsService;
14 15
 use App\Utilities\Currency\CurrencyAccessor;
15 16
 use App\Utilities\Currency\CurrencyConverter;
16 17
 use Filament\Actions;
@@ -202,6 +203,7 @@ class RecordPayments extends ListRecords
202 203
                         Forms\Components\DatePicker::make('posted_at')
203 204
                             ->label('Date')
204 205
                             ->default(now())
206
+                            ->timezone(CompanySettingsService::getDefaultTimezone())
205 207
                             ->softRequired(),
206 208
                         Forms\Components\Select::make('payment_method')
207 209
                             ->label('Payment method')

+ 3
- 1
app/Filament/Company/Resources/Sales/InvoiceResource/RelationManagers/PaymentsRelationManager.php 查看文件

@@ -8,6 +8,7 @@ use App\Enums\Accounting\TransactionType;
8 8
 use App\Models\Accounting\Invoice;
9 9
 use App\Models\Accounting\Transaction;
10 10
 use App\Models\Banking\BankAccount;
11
+use App\Services\CompanySettingsService;
11 12
 use App\Utilities\Currency\CurrencyAccessor;
12 13
 use App\Utilities\Currency\CurrencyConverter;
13 14
 use Closure;
@@ -49,7 +50,8 @@ class PaymentsRelationManager extends RelationManager
49 50
             ->columns(1)
50 51
             ->schema([
51 52
                 Forms\Components\DatePicker::make('posted_at')
52
-                    ->label('Date'),
53
+                    ->label('Date')
54
+                    ->timezone(CompanySettingsService::getDefaultTimezone()),
53 55
                 Forms\Components\Grid::make()
54 56
                     ->schema([
55 57
                         Forms\Components\Select::make('bank_account_id')

+ 2
- 0
app/Livewire/Company/Service/ConnectedAccount/ListInstitutions.php 查看文件

@@ -8,6 +8,7 @@ use App\Models\Banking\BankAccount;
8 8
 use App\Models\Banking\ConnectedBankAccount;
9 9
 use App\Models\Banking\Institution;
10 10
 use App\Models\User;
11
+use App\Services\CompanySettingsService;
11 12
 use App\Services\PlaidService;
12 13
 use Filament\Actions\Action;
13 14
 use Filament\Actions\Concerns\InteractsWithActions;
@@ -89,6 +90,7 @@ class ListInstitutions extends Component implements HasActions, HasForms
89 90
                 DatePicker::make('start_date')
90 91
                     ->label('Start date')
91 92
                     ->required()
93
+                    ->timezone(CompanySettingsService::getDefaultTimezone())
92 94
                     ->placeholder('Select a start date for importing transactions.')
93 95
                     ->minDate(now()->subDays(PlaidService::TRANSACTION_DAYS_REQUESTED)->toDateString())
94 96
                     ->maxDate(now()->toDateString()),

+ 3
- 0
app/Models/Accounting/RecurringInvoice.php 查看文件

@@ -22,6 +22,7 @@ use App\Filament\Forms\Components\CustomSection;
22 22
 use App\Models\Common\Client;
23 23
 use App\Models\Setting\CompanyProfile;
24 24
 use App\Observers\RecurringInvoiceObserver;
25
+use App\Services\CompanySettingsService;
25 26
 use App\Support\ScheduleHandler;
26 27
 use App\Utilities\Localization\Timezone;
27 28
 use Filament\Actions\Action;
@@ -507,6 +508,7 @@ class RecurringInvoice extends Document
507 508
                             ->softRequired()
508 509
                             ->live()
509 510
                             ->minDate(today())
511
+                            ->timezone(CompanySettingsService::getDefaultTimezone())
510 512
                             ->closeOnDateSelection()
511 513
                             ->afterStateUpdated(function (Forms\Set $set, Forms\Get $get, $state) {
512 514
                                 $handler = new ScheduleHandler($set, $get);
@@ -539,6 +541,7 @@ class RecurringInvoice extends Document
539 541
 
540 542
                             if ($endType?->isOn()) {
541 543
                                 $components[] = Forms\Components\DatePicker::make('end_date')
544
+                                    ->timezone(CompanySettingsService::getDefaultTimezone())
542 545
                                     ->live();
543 546
                             }
544 547
 

正在加载...
取消
保存