fixed import transaction type issue

This commit is contained in:
Cihan Şentürk 2025-12-07 19:31:45 +03:00 committed by GitHub
parent df83efb84e
commit 4d59bdf754
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,10 @@ class Transactions extends Import
{
$row = parent::map($row);
if (!isset($row['type'])) {
return [];
}
$real_type = $this->getRealTypeTransaction($row['type']);
$contact_type = config('type.transaction.' . $real_type . '.contact_type', $real_type == 'income' ? 'customer' : 'vendor');
@ -49,6 +53,7 @@ class Transactions extends Import
public function prepareRules($rules): array
{
$rules['number'] = 'required|string';
$rules['type'] = 'required|string';
//$rules['currency_rate'] = 'required|gt:0';
return $rules;