Validation issues for import fixed
				
					
				
			This commit is contained in:
		@@ -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();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user