mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Minor fixes for bank transaction import
This commit is contained in:
parent
57f6bce7d9
commit
1a000427fb
@ -105,7 +105,7 @@ class ImportMigrations extends Command
|
||||
$import_file = public_path("storage/migrations/$filename/migration.json");
|
||||
|
||||
Import::dispatch($import_file, $this->getUser()->companies()->first(), $this->getUser());
|
||||
// StartMigration::dispatch($file->getRealPath(), $this->getUser(), $this->getUser()->companies()->first());
|
||||
|
||||
} catch (NonExistingMigrationFile | ProcessingMigrationArchiveFailed | ResourceNotAvailableForMigration | MigrationValidatorFailed | ResourceDependencyMissing $e) {
|
||||
\Mail::to($user)->send(new MigrationFailed($e, $company));
|
||||
|
||||
|
@ -123,6 +123,21 @@ class TaskFilters extends QueryFilters
|
||||
return $this->builder->orderBy($sort_col[0], $sort_col[1]);
|
||||
}
|
||||
|
||||
public function task_status(string $value = ''): Builder
|
||||
{
|
||||
if (strlen($value) == 0) {
|
||||
return $this->builder;
|
||||
}
|
||||
|
||||
$status_parameters = explode(',', $value);
|
||||
|
||||
if(count($status_parameters) > 0)
|
||||
return $this->builder->whereIn('status_id', $this->transformKeys($status_parameters));
|
||||
|
||||
return $this->builder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filters the query by the users company ID.
|
||||
*
|
||||
|
@ -163,12 +163,8 @@ class ImportController extends Controller
|
||||
$bestDelimiter = ' ';
|
||||
$count = 0;
|
||||
foreach ($delimiters as $delimiter) {
|
||||
// if (substr_count($csvfile, $delimiter) > $count) {
|
||||
// $count = substr_count($csvfile, $delimiter);
|
||||
// $bestDelimiter = $delimiter;
|
||||
// }
|
||||
|
||||
if (substr_count(strstr($csvfile, "\n", true), $delimiter) > $count) {
|
||||
if (substr_count(strstr($csvfile, "\n", true), $delimiter) >= $count) {
|
||||
$count = substr_count($csvfile, $delimiter);
|
||||
$bestDelimiter = $delimiter;
|
||||
}
|
||||
|
@ -60,10 +60,6 @@ class StartMigration implements ShouldQueue
|
||||
|
||||
public $timeout = 0;
|
||||
|
||||
// public $maxExceptions = 2;
|
||||
|
||||
//public $backoff = 86430;
|
||||
|
||||
public function __construct($filepath, User $user, Company $company)
|
||||
{
|
||||
$this->filepath = $filepath;
|
||||
@ -159,8 +155,6 @@ class StartMigration implements ShouldQueue
|
||||
|
||||
}
|
||||
|
||||
//always make sure we unset the migration as running
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ class ClientTransformer extends EntityTransformer
|
||||
'has_valid_vat_number' => (bool) $client->has_valid_vat_number,
|
||||
'is_tax_exempt' => (bool) $client->is_tax_exempt,
|
||||
'routing_id' => (string) $client->routing_id,
|
||||
// 'tax_data' => $client->tax_data ?: '',
|
||||
'tax_data' => $client->tax_data ?: '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user