First working version of YNAB import #145

This commit is contained in:
James Cole
2018-07-31 18:19:48 +02:00
parent c1ac2bb156
commit 56518ea028
10 changed files with 121 additions and 21 deletions

View File

@@ -83,14 +83,15 @@ class YnabRoutine implements RoutineInterface
$budgets = $configuration['budgets'] ?? [];
// if more than 1 budget, select budget first.
if (\count($budgets) > 0) { // TODO should be 1
if (\count($budgets) > 1) {
$this->repository->setStage($this->importJob, 'select_budgets');
$this->repository->setStatus($this->importJob, 'need_job_config');
return;
}
if (\count($budgets) === 1) {
$this->repository->setStage($this->importJob, 'match_accounts');
$this->repository->setStatus($this->importJob, 'ready_to_run');
$this->repository->setStage($this->importJob, 'get_accounts');
}
return;