Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import transaction type issue fixed #3007

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/Imports/Banking/Transactions.php
Expand Up @@ -5,9 +5,12 @@
use App\Abstracts\Import;
use App\Http\Requests\Banking\Transaction as Request;
use App\Models\Banking\Transaction as Model;
use App\Traits\Transactions as TraitsTransactions;

class Transactions extends Import
{
use TraitsTransactions;

public $request_class = Request::class;

public function model(array $row)
Expand All @@ -19,10 +22,12 @@ public function map($row): array
{
$row = parent::map($row);

$real_type = $this->getRealTypeTransaction($row['type']);

$row['currency_code'] = $this->getCurrencyCode($row);
$row['account_id'] = $this->getAccountId($row);
$row['category_id'] = $this->getCategoryId($row);
$row['contact_id'] = $this->getContactId($row);
$row['category_id'] = $this->getCategoryId($row, $real_type);
$row['contact_id'] = $this->getContactId($row, $real_type);
$row['document_id'] = $this->getDocumentId($row);
$row['parent_id'] = $this->getParentId($row);

Expand Down