Merge pull request #3328 from CihanSenturk/fix-import-transaction-type-issue

Fixed import transaction type issue
This commit is contained in:
Cihan Şentürk 2025-12-07 19:32:27 +03:00 committed by GitHub
commit b12cebd08a
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;