Validation issues for import fixed

This commit is contained in:
EnesSacid-Buker
2023-03-07 15:18:14 +03:00
parent f2b73d83d8
commit d2e96fbe23
27 changed files with 174 additions and 130 deletions

View File

@@ -8,6 +8,8 @@ use App\Models\Banking\Transaction as Model;
class Transactions extends Import
{
public $request_class = Request::class;
public function model(array $row)
{
return new Model($row);
@@ -25,9 +27,4 @@ class Transactions extends Import
return $row;
}
public function rules(): array
{
return (new Request())->rules();
}
}

View File

@@ -26,10 +26,10 @@ class Transfers extends Import
$row = parent::map($row);
$row['transferred_at'] = Date::parse($row['transferred_at'])->format('Y-m-d');
$row['from_account_id'] = $this->getFromAccountId($row);
$row['to_account_id'] = $this->getToAccountId($row);
$row['from_currency_code'] = $this->getFromCurrencyCode($row);
$row['to_currency_code'] = $this->getToCurrencyCode($row);
$row['from_account_id'] = $this->getFromAccountId($row);
$row['to_account_id'] = $this->getToAccountId($row);
$row['expense_transaction_id'] = $this->getExpenseTransactionId($row);
$row['income_transaction_id'] = $this->getIncomeTransactionId($row);