mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 14:26:58 +00:00
Code cleanup.
This commit is contained in:
@@ -241,12 +241,12 @@ having transaction_count = 0
|
|||||||
private function reportSum()
|
private function reportSum()
|
||||||
{
|
{
|
||||||
/** @var UserRepositoryInterface $userRepository */
|
/** @var UserRepositoryInterface $userRepository */
|
||||||
$userRepository = app('FireflyIII\Repositories\User\UserRepositoryInterface');
|
$userRepository = app(UserRepositoryInterface::class);
|
||||||
|
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
foreach ($userRepository->all() as $user) {
|
foreach ($userRepository->all() as $user) {
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface', [$user]);
|
$repository = app(AccountRepositoryInterface::class, [$user]);
|
||||||
$sum = $repository->sumOfEverything();
|
$sum = $repository->sumOfEverything();
|
||||||
if (bccomp($sum, '0') !== 0) {
|
if (bccomp($sum, '0') !== 0) {
|
||||||
$this->error('Error: Transactions for user #' . $user->id . ' (' . $user->email . ') are off by ' . $sum . '!');
|
$this->error('Error: Transactions for user #' . $user->id . ' (' . $user->email . ') are off by ' . $sum . '!');
|
||||||
|
@@ -44,7 +44,8 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
|||||||
*/
|
*/
|
||||||
public function __construct(ExportJob $job)
|
public function __construct(ExportJob $job)
|
||||||
{
|
{
|
||||||
$this->repository = app('FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface');
|
/** @var AttachmentRepositoryInterface repository */
|
||||||
|
$this->repository = app(AttachmentRepositoryInterface::class);
|
||||||
// make storage:
|
// make storage:
|
||||||
$this->uploadDisk = Storage::disk('upload');
|
$this->uploadDisk = Storage::disk('upload');
|
||||||
$this->exportDisk = Storage::disk('export');
|
$this->exportDisk = Storage::disk('export');
|
||||||
|
@@ -11,6 +11,8 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Export;
|
namespace FireflyIII\Export;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
|
use FireflyIII\Export\Collector\AttachmentCollector;
|
||||||
|
use FireflyIII\Export\Collector\UploadCollector;
|
||||||
use FireflyIII\Export\Entry\Entry;
|
use FireflyIII\Export\Entry\Entry;
|
||||||
use FireflyIII\Models\ExportJob;
|
use FireflyIII\Models\ExportJob;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
@@ -78,7 +80,8 @@ class Processor
|
|||||||
*/
|
*/
|
||||||
public function collectAttachments(): bool
|
public function collectAttachments(): bool
|
||||||
{
|
{
|
||||||
$attachmentCollector = app('FireflyIII\Export\Collector\AttachmentCollector', [$this->job]);
|
/** @var AttachmentCollector $attachmentCollector */
|
||||||
|
$attachmentCollector = app(AttachmentCollector::class, [$this->job]);
|
||||||
$attachmentCollector->run();
|
$attachmentCollector->run();
|
||||||
$this->files = $this->files->merge($attachmentCollector->getFiles());
|
$this->files = $this->files->merge($attachmentCollector->getFiles());
|
||||||
|
|
||||||
@@ -110,7 +113,8 @@ class Processor
|
|||||||
*/
|
*/
|
||||||
public function collectOldUploads(): bool
|
public function collectOldUploads(): bool
|
||||||
{
|
{
|
||||||
$uploadCollector = app('FireflyIII\Export\Collector\UploadCollector', [$this->job]);
|
/** @var UploadCollector $uploadCollector */
|
||||||
|
$uploadCollector = app(UploadCollector::class, [$this->job]);
|
||||||
$uploadCollector->run();
|
$uploadCollector->run();
|
||||||
|
|
||||||
$this->files = $this->files->merge($uploadCollector->getFiles());
|
$this->files = $this->files->merge($uploadCollector->getFiles());
|
||||||
@@ -139,7 +143,7 @@ class Processor
|
|||||||
*/
|
*/
|
||||||
public function createConfigFile(): bool
|
public function createConfigFile(): bool
|
||||||
{
|
{
|
||||||
$this->configurationMaker = app('FireflyIII\Export\ConfigurationFile', [$this->job]);
|
$this->configurationMaker = app(ConfigurationFile::class, [$this->job]);
|
||||||
$this->files->push($this->configurationMaker->make());
|
$this->files->push($this->configurationMaker->make());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -40,7 +40,7 @@ class AttachUserRole
|
|||||||
{
|
{
|
||||||
Log::debug('Trigger attachuserrole');
|
Log::debug('Trigger attachuserrole');
|
||||||
/** @var UserRepositoryInterface $repository */
|
/** @var UserRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\User\UserRepositoryInterface');
|
$repository = app(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// first user ever?
|
// first user ever?
|
||||||
if ($repository->count() == 1) {
|
if ($repository->count() == 1) {
|
||||||
|
@@ -19,7 +19,7 @@ class AccountId extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Account
|
public function convert(): Account
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
$var = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
$var = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
||||||
$account = $repository->find($var);
|
$account = $repository->find($var);
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Account
|
public function convert(): Account
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
// is mapped? Then it's easy!
|
// is mapped? Then it's easy!
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
@@ -44,7 +44,6 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param AccountRepositoryInterface $repository
|
* @param AccountRepositoryInterface $repository
|
||||||
* @param $value
|
|
||||||
*
|
*
|
||||||
* @return Account
|
* @return Account
|
||||||
*/
|
*/
|
||||||
|
@@ -21,7 +21,7 @@ class AssetAccountName extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Account
|
public function convert(): Account
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$account = $repository->find(intval($this->mapped[$this->index][$this->value]));
|
$account = $repository->find(intval($this->mapped[$this->index][$this->value]));
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Account
|
public function convert(): Account
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
// is mapped? Then it's easy!
|
// is mapped? Then it's easy!
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
|
@@ -19,7 +19,7 @@ class BillId extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Bill
|
public function convert(): Bill
|
||||||
{
|
{
|
||||||
/** @var BillRepositoryInterface $repository */
|
/** @var BillRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Bill\BillRepositoryInterface');
|
$repository = app(BillRepositoryInterface::class);
|
||||||
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
||||||
$bill = $repository->find($value);
|
$bill = $repository->find($value);
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ class BillName extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Bill
|
public function convert(): Bill
|
||||||
{
|
{
|
||||||
/** @var BillRepositoryInterface $repository */
|
/** @var BillRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Bill\BillRepositoryInterface');
|
$repository = app(BillRepositoryInterface::class);
|
||||||
|
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
return $repository->find($this->mapped[$this->index][$this->value]);
|
return $repository->find($this->mapped[$this->index][$this->value]);
|
||||||
|
@@ -19,7 +19,7 @@ class BudgetId extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Budget
|
public function convert(): Budget
|
||||||
{
|
{
|
||||||
/** @var BudgetRepositoryInterface $repository */
|
/** @var BudgetRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
$repository = app(BudgetRepositoryInterface::class);
|
||||||
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
||||||
$budget = $repository->find($value);
|
$budget = $repository->find($value);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class BudgetName extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Budget
|
public function convert(): Budget
|
||||||
{
|
{
|
||||||
/** @var BudgetRepositoryInterface $repository */
|
/** @var BudgetRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
$repository = app(BudgetRepositoryInterface::class);
|
||||||
|
|
||||||
// is mapped? Then it's easy!
|
// is mapped? Then it's easy!
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
|
@@ -19,7 +19,7 @@ class CategoryId extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Category
|
public function convert(): Category
|
||||||
{
|
{
|
||||||
/** @var SingleCategoryRepositoryInterface $repository */
|
/** @var SingleCategoryRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface');
|
$repository = app(SingleCategoryRepositoryInterface::class);
|
||||||
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
||||||
$category = $repository->find($value);
|
$category = $repository->find($value);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class CategoryName extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Category
|
public function convert(): Category
|
||||||
{
|
{
|
||||||
/** @var SingleCategoryRepositoryInterface $repository */
|
/** @var SingleCategoryRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface');
|
$repository = app(SingleCategoryRepositoryInterface::class);
|
||||||
|
|
||||||
// is mapped? Then it's easy!
|
// is mapped? Then it's easy!
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
|
@@ -19,7 +19,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): TransactionCurrency
|
public function convert(): TransactionCurrency
|
||||||
{
|
{
|
||||||
/** @var CurrencyRepositoryInterface $repository */
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Currency\CurrencyRepositoryInterface');
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$currency = $repository->find($this->mapped[$this->index][$this->value]);
|
$currency = $repository->find($this->mapped[$this->index][$this->value]);
|
||||||
|
@@ -19,7 +19,7 @@ class CurrencyId extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): TransactionCurrency
|
public function convert(): TransactionCurrency
|
||||||
{
|
{
|
||||||
/** @var CurrencyRepositoryInterface $repository */
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Currency\CurrencyRepositoryInterface');
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
||||||
$currency = $repository->find($value);
|
$currency = $repository->find($value);
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ class CurrencyName extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): TransactionCurrency
|
public function convert(): TransactionCurrency
|
||||||
{
|
{
|
||||||
/** @var CurrencyRepositoryInterface $repository */
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Currency\CurrencyRepositoryInterface');
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$currency = $repository->find($this->mapped[$this->index][$this->value]);
|
$currency = $repository->find($this->mapped[$this->index][$this->value]);
|
||||||
|
@@ -19,7 +19,7 @@ class CurrencySymbol extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): TransactionCurrency
|
public function convert(): TransactionCurrency
|
||||||
{
|
{
|
||||||
/** @var CurrencyRepositoryInterface $repository */
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Currency\CurrencyRepositoryInterface');
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$currency = $repository->find($this->mapped[$this->index][$this->value]);
|
$currency = $repository->find($this->mapped[$this->index][$this->value]);
|
||||||
|
@@ -21,7 +21,7 @@ class OpposingAccountIban extends BasicConverter implements ConverterInterface
|
|||||||
public function convert()
|
public function convert()
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$account = $repository->find($this->mapped[$this->index][$this->value]);
|
$account = $repository->find($this->mapped[$this->index][$this->value]);
|
||||||
|
@@ -20,7 +20,7 @@ class OpposingAccountId extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Account
|
public function convert(): Account
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
$value = isset($this->mapped[$this->index][$this->value]) ? $this->mapped[$this->index][$this->value] : $this->value;
|
||||||
$account = $repository->find($value);
|
$account = $repository->find($value);
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class OpposingAccountName extends BasicConverter implements ConverterInterface
|
|||||||
public function convert()
|
public function convert()
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
if (isset($this->mapped[$this->index][$this->value])) {
|
if (isset($this->mapped[$this->index][$this->value])) {
|
||||||
$account = $repository->find($this->mapped[$this->index][$this->value]);
|
$account = $repository->find($this->mapped[$this->index][$this->value]);
|
||||||
|
@@ -19,7 +19,7 @@ class TagsComma extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Collection
|
public function convert(): Collection
|
||||||
{
|
{
|
||||||
/** @var TagRepositoryInterface $repository */
|
/** @var TagRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Tag\TagRepositoryInterface');
|
$repository = app(TagRepositoryInterface::class);
|
||||||
$tags = new Collection;
|
$tags = new Collection;
|
||||||
|
|
||||||
$strings = explode(',', $this->value);
|
$strings = explode(',', $this->value);
|
||||||
|
@@ -19,7 +19,7 @@ class TagsSpace extends BasicConverter implements ConverterInterface
|
|||||||
public function convert(): Collection
|
public function convert(): Collection
|
||||||
{
|
{
|
||||||
/** @var TagRepositoryInterface $repository */
|
/** @var TagRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Tag\TagRepositoryInterface');
|
$repository = app(TagRepositoryInterface::class);
|
||||||
|
|
||||||
$tags = new Collection;
|
$tags = new Collection;
|
||||||
|
|
||||||
|
@@ -6,6 +6,7 @@ use Auth;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
use Validator;
|
use Validator;
|
||||||
|
|
||||||
@@ -244,8 +245,8 @@ class AssetAccount implements PostProcessorInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// create new if not exists and return that one:
|
// create new if not exists and return that one:
|
||||||
/** @var \FireflyIII\Repositories\Account\AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
$accountData = [
|
$accountData = [
|
||||||
'name' => $accountNumber,
|
'name' => $accountNumber,
|
||||||
'accountType' => 'asset',
|
'accountType' => 'asset',
|
||||||
|
@@ -87,7 +87,7 @@ class ReportController extends Controller
|
|||||||
$budget = $budgetRepository->find(intval($attributes['budgetId']));
|
$budget = $budgetRepository->find(intval($attributes['budgetId']));
|
||||||
|
|
||||||
/** @var AccountRepositoryInterface $accountRepository */
|
/** @var AccountRepositoryInterface $accountRepository */
|
||||||
$accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$accountRepository = app(AccountRepositoryInterface::class);
|
||||||
$account = $accountRepository->find(intval($attributes['accountId']));
|
$account = $accountRepository->find(intval($attributes['accountId']));
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
@@ -177,7 +177,7 @@ class ReportController extends Controller
|
|||||||
private function expenseEntry(array $attributes): string
|
private function expenseEntry(array $attributes): string
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
$account = $repository->find(intval($attributes['accountId']));
|
$account = $repository->find(intval($attributes['accountId']));
|
||||||
$journals = $repository->getExpensesByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
$journals = $repository->getExpensesByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
||||||
$view = view('popup.report.expense-entry', compact('journals', 'account'))->render();
|
$view = view('popup.report.expense-entry', compact('journals', 'account'))->render();
|
||||||
@@ -196,7 +196,7 @@ class ReportController extends Controller
|
|||||||
private function incomeEntry(array $attributes): string
|
private function incomeEntry(array $attributes): string
|
||||||
{
|
{
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
$account = $repository->find(intval($attributes['accountId']));
|
$account = $repository->find(intval($attributes['accountId']));
|
||||||
$journals = $repository->getIncomeByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
$journals = $repository->getIncomeByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
||||||
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
|
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
|
||||||
|
@@ -147,7 +147,7 @@ class ReportController extends Controller
|
|||||||
private function auditReport(Carbon $start, Carbon $end, Collection $accounts)
|
private function auditReport(Carbon $start, Carbon $end, Collection $accounts)
|
||||||
{
|
{
|
||||||
/** @var ARI $repos */
|
/** @var ARI $repos */
|
||||||
$repos = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$repos = app(ARI::class);
|
||||||
$auditData = [];
|
$auditData = [];
|
||||||
$dayBefore = clone $start;
|
$dayBefore = clone $start;
|
||||||
$dayBefore->subDay();
|
$dayBefore->subDay();
|
||||||
|
@@ -289,7 +289,7 @@ class TransactionController extends Controller
|
|||||||
{
|
{
|
||||||
$subTitle = trans('firefly.mass_edit_journals');
|
$subTitle = trans('firefly.mass_edit_journals');
|
||||||
/** @var ARI $accountRepository */
|
/** @var ARI $accountRepository */
|
||||||
$accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$accountRepository = app(ARI::class);
|
||||||
$accountList = ExpandedForm::makeSelectList($accountRepository->getAccounts(['Default account', 'Asset account']));
|
$accountList = ExpandedForm::makeSelectList($accountRepository->getAccounts(['Default account', 'Asset account']));
|
||||||
|
|
||||||
// put previous url in session
|
// put previous url in session
|
||||||
|
@@ -263,7 +263,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
{
|
{
|
||||||
|
|
||||||
/** @var AccountRepositoryInterface $accountRepository */
|
/** @var AccountRepositoryInterface $accountRepository */
|
||||||
$accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
$accountRepository = app(AccountRepositoryInterface::class);
|
||||||
$amount = '0';
|
$amount = '0';
|
||||||
$creditCards = $accountRepository->getCreditCards($end); // Find credit card accounts and possibly unpaid credit card bills.
|
$creditCards = $accountRepository->getCreditCards($end); // Find credit card accounts and possibly unpaid credit card bills.
|
||||||
/** @var Account $creditCard */
|
/** @var Account $creditCard */
|
||||||
|
Reference in New Issue
Block a user