Add BIC support. This fixes #430

This commit is contained in:
James Cole
2016-11-28 18:55:56 +01:00
parent 8279cf0e88
commit 8cdbc96aa5
9 changed files with 33 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ class AccountRepository implements AccountRepositoryInterface
/** @var User */
private $user;
/** @var array */
private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber','currency_id'];
private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber', 'currency_id', 'BIC'];
/**
* AttachmentRepository constructor.
@@ -60,7 +60,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return int
*/
public function count(array $types):int
public function count(array $types): int
{
$count = $this->user->accounts()->accountTypeIn($types)->count();
@@ -482,7 +482,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return Account
*/
protected function storeOpposingAccount(float $amount, string $name):Account
protected function storeOpposingAccount(float $amount, string $name): Account
{
$type = $amount < 0 ? 'expense' : 'revenue';
$opposingData = [