Expand API options for available budgets and journal links

This commit is contained in:
James Cole
2018-08-11 18:27:45 +02:00
parent a803dfc7fa
commit 95ce72fce7
5 changed files with 83 additions and 18 deletions

View File

@@ -230,6 +230,11 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
public function storeLink(array $information, TransactionJournal $inward, TransactionJournal $outward): ?TransactionJournalLink
{
$linkType = $this->findNull((int)($information['link_type_id'] ?? 0));
if (null === $linkType) {
$linkType = $this->findByName($information['link_type_name']);
}
if (null === $linkType) {
return null;
}