|
@@ -8,6 +8,7 @@ use App\Filament\Forms\Components\CustomTableRepeater;
|
8
|
8
|
use App\Models\Accounting\JournalEntry;
|
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 Awcodes\TableRepeater\Header;
|
|
@@ -39,7 +40,7 @@ trait HasTransactionAction
|
39
|
40
|
protected function getFormDefaultsForType(TransactionType $type): array
|
40
|
41
|
{
|
41
|
42
|
$commonDefaults = [
|
42
|
|
- 'posted_at' => today(),
|
|
43
|
+ 'posted_at' => now(),
|
43
|
44
|
];
|
44
|
45
|
|
45
|
46
|
return match ($type) {
|
|
@@ -83,6 +84,7 @@ trait HasTransactionAction
|
83
|
84
|
->schema([
|
84
|
85
|
Forms\Components\DatePicker::make('posted_at')
|
85
|
86
|
->label('Date')
|
|
87
|
+ ->timezone(CompanySettingsService::getDefaultTimezone())
|
86
|
88
|
->required(),
|
87
|
89
|
Forms\Components\TextInput::make('description')
|
88
|
90
|
->label('Description'),
|
|
@@ -125,6 +127,7 @@ trait HasTransactionAction
|
125
|
127
|
->schema([
|
126
|
128
|
Forms\Components\DatePicker::make('posted_at')
|
127
|
129
|
->label('Date')
|
|
130
|
+ ->timezone(CompanySettingsService::getDefaultTimezone())
|
128
|
131
|
->required(),
|
129
|
132
|
Forms\Components\TextInput::make('description')
|
130
|
133
|
->label('Description'),
|
|
@@ -203,12 +206,12 @@ trait HasTransactionAction
|
203
|
206
|
|
204
|
207
|
protected function getTransactionDetailsGrid(): Forms\Components\Grid
|
205
|
208
|
{
|
206
|
|
- return Forms\Components\Grid::make(8)
|
|
209
|
+ return Forms\Components\Grid::make(6)
|
207
|
210
|
->schema([
|
208
|
211
|
Forms\Components\DatePicker::make('posted_at')
|
209
|
212
|
->label('Date')
|
210
|
|
- ->softRequired()
|
211
|
|
- ->displayFormat('Y-m-d'),
|
|
213
|
+ ->timezone(CompanySettingsService::getDefaultTimezone())
|
|
214
|
+ ->softRequired(),
|
212
|
215
|
Forms\Components\TextInput::make('description')
|
213
|
216
|
->label('Description')
|
214
|
217
|
->columnSpan(2),
|