mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Merge branch 'release/4.3.2'
This commit is contained in:
commit
0fca6eb810
25
CHANGELOG.md
25
CHANGELOG.md
@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [4.3.2] - 2017-01-09
|
||||
|
||||
An intermediate release because something in the Twig and Twigbridge libraries is broken and I have to make sure it doesn't affect you guys. But some cool features were on their way so there's that oo.
|
||||
|
||||
### Added
|
||||
- Some code for issue #475, consistent overviews.
|
||||
- Better currency display. Make sure you have locale packages installed.
|
||||
|
||||
### Changed
|
||||
- Uses a new version of Laravel.
|
||||
|
||||
### Fixed
|
||||
- The password reset routine was broken.
|
||||
- Issue #522, thanks to @xpfgsyb
|
||||
- Issue #524, thanks to @worldworm
|
||||
- Issue #526, thanks to @worldworm
|
||||
- Issue #528, thanks to @skibbipl
|
||||
- Various other fixes.
|
||||
|
||||
## [4.3.1] - 2017-01-04
|
||||
### Added
|
||||
- Support for Russian and Polish.
|
||||
@ -324,7 +343,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Fixed a bug where a migration would check an empty table name.
|
||||
- Fixed various bugs in the import routine.
|
||||
- Fixed various bugs in the piggy banks pages.
|
||||
- Fixed a bug in the ``firefly:verify`` routine
|
||||
- Fixed a bug in the `firefly:verify` routine
|
||||
|
||||
## [3.10] - 2015-05-25
|
||||
### Added
|
||||
@ -353,11 +372,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Bulk update problems, #280, thanks @stickgrinder
|
||||
- Fixed various problems with amount reporting of split transactions.
|
||||
|
||||
[3.9.1]
|
||||
## [3.9.1]
|
||||
### Fixed
|
||||
- Fixed a bug where removing money from a piggy bank would not work. See issue #265 and #269
|
||||
|
||||
[3.9.0]
|
||||
## [3.9.0]
|
||||
### Added
|
||||
- @zjean has added code that allows you to force "https://"-URL's.
|
||||
- @tonicospinelli has added Portuguese (Brazil) translations.
|
||||
|
@ -1,86 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* MoveRepository.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This software may be modified and distributed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
/**
|
||||
* Class MoveRepository
|
||||
*
|
||||
* @package FireflyIII\Console\Commands
|
||||
*/
|
||||
class MoveRepository extends Command
|
||||
{
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Alerts the user that the Github repository will move, if they are interested to know this.';
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'firefly:github-move';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$moveDate = new Carbon('2017-01-01');
|
||||
$final = new Carbon('2017-03-01');
|
||||
$now = new Carbon;
|
||||
|
||||
// display message before 2017-01-01
|
||||
if ($moveDate > $now) {
|
||||
$this->line('+------------------------------------------------------------------------------+');
|
||||
$this->line('');
|
||||
$this->line('The Github repository for Firefly III will MOVE');
|
||||
$this->line('This move will be on January 1st 2017');
|
||||
$this->line('');
|
||||
$this->error('READ THIS WIKI PAGE FOR MORE INFORMATION');
|
||||
$this->line('');
|
||||
$this->info('https://github.com/firefly-iii/help/wiki/New-Github-repository');
|
||||
$this->line('');
|
||||
$this->line('+------------------------------------------------------------------------------+');
|
||||
}
|
||||
|
||||
// display message after 2017-01-01 but before 2017-03-01
|
||||
if ($moveDate <= $now && $now <= $final) {
|
||||
$this->line('+------------------------------------------------------------------------------+');
|
||||
$this->line('');
|
||||
$this->line('The Github repository for Firefly III has MOVED');
|
||||
$this->line('This move was on January 1st 2017!');
|
||||
$this->line('');
|
||||
$this->error('READ THIS WIKI PAGE FOR MORE INFORMATION');
|
||||
$this->line('');
|
||||
$this->info('https://github.com/firefly-iii/help/wiki/New-Github-repository');
|
||||
$this->line('');
|
||||
$this->line('+------------------------------------------------------------------------------+');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -63,7 +63,6 @@ class Kernel extends ConsoleKernel
|
||||
EncryptFile::class,
|
||||
ScanAttachments::class,
|
||||
UpgradeDatabase::class,
|
||||
MoveRepository::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -158,9 +158,7 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
foreach ($accounts as $account) {
|
||||
$balanceEntry = new BalanceEntry;
|
||||
$balanceEntry->setAccount($account);
|
||||
$spent = $this->budgetRepository->spentInPeriod(
|
||||
new Collection([$budgetLimit->budget]), new Collection([$account]), $budgetLimit->start_date, $budgetLimit->end_date
|
||||
);
|
||||
$spent = $this->budgetRepository->spentInPeriod(new Collection([$budgetLimit->budget]), new Collection([$account]), $budgetLimit->start_date, $budgetLimit->end_date);
|
||||
$balanceEntry->setSpent($spent);
|
||||
$line->addBalanceEntry($balanceEntry);
|
||||
}
|
||||
@ -215,7 +213,7 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
$empty = new BalanceLine;
|
||||
|
||||
foreach ($accounts as $account) {
|
||||
$spent = $this->budgetRepository->spentInPeriodWithoutBudget(new Collection([$account]), $start, $end);
|
||||
$spent = $this->budgetRepository->spentInPeriodWoBudget(new Collection([$account]), $start, $end);
|
||||
// budget
|
||||
$budgetEntry = new BalanceEntry;
|
||||
$budgetEntry->setAccount($account);
|
||||
|
@ -80,7 +80,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
|
||||
}
|
||||
}
|
||||
$noBudget = $this->repository->spentInPeriodWithoutBudget($accounts, $start, $end); // stuff outside of budgets
|
||||
$noBudget = $this->repository->spentInPeriodWoBudget($accounts, $start, $end); // stuff outside of budgets
|
||||
$budgetLine = new BudgetLine;
|
||||
$budgetLine->setOverspent($noBudget)->setSpent($noBudget);
|
||||
$object->addOverspent($noBudget)->addBudgetLine($budgetLine);
|
||||
|
@ -103,31 +103,6 @@ class ReportHelper implements ReportHelperInterface
|
||||
return $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return CategoryCollection
|
||||
*/
|
||||
public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection
|
||||
{
|
||||
$object = new CategoryCollection;
|
||||
/** @var CategoryRepositoryInterface $repository */
|
||||
$repository = app(CategoryRepositoryInterface::class);
|
||||
$categories = $repository->getCategories();
|
||||
|
||||
/** @var Category $category */
|
||||
foreach ($categories as $category) {
|
||||
$spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end);
|
||||
// CategoryCollection expects the amount in $spent:
|
||||
$category->spent = $spent;
|
||||
$object->addCategory($category);
|
||||
}
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Carbon $date
|
||||
*
|
||||
|
@ -42,15 +42,6 @@ interface ReportHelperInterface
|
||||
*/
|
||||
public function getBillReport(Carbon $start, Carbon $end, Collection $accounts): BillCollection;
|
||||
|
||||
/**
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return CategoryCollection
|
||||
*/
|
||||
public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection;
|
||||
|
||||
/**
|
||||
* @param Carbon $date
|
||||
*
|
||||
|
@ -65,7 +65,7 @@ class AccountController extends Controller
|
||||
/**
|
||||
* @param string $what
|
||||
*
|
||||
* @return View
|
||||
* @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory|View
|
||||
*/
|
||||
public function create(string $what = 'asset')
|
||||
{
|
||||
@ -75,12 +75,9 @@ class AccountController extends Controller
|
||||
$defaultCurrency = Amount::getDefaultCurrency();
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $what);
|
||||
$subTitle = trans('firefly.make_new_' . $what . '_account');
|
||||
Session::flash(
|
||||
'preFilled',
|
||||
[
|
||||
'currency_id' => $defaultCurrency->id,
|
||||
]
|
||||
);
|
||||
|
||||
// pre fill some data
|
||||
Session::flash('preFilled', ['currency_id' => $defaultCurrency->id,]);
|
||||
|
||||
// put previous url in session if not redirect from store (not "create another").
|
||||
if (session('accounts.create.fromStore') !== true) {
|
||||
@ -248,6 +245,7 @@ class AccountController extends Controller
|
||||
$page = intval($request->get('page')) === 0 ? 1 : intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$chartUri = route('chart.account.single', [$account->id]);
|
||||
$accountType = $account->accountType->type;
|
||||
|
||||
// grab those journals:
|
||||
$collector->setAccounts(new Collection([$account]))->setRange($start, $end)->setLimit($pageSize)->setPage($page);
|
||||
@ -257,7 +255,7 @@ class AccountController extends Controller
|
||||
// generate entries for each period (and cache those)
|
||||
$entries = $this->periodEntries($account);
|
||||
|
||||
return view('accounts.show', compact('account', 'entries', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
return view('accounts.show', compact('account', 'accountType', 'entries', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -298,14 +296,15 @@ class AccountController extends Controller
|
||||
*/
|
||||
public function showByDate(Request $request, Account $account, string $date)
|
||||
{
|
||||
$carbon = new Carbon($date);
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$start = Navigation::startOfPeriod($carbon, $range);
|
||||
$end = Navigation::endOfPeriod($carbon, $range);
|
||||
$subTitle = $account->name . ' (' . Navigation::periodShow($start, $range) . ')';
|
||||
$page = intval($request->get('page')) === 0 ? 1 : intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$chartUri = route('chart.account.period', [$account->id, $carbon->format('Y-m-d')]);
|
||||
$carbon = new Carbon($date);
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$start = Navigation::startOfPeriod($carbon, $range);
|
||||
$end = Navigation::endOfPeriod($carbon, $range);
|
||||
$subTitle = $account->name . ' (' . Navigation::periodShow($start, $range) . ')';
|
||||
$page = intval($request->get('page')) === 0 ? 1 : intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$chartUri = route('chart.account.period', [$account->id, $carbon->format('Y-m-d')]);
|
||||
$accountType = $account->accountType->type;
|
||||
|
||||
// replace with journal collector:
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
@ -314,8 +313,11 @@ class AccountController extends Controller
|
||||
$journals = $collector->getPaginatedJournals();
|
||||
$journals->setPath('accounts/show/' . $account->id . '/' . $date);
|
||||
|
||||
// generate entries for each period (and cache those)
|
||||
$entries = $this->periodEntries($account);
|
||||
|
||||
// same call, except "entries".
|
||||
return view('accounts.show', compact('account', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
return view('accounts.show', compact('account', 'accountType', 'entries', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -442,7 +444,7 @@ class AccountController extends Controller
|
||||
$earned = $tasker->amountInInPeriod(new Collection([$account]), $assets, $end, $currentEnd);
|
||||
$dateStr = $end->format('Y-m-d');
|
||||
$dateName = Navigation::periodShow($end, $range);
|
||||
$entries->push([$dateStr, $dateName, $spent, $earned]);
|
||||
$entries->push([$dateStr, $dateName, $spent, $earned, clone $end]);
|
||||
$end = Navigation::subtractPeriod($end, $range, 1);
|
||||
|
||||
}
|
||||
|
@ -88,10 +88,11 @@ class AttachmentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Attachment $attachment
|
||||
* @param AttachmentRepositoryInterface $repository
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return mixed
|
||||
* @throws FireflyException
|
||||
*
|
||||
*/
|
||||
public function download(AttachmentRepositoryInterface $repository, Attachment $attachment)
|
||||
{
|
||||
|
@ -16,6 +16,7 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Http\Request;
|
||||
use Password;
|
||||
|
||||
/**
|
||||
* Class ForgotPasswordController
|
||||
|
@ -24,6 +24,7 @@ use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Preferences;
|
||||
@ -64,20 +65,19 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
* @param Budget $budget
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function amount(Request $request, BudgetRepositoryInterface $repository, Budget $budget)
|
||||
public function amount(Request $request, Budget $budget)
|
||||
{
|
||||
$amount = intval($request->get('amount'));
|
||||
/** @var Carbon $start */
|
||||
$start = session('start', Carbon::now()->startOfMonth());
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', Carbon::now()->endOfMonth());
|
||||
$budgetLimit = $repository->updateLimitAmount($budget, $start, $end, $amount);
|
||||
$budgetLimit = $this->repository->updateLimitAmount($budget, $start, $end, $amount);
|
||||
if ($amount == 0) {
|
||||
$budgetLimit = null;
|
||||
}
|
||||
@ -122,17 +122,16 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function destroy(Budget $budget, BudgetRepositoryInterface $repository)
|
||||
public function destroy(Budget $budget)
|
||||
{
|
||||
|
||||
$name = $budget->name;
|
||||
$budgetId = $budget->id;
|
||||
$repository->destroy($budget);
|
||||
$this->repository->destroy($budget);
|
||||
|
||||
|
||||
Session::flash('success', strval(trans('firefly.deleted_budget', ['name' => e($name)])));
|
||||
@ -238,21 +237,19 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
* @param AccountRepositoryInterface $accountRepository
|
||||
* @param Budget $budget
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function show(Request $request, BudgetRepositoryInterface $repository, AccountRepositoryInterface $accountRepository, Budget $budget)
|
||||
public function show(Request $request, Budget $budget)
|
||||
{
|
||||
/** @var Carbon $start */
|
||||
$start = session('first', Carbon::create()->startOfYear());
|
||||
$end = new Carbon;
|
||||
$page = intval($request->get('page')) == 0 ? 1 : intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
||||
$limits = $this->getLimits($budget, $start, $end);
|
||||
$repetition = null;
|
||||
// collector:
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
@ -262,15 +259,7 @@ class BudgetController extends Controller
|
||||
$journals->setPath('/budgets/show/' . $budget->id);
|
||||
|
||||
|
||||
$set = $repository->getBudgetLimits($budget, $start, $end);
|
||||
$subTitle = e($budget->name);
|
||||
$limits = new Collection();
|
||||
|
||||
/** @var BudgetLimit $entry */
|
||||
foreach ($set as $entry) {
|
||||
$entry->spent = $repository->spentInPeriod(new Collection([$budget]), $accounts, $entry->start_date, $entry->end_date);
|
||||
$limits->push($entry);
|
||||
}
|
||||
|
||||
return view('budgets.show', compact('limits', 'budget', 'repetition', 'journals', 'subTitle'));
|
||||
}
|
||||
@ -289,8 +278,6 @@ class BudgetController extends Controller
|
||||
throw new FireflyException('This budget limit is not part of this budget.');
|
||||
}
|
||||
|
||||
/** @var BudgetRepositoryInterface $repository */
|
||||
$repository = app(BudgetRepositoryInterface::class);
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$page = intval($request->get('page')) == 0 ? 1 : intval($request->get('page'));
|
||||
@ -313,23 +300,23 @@ class BudgetController extends Controller
|
||||
$journals->setPath('/budgets/show/' . $budget->id . '/' . $budgetLimit->id);
|
||||
|
||||
|
||||
$budgetLimit->spent = $repository->spentInPeriod(new Collection([$budget]), $accounts, $budgetLimit->start_date, $budgetLimit->end_date);
|
||||
$limits = new Collection([$budgetLimit]);
|
||||
$start = session('first', Carbon::create()->startOfYear());
|
||||
$end = new Carbon;
|
||||
$limits = $this->getLimits($budget, $start, $end);
|
||||
|
||||
return view('budgets.show', compact('limits', 'budget', 'budgetLimit', 'journals', 'subTitle'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetFormRequest $request
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
* @param BudgetFormRequest $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function store(BudgetFormRequest $request, BudgetRepositoryInterface $repository)
|
||||
public function store(BudgetFormRequest $request)
|
||||
{
|
||||
$data = $request->getBudgetData();
|
||||
$budget = $repository->store($data);
|
||||
$budget = $this->repository->store($data);
|
||||
|
||||
Session::flash('success', strval(trans('firefly.stored_new_budget', ['name' => e($budget->name)])));
|
||||
Preferences::mark();
|
||||
@ -347,16 +334,15 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetFormRequest $request
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
* @param Budget $budget
|
||||
* @param BudgetFormRequest $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function update(BudgetFormRequest $request, BudgetRepositoryInterface $repository, Budget $budget)
|
||||
public function update(BudgetFormRequest $request, Budget $budget)
|
||||
{
|
||||
$data = $request->getBudgetData();
|
||||
$repository->update($budget, $data);
|
||||
$this->repository->update($budget, $data);
|
||||
|
||||
Session::flash('success', strval(trans('firefly.updated_budget', ['name' => e($budget->name)])));
|
||||
Preferences::mark();
|
||||
@ -397,6 +383,7 @@ class BudgetController extends Controller
|
||||
private function collectBudgetInformation(Collection $budgets, Carbon $start, Carbon $end): array
|
||||
{
|
||||
// get account information
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
||||
$return = [];
|
||||
@ -429,4 +416,41 @@ class BudgetController extends Controller
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
private function getLimits(Budget $budget, Carbon $start, Carbon $end): Collection
|
||||
{
|
||||
// properties for cache
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($start);
|
||||
$cache->addProperty($end);
|
||||
$cache->addProperty($budget->id);
|
||||
$cache->addProperty('get-limits');
|
||||
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
||||
$set = $this->repository->getBudgetLimits($budget, $start, $end);
|
||||
$limits = new Collection();
|
||||
|
||||
/** @var BudgetLimit $entry */
|
||||
foreach ($set as $entry) {
|
||||
$entry->spent = $this->repository->spentInPeriod(new Collection([$budget]), $accounts, $entry->start_date, $entry->end_date);
|
||||
$limits->push($entry);
|
||||
}
|
||||
$cache->store($limits);
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -193,14 +193,16 @@ class CategoryController extends Controller
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$subTitle = $category->name;
|
||||
$subTitleIcon = 'fa-bar-chart';
|
||||
$entries = $this->getGroupedEntries($category);
|
||||
$method = 'default';
|
||||
|
||||
// get journals
|
||||
$collector->setLimit($pageSize)->setPage($page)->setAllAssetAccounts()->setRange($start, $end)->setCategory($category)->withBudgetInformation();
|
||||
$journals = $collector->getPaginatedJournals();
|
||||
$journals->setPath('categories/show/' . $category->id);
|
||||
|
||||
$entries = $this->getGroupedEntries($category);
|
||||
|
||||
return view('categories.show', compact('category', 'journals', 'entries', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end'));
|
||||
return view('categories.show', compact('category', 'method', 'journals', 'entries', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -223,7 +225,7 @@ class CategoryController extends Controller
|
||||
$hideCategory = true; // used in list.
|
||||
$page = intval($request->get('page')) === 0 ? 1 : intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$showAll = true;
|
||||
$method = 'all';
|
||||
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class);
|
||||
@ -231,7 +233,7 @@ class CategoryController extends Controller
|
||||
$journals = $collector->getPaginatedJournals();
|
||||
$journals->setPath('categories/show/' . $category->id . '/all');
|
||||
|
||||
return view('categories.show', compact('category', 'journals', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end', 'showAll'));
|
||||
return view('categories.show', compact('category', 'method', 'journals', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,6 +254,8 @@ class CategoryController extends Controller
|
||||
$hideCategory = true; // used in list.
|
||||
$page = intval($request->get('page')) === 0 ? 1 : intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$entries = $this->getGroupedEntries($category);
|
||||
$method = 'date';
|
||||
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class);
|
||||
@ -259,7 +263,7 @@ class CategoryController extends Controller
|
||||
$journals = $collector->getPaginatedJournals();
|
||||
$journals->setPath('categories/show/' . $category->id . '/' . $date);
|
||||
|
||||
return view('categories.show', compact('category', 'journals', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end'));
|
||||
return view('categories.show', compact('category', 'method', 'entries', 'journals', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -319,7 +323,9 @@ class CategoryController extends Controller
|
||||
*/
|
||||
private function getGroupedEntries(Category $category): Collection
|
||||
{
|
||||
$repository = app(CategoryRepositoryInterface::class);
|
||||
/** @var CategoryRepositoryInterface $repository */
|
||||
$repository = app(CategoryRepositoryInterface::class);
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
$first = $repository->firstUseDate($category);
|
||||
@ -348,7 +354,7 @@ class CategoryController extends Controller
|
||||
$earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $end, $currentEnd);
|
||||
$dateStr = $end->format('Y-m-d');
|
||||
$dateName = Navigation::periodShow($end, $range);
|
||||
$entries->push([$dateStr, $dateName, $spent, $earned]);
|
||||
$entries->push([$dateStr, $dateName, $spent, $earned, clone $end]);
|
||||
$end = Navigation::subtractPeriod($end, $range, 1);
|
||||
}
|
||||
$cache->store($entries);
|
||||
|
@ -148,6 +148,7 @@ class CategoryController extends Controller
|
||||
$chartData[$category->name] = bcmul($spent, '-1');
|
||||
}
|
||||
}
|
||||
|
||||
$chartData[strval(trans('firefly.no_category'))] = bcmul($repository->spentInPeriodWithoutCategory(new Collection, $start, $end), '-1');
|
||||
|
||||
// sort
|
||||
|
@ -324,7 +324,7 @@ class PiggyBankController extends Controller
|
||||
|
||||
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
|
||||
|
||||
if (bccomp($amount, $savedSoFar) === -1) {
|
||||
if (bccomp($amount, $savedSoFar) <= 0) {
|
||||
$repetition = $piggyBank->currentRelevantRep();
|
||||
$repetition->currentamount = bcsub($repetition->currentamount, $amount);
|
||||
$repetition->save();
|
||||
@ -414,7 +414,7 @@ class PiggyBankController extends Controller
|
||||
* @param PiggyBankFormRequest $request
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return $this
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
*/
|
||||
public function update(PiggyBankRepositoryInterface $repository, PiggyBankFormRequest $request, PiggyBank $piggyBank)
|
||||
{
|
||||
|
@ -13,6 +13,7 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use FireflyIII\Exceptions\ValidationException;
|
||||
use FireflyIII\Http\Requests\DeleteAccountFormRequest;
|
||||
use FireflyIII\Http\Requests\ProfileFormRequest;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
@ -114,9 +115,11 @@ class ProfileController extends Controller
|
||||
|
||||
return redirect(route('profile.change-password'));
|
||||
}
|
||||
$result = $this->validatePassword($request->get('current_password'), $request->get('new_password'));
|
||||
if (!($result === true)) {
|
||||
Session::flash('error', $result);
|
||||
|
||||
try {
|
||||
$this->validatePassword($request->get('current_password'), $request->get('new_password'));
|
||||
} catch (ValidationException $e) {
|
||||
Session::flash('error', $e->getMessage());
|
||||
|
||||
return redirect(route('profile.change-password'));
|
||||
}
|
||||
@ -163,16 +166,16 @@ class ProfileController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $old
|
||||
* @param string $new1
|
||||
* @param string $new
|
||||
*
|
||||
* @return string|bool
|
||||
* @return bool
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validatePassword(string $old, string $new1)
|
||||
protected function validatePassword(string $old, string $new): bool
|
||||
{
|
||||
if ($new1 == $old) {
|
||||
return trans('firefly.should_change');
|
||||
if ($new === $old) {
|
||||
throw new ValidationException(strval(trans('firefly.should_change')));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -13,13 +13,17 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Http\Requests\TagFormRequest;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Navigation;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use URL;
|
||||
@ -41,8 +45,12 @@ use View;
|
||||
class TagController extends Controller
|
||||
{
|
||||
|
||||
/** @var array */
|
||||
public $tagOptions = [];
|
||||
|
||||
/** @var TagRepositoryInterface */
|
||||
protected $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -53,15 +61,19 @@ class TagController extends Controller
|
||||
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
View::share('title', 'Tags');
|
||||
View::share('mainTitleIcon', 'fa-tags');
|
||||
$this->repository = app(TagRepositoryInterface::class);
|
||||
$this->tagOptions = [
|
||||
'nothing' => trans('firefly.regular_tag'),
|
||||
'balancingAct' => trans('firefly.balancing_act'),
|
||||
'advancePayment' => trans('firefly.advance_payment'),
|
||||
];
|
||||
|
||||
|
||||
View::share('title', strval(trans('firefly.tags')));
|
||||
View::share('mainTitleIcon', 'fa-tags');
|
||||
View::share('tagOptions', $this->tagOptions);
|
||||
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
@ -113,16 +125,15 @@ class TagController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TagRepositoryInterface $repository
|
||||
* @param Tag $tag
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function destroy(TagRepositoryInterface $repository, Tag $tag)
|
||||
public function destroy(Tag $tag)
|
||||
{
|
||||
|
||||
$tagName = $tag->tag;
|
||||
$repository->destroy($tag);
|
||||
$this->repository->destroy($tag);
|
||||
|
||||
Session::flash('success', strval(trans('firefly.deleted_tag', ['tag' => e($tagName)])));
|
||||
Preferences::mark();
|
||||
@ -216,15 +227,34 @@ class TagController extends Controller
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function show(Request $request, JournalCollectorInterface $collector, Tag $tag)
|
||||
public function show(Request $request, JournalCollectorInterface $collector, Tag $tag, string $moment = '')
|
||||
{
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
|
||||
if (strlen($moment) > 0) {
|
||||
try {
|
||||
$start = new Carbon($moment);
|
||||
$end = Navigation::endOfPeriod($start, $range);
|
||||
} catch (Exception $e) {
|
||||
$start = Navigation::startOfPeriod($this->repository->firstUseDate($tag), $range);
|
||||
$end = Navigation::startOfPeriod($this->repository->lastUseDate($tag), $range);
|
||||
}
|
||||
}
|
||||
if (strlen($moment) === 0) {
|
||||
$start = clone session('start', Carbon::now()->startOfMonth());
|
||||
$end = clone session('end', Carbon::now()->endOfMonth());
|
||||
}
|
||||
|
||||
$subTitle = $tag->tag;
|
||||
$subTitleIcon = 'fa-tag';
|
||||
$page = intval($request->get('page')) === 0 ? 1 : intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||
$periods = $this->getPeriodOverview($tag);
|
||||
|
||||
// use collector:
|
||||
$collector->setAllAssetAccounts()->setLimit($pageSize)->setPage($page)->setTag($tag)->withBudgetInformation()->withCategoryInformation();
|
||||
$collector->setAllAssetAccounts()
|
||||
->setLimit($pageSize)->setPage($page)->setTag($tag)
|
||||
->withBudgetInformation()->withCategoryInformation()->setRange($start, $end);
|
||||
$journals = $collector->getPaginatedJournals();
|
||||
$journals->setPath('tags/show/' . $tag->id);
|
||||
|
||||
@ -234,20 +264,18 @@ class TagController extends Controller
|
||||
}
|
||||
);
|
||||
|
||||
return view('tags.show', compact('tag', 'subTitle', 'subTitleIcon', 'journals', 'sum'));
|
||||
return view('tags.show', compact('tag', 'periods', 'subTitle', 'subTitleIcon', 'journals', 'sum', 'start', 'end'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TagFormRequest $request
|
||||
*
|
||||
* @param TagRepositoryInterface $repository
|
||||
* @param TagFormRequest $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function store(TagFormRequest $request, TagRepositoryInterface $repository)
|
||||
public function store(TagFormRequest $request)
|
||||
{
|
||||
$data = $request->collectTagData();
|
||||
$repository->store($data);
|
||||
$this->repository->store($data);
|
||||
|
||||
Session::flash('success', strval(trans('firefly.created_tag', ['tag' => e($data['tag'])])));
|
||||
Preferences::mark();
|
||||
@ -265,16 +293,15 @@ class TagController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TagFormRequest $request
|
||||
* @param TagRepositoryInterface $repository
|
||||
* @param Tag $tag
|
||||
* @param TagFormRequest $request
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function update(TagFormRequest $request, TagRepositoryInterface $repository, Tag $tag)
|
||||
public function update(TagFormRequest $request, Tag $tag)
|
||||
{
|
||||
$data = $request->collectTagData();
|
||||
$repository->update($tag, $data);
|
||||
$this->repository->update($tag, $data);
|
||||
|
||||
Session::flash('success', strval(trans('firefly.updated_tag', ['tag' => e($data['tag'])])));
|
||||
Preferences::mark();
|
||||
@ -289,4 +316,50 @@ class TagController extends Controller
|
||||
// redirect to previous URL.
|
||||
return redirect(session('tags.edit.url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
private function getPeriodOverview(Tag $tag): Collection
|
||||
{
|
||||
// get first and last tag date from tag:
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$start = Navigation::startOfPeriod($this->repository->firstUseDate($tag), $range);
|
||||
$end = Navigation::startOfPeriod($this->repository->lastUseDate($tag), $range);
|
||||
// properties for entries with their amounts.
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($start);
|
||||
$cache->addProperty($end);
|
||||
$cache->addProperty('tag.entries');
|
||||
$cache->addProperty($tag->id);
|
||||
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$collection = new Collection;
|
||||
|
||||
// while end larger or equal to start
|
||||
while ($end >= $start) {
|
||||
$currentEnd = Navigation::endOfPeriod($end, $range);
|
||||
|
||||
// get expenses and what-not in this period and this tag.
|
||||
$arr = [
|
||||
'date_string' => $end->format('Y-m-d'),
|
||||
'date_name' => Navigation::periodShow($end, $range),
|
||||
'date' => $end,
|
||||
'spent' => $this->repository->spentInperiod($tag, $end, $currentEnd),
|
||||
'earned' => $this->repository->earnedInperiod($tag, $end, $currentEnd),
|
||||
];
|
||||
$collection->push($arr);
|
||||
|
||||
$end = Navigation::subtractPeriod($end, $range, 1);
|
||||
}
|
||||
$cache->store($collection);
|
||||
|
||||
return $collection;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Navigation;
|
||||
use NumberFormatter;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use View;
|
||||
@ -111,20 +110,19 @@ class Range
|
||||
$monthAndDayFormat = (string)trans('config.month_and_day');
|
||||
$dateTimeFormat = (string)trans('config.date_time');
|
||||
$defaultCurrency = Amount::getDefaultCurrency();
|
||||
$localeconv = localeconv();
|
||||
$accounting = Amount::getJsConfig($localeconv);
|
||||
|
||||
// decimal places is overruled by TransactionCurrency
|
||||
$localeconv['frac_digits'] = $defaultCurrency->decimal_places;
|
||||
|
||||
// change localeconv to a new array:
|
||||
$numberFormatter = numfmt_create($lang, NumberFormatter::CURRENCY);
|
||||
$localeconv = [
|
||||
'mon_decimal_point' => $numberFormatter->getSymbol($numberFormatter->getAttribute(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL)),
|
||||
'mon_thousands_sep' => $numberFormatter->getSymbol($numberFormatter->getAttribute(NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL)),
|
||||
'frac_digits' => $defaultCurrency->decimal_places,
|
||||
];
|
||||
View::share('monthFormat', $monthFormat);
|
||||
View::share('monthAndDayFormat', $monthAndDayFormat);
|
||||
View::share('dateTimeFormat', $dateTimeFormat);
|
||||
View::share('language', $lang);
|
||||
View::share('localeconv', $localeconv);
|
||||
View::share('defaultCurrency', $defaultCurrency);
|
||||
View::share('accountingConfig', $accounting);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,8 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Carbon\Carbon;
|
||||
/**
|
||||
* Class VerifyCsrfToken
|
||||
*
|
||||
@ -30,4 +31,25 @@ class VerifyCsrfToken extends BaseVerifier
|
||||
= [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Add the CSRF token to the response cookies.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Response $response
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
protected function addCookieToResponse($request, $response)
|
||||
{
|
||||
$config = config('session');
|
||||
|
||||
$response->headers->setCookie(
|
||||
new Cookie(
|
||||
'XSRF-TOKEN', $request->session()->token(), Carbon::now()->getTimestamp() + 60 * $config['lifetime'],
|
||||
$config['path'], $config['domain'], $config['secure'], true
|
||||
)
|
||||
);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +67,8 @@ class BillFormRequest extends Request
|
||||
$rules = [
|
||||
'name' => $nameRule,
|
||||
'match' => $matchRule,
|
||||
'amount_min' => 'required|numeric|min:0.01',
|
||||
'amount_max' => 'required|numeric|min:0.01',
|
||||
'amount_min' => 'required|numeric|more:0',
|
||||
'amount_max' => 'required|numeric|more:0',
|
||||
'amount_currency_id_amount_min' => 'required|exists:transaction_currencies,id',
|
||||
'amount_currency_id_amount_max' => 'required|exists:transaction_currencies,id',
|
||||
'date' => 'required|date',
|
||||
|
@ -94,7 +94,7 @@ class JournalFormRequest extends Request
|
||||
'notes' => 'min:1,max:50000',
|
||||
// and then transaction rules:
|
||||
'description' => 'required|between:1,255',
|
||||
'amount' => 'numeric|required|min:0.01',
|
||||
'amount' => 'numeric|required|more:0',
|
||||
'budget_id' => 'mustExist:budgets,id|belongsToUser:budgets,id',
|
||||
'category' => 'between:1,255',
|
||||
'source_account_id' => 'numeric|belongsToUser:accounts,id',
|
||||
|
@ -63,7 +63,7 @@ class PiggyBankFormRequest extends Request
|
||||
$rules = [
|
||||
'name' => $nameRule,
|
||||
'account_id' => 'required|belongsToUser:accounts',
|
||||
'targetamount' => 'required|min:0.01',
|
||||
'targetamount' => 'required|numeric|more:0',
|
||||
'amount_currency_id_targetamount' => 'required|exists:transaction_currencies,id',
|
||||
'startdate' => 'date',
|
||||
'targetdate' => $targetDateRule,
|
||||
|
@ -19,6 +19,7 @@ use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Storage;
|
||||
use Crypt;
|
||||
|
||||
/**
|
||||
* Class AttachmentRepository
|
||||
|
@ -24,9 +24,7 @@ use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Query\JoinClause;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Navigation;
|
||||
use stdClass;
|
||||
|
||||
@ -291,7 +289,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
}
|
||||
);
|
||||
}
|
||||
)->orderBy('budget_limits.start_date','DESC')->get(['budget_limits.*']);
|
||||
)->orderBy('budget_limits.start_date', 'DESC')->get(['budget_limits.*']);
|
||||
|
||||
return $set;
|
||||
}
|
||||
@ -445,80 +443,21 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
*/
|
||||
public function spentInPeriod(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
// collect amount of transaction journals, which is easy:
|
||||
$budgetIds = $budgets->pluck('id')->toArray();
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
||||
$collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setBudgets($budgets);
|
||||
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
|
||||
Log::debug(sprintf('spentInPeriod: Now in spentInPeriod for these budgets (%d): ', count($budgetIds)), $budgetIds);
|
||||
Log::debug('spentInPeriod: and these accounts: ', $accountIds);
|
||||
Log::debug(sprintf('spentInPeriod: Start date is "%s", end date is "%s"', $start->format('Y-m-d'), $end->format('Y-m-d')));
|
||||
|
||||
$fromJournalsQuery = TransactionJournal::leftJoin(
|
||||
'budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id'
|
||||
)
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||
->leftJoin(
|
||||
'transactions', function (JoinClause $join) {
|
||||
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where(
|
||||
'transactions.amount', '<', 0
|
||||
);
|
||||
}
|
||||
)
|
||||
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
|
||||
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->whereNull('transactions.deleted_at')
|
||||
->where('transaction_journals.user_id', $this->user->id)
|
||||
->where('transaction_types.type', 'Withdrawal');
|
||||
|
||||
// add budgets:
|
||||
if ($budgets->count() > 0) {
|
||||
$fromJournalsQuery->whereIn('budget_transaction_journal.budget_id', $budgetIds);
|
||||
}
|
||||
|
||||
// add accounts:
|
||||
if ($accounts->count() > 0) {
|
||||
$fromJournalsQuery->whereIn('transactions.account_id', $accountIds);
|
||||
$collector->setAccounts($accounts);
|
||||
}
|
||||
$first = strval($fromJournalsQuery->sum('transactions.amount'));
|
||||
Log::debug(sprintf('spentInPeriod: Result from first query: %s', $first));
|
||||
unset($fromJournalsQuery);
|
||||
|
||||
// collect amount from transactions:
|
||||
/**
|
||||
* select transactions.id, budget_transaction.budget_id , transactions.amount
|
||||
*
|
||||
*
|
||||
* and budget_transaction.budget_id in (1,61)
|
||||
* and transactions.account_id in (2)
|
||||
*/
|
||||
$fromTransactionsQuery = Transaction::leftJoin('budget_transaction', 'budget_transaction.transaction_id', '=', 'transactions.id')
|
||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||
->whereNull('transactions.deleted_at')
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->where('transactions.amount', '<', 0)
|
||||
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
|
||||
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
||||
->where('transaction_journals.user_id', $this->user->id)
|
||||
->where('transaction_types.type', 'Withdrawal');
|
||||
|
||||
// add budgets:
|
||||
if ($budgets->count() > 0) {
|
||||
$fromTransactionsQuery->whereIn('budget_transaction.budget_id', $budgetIds);
|
||||
if ($accounts->count() === 0) {
|
||||
$collector->setAllAssetAccounts();
|
||||
}
|
||||
|
||||
// add accounts:
|
||||
if ($accounts->count() > 0) {
|
||||
$fromTransactionsQuery->whereIn('transactions.account_id', $accountIds);
|
||||
}
|
||||
$second = strval($fromTransactionsQuery->sum('transactions.amount'));
|
||||
Log::debug(sprintf('spentInPeriod: Result from second query: %s', $second));
|
||||
$set = $collector->getJournals();
|
||||
$sum = strval($set->sum('transaction_amount'));
|
||||
|
||||
Log::debug(sprintf('spentInPeriod: FINAL: %s', bcadd($first, $second)));
|
||||
|
||||
return bcadd($first, $second);
|
||||
return $sum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -528,62 +467,31 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function spentInPeriodWithoutBudget(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
public function spentInPeriodWoBudget(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
$types = [TransactionType::WITHDRAWAL];
|
||||
$query = $this->user->transactionJournals()
|
||||
->distinct()
|
||||
->transactionTypes($types)
|
||||
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin(
|
||||
'transactions as source', function (JoinClause $join) {
|
||||
$join->on('source.transaction_journal_id', '=', 'transaction_journals.id')->where('source.amount', '<', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin(
|
||||
'transactions as destination', function (JoinClause $join) {
|
||||
$join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')->where('destination.amount', '>', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin('budget_transaction', 'source.id', '=', 'budget_transaction.transaction_id')
|
||||
->whereNull('budget_transaction_journal.id')
|
||||
->whereNull('budget_transaction.id')
|
||||
->before($end)
|
||||
->after($start)
|
||||
->whereNull('source.deleted_at')
|
||||
->whereNull('destination.deleted_at')
|
||||
->where('transaction_journals.completed', 1);
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
||||
$collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->withoutBudget();
|
||||
|
||||
if ($accounts->count() > 0) {
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
$query->where(
|
||||
// source.account_id in accountIds XOR destination.account_id in accountIds
|
||||
function (Builder $sourceXorDestinationQuery) use ($accountIds) {
|
||||
$sourceXorDestinationQuery->where(
|
||||
function (Builder $inSourceButNotDestinationQuery) use ($accountIds) {
|
||||
$inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds)
|
||||
->whereNotIn('destination.account_id', $accountIds);
|
||||
}
|
||||
)->orWhere(
|
||||
function (Builder $inDestinationButNotSourceQuery) use ($accountIds) {
|
||||
$inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds)
|
||||
->whereNotIn('source.account_id', $accountIds);
|
||||
}
|
||||
);
|
||||
$collector->setAccounts($accounts);
|
||||
}
|
||||
if ($accounts->count() === 0) {
|
||||
$collector->setAllAssetAccounts();
|
||||
}
|
||||
|
||||
$set = $collector->getJournals();
|
||||
$set = $set->filter(
|
||||
function (Transaction $transaction) {
|
||||
if (bccomp($transaction->transaction_amount, '0') === -1) {
|
||||
return $transaction;
|
||||
}
|
||||
);
|
||||
}
|
||||
$ids = $query->get(['transaction_journals.id'])->pluck('id')->toArray();
|
||||
$sum = '0';
|
||||
if (count($ids) > 0) {
|
||||
$sum = strval(
|
||||
$this->user->transactions()
|
||||
->whereIn('transaction_journal_id', $ids)
|
||||
->where('amount', '<', '0')
|
||||
->whereNull('transactions.deleted_at')
|
||||
->sum('amount')
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
$sum = strval($set->sum('transaction_amount'));
|
||||
|
||||
return $sum;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ interface BudgetRepositoryInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function spentInPeriodWithoutBudget(Collection $accounts, Carbon $start, Carbon $end): string;
|
||||
public function spentInPeriodWoBudget(Collection $accounts, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
|
@ -14,14 +14,12 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Repositories\Category;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use DB;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Query\JoinClause;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Navigation;
|
||||
@ -68,23 +66,11 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
*/
|
||||
public function earnedInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
$sum = $this->sumInPeriod($categories, $accounts, TransactionType::DEPOSIT, $start, $end);
|
||||
|
||||
return $sum;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function earnedInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
$types = [TransactionType::DEPOSIT, TransactionType::TRANSFER];
|
||||
$sum = $this->sumInPeriodWithoutCategory($accounts, $types, $start, $end);
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
||||
$collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setAccounts($accounts)->setCategories($categories);
|
||||
$set = $collector->getJournals();
|
||||
$sum = strval($set->sum('transaction_amount'));
|
||||
|
||||
return $sum;
|
||||
}
|
||||
@ -408,8 +394,21 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
*/
|
||||
public function spentInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
$sum = $this->sumInPeriod($categories, $accounts, TransactionType::WITHDRAWAL, $start, $end);
|
||||
$sum = bcmul($sum, '-1');
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
||||
$collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setCategories($categories);
|
||||
|
||||
|
||||
if ($accounts->count() > 0) {
|
||||
$collector->setAccounts($accounts);
|
||||
}
|
||||
if ($accounts->count() === 0) {
|
||||
$collector->setAllAssetAccounts();
|
||||
}
|
||||
|
||||
|
||||
$set = $collector->getJournals();
|
||||
$sum = strval($set->sum('transaction_amount'));
|
||||
|
||||
return $sum;
|
||||
}
|
||||
@ -423,8 +422,29 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
*/
|
||||
public function spentInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
$types = [TransactionType::WITHDRAWAL, TransactionType::TRANSFER];
|
||||
$sum = $this->sumInPeriodWithoutCategory($accounts, $types, $start, $end);
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
||||
$collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->withoutCategory();
|
||||
|
||||
if ($accounts->count() > 0) {
|
||||
$collector->setAccounts($accounts);
|
||||
}
|
||||
if ($accounts->count() === 0) {
|
||||
$collector->setAllAssetAccounts();
|
||||
}
|
||||
|
||||
$set = $collector->getJournals();
|
||||
$set = $set->filter(
|
||||
function (Transaction $transaction) {
|
||||
if (bccomp($transaction->transaction_amount, '0') === -1) {
|
||||
return $transaction;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
$sum = strval($set->sum('transaction_amount'));
|
||||
|
||||
return $sum;
|
||||
}
|
||||
@ -462,124 +482,4 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $categories
|
||||
* @param Collection $accounts
|
||||
* @param string $type
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function sumInPeriod(Collection $categories, Collection $accounts, string $type, Carbon $start, Carbon $end): string
|
||||
{
|
||||
$categoryIds = $categories->pluck('id')->toArray();
|
||||
$query = $this->user
|
||||
->transactionJournals()
|
||||
->leftJoin( // join source transaction
|
||||
'transactions as source_transactions', function (JoinClause $join) {
|
||||
$join->on('source_transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('source_transactions.amount', '<', 0);
|
||||
|
||||
}
|
||||
)
|
||||
->leftJoin( // join destination transaction (slighly more complex)
|
||||
'transactions as destination_transactions', function (JoinClause $join) {
|
||||
$join->on('destination_transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('destination_transactions.amount', '>', 0)
|
||||
->where('destination_transactions.identifier', '=', DB::raw('source_transactions.identifier'));
|
||||
}
|
||||
)
|
||||
// left join source category:
|
||||
->leftJoin('category_transaction as source_cat_trans', 'source_transactions.id', '=', 'source_cat_trans.transaction_id')
|
||||
// left join destination category:
|
||||
->leftJoin('category_transaction as dest_cat_trans', 'source_transactions.id', '=', 'dest_cat_trans.transaction_id')
|
||||
// left join journal category:
|
||||
->leftJoin('category_transaction_journal as journal_category', 'journal_category.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
// left join transaction type:
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||
// where nothing is deleted:
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->whereNull('source_transactions.deleted_at')
|
||||
->whereNull('destination_transactions.deleted_at')
|
||||
// in correct date range:
|
||||
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
|
||||
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
||||
// correct categories (complex)
|
||||
->where(
|
||||
function ($q1) use ($categoryIds) {
|
||||
$q1->where(
|
||||
function ($q2) use ($categoryIds) {
|
||||
// source and destination transaction have categories, journal does not.
|
||||
$q2->whereIn('source_cat_trans.category_id', $categoryIds);
|
||||
$q2->whereIn('dest_cat_trans.category_id', $categoryIds);
|
||||
$q2->whereNull('journal_category.category_id');
|
||||
}
|
||||
);
|
||||
$q1->orWhere(
|
||||
function ($q3) use ($categoryIds) {
|
||||
// journal has category, source and destination have not
|
||||
$q3->whereNull('source_cat_trans.category_id');
|
||||
$q3->whereNull('dest_cat_trans.category_id');
|
||||
$q3->whereIn('journal_category.category_id', $categoryIds);
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
// type:
|
||||
->where('transaction_types.type', $type);
|
||||
// accounts, if present:
|
||||
if ($accounts->count() > 0) {
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
$query->where(
|
||||
function ($q) use ($accountIds) {
|
||||
$q->whereIn('source_transactions.account_id', $accountIds);
|
||||
$q->orWhereIn('destination_transactions.account_id', $accountIds);
|
||||
}
|
||||
);
|
||||
}
|
||||
$sum = strval($query->sum('destination_transactions.amount'));
|
||||
if ($sum === '') {
|
||||
$sum = '0';
|
||||
}
|
||||
|
||||
|
||||
return $sum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param array $types
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function sumInPeriodWithoutCategory(Collection $accounts, array $types, Carbon $start, Carbon $end): string
|
||||
{
|
||||
$query = $this->user->transactionJournals()
|
||||
->distinct()
|
||||
->transactionTypes($types)
|
||||
->leftJoin('category_transaction_journal', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin(
|
||||
'transactions as t', function (JoinClause $join) {
|
||||
$join->on('t.transaction_journal_id', '=', 'transaction_journals.id')->where('amount', '<', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin('category_transaction', 't.id', '=', 'category_transaction.transaction_id')
|
||||
->whereNull('category_transaction_journal.id')
|
||||
->whereNull('category_transaction.id')
|
||||
->before($end)
|
||||
->after($start);
|
||||
|
||||
if ($accounts->count() > 0) {
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
|
||||
$query->whereIn('t.account_id', $accountIds);
|
||||
}
|
||||
$sum = strval($query->sum('t.amount'));
|
||||
|
||||
return $sum;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -41,15 +41,6 @@ interface CategoryRepositoryInterface
|
||||
*/
|
||||
public function earnedInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function earnedInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* Find a category
|
||||
*
|
||||
|
@ -14,6 +14,8 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Repositories\Tag;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@ -121,6 +123,21 @@ class TagRepository implements TagRepositoryInterface
|
||||
return new Tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return Carbon
|
||||
*/
|
||||
public function firstUseDate(Tag $tag): Carbon
|
||||
{
|
||||
$journal = $tag->transactionJournals()->orderBy('date', 'ASC')->first();
|
||||
if (!is_null($journal)) {
|
||||
return $journal->date;
|
||||
}
|
||||
|
||||
return new Carbon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
@ -137,6 +154,21 @@ class TagRepository implements TagRepositoryInterface
|
||||
return $tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return Carbon
|
||||
*/
|
||||
public function lastUseDate(Tag $tag): Carbon
|
||||
{
|
||||
$journal = $tag->transactionJournals()->orderBy('date', 'DESC')->first();
|
||||
if (!is_null($journal)) {
|
||||
return $journal->date;
|
||||
}
|
||||
|
||||
return new Carbon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
@ -353,4 +385,40 @@ class TagRepository implements TagRepositoryInterface
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function earnedInPeriod(Tag $tag, Carbon $start, Carbon $end): string
|
||||
{
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
||||
$collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setAllAssetAccounts()->setTag($tag);
|
||||
$set = $collector->getJournals();
|
||||
$sum = strval($set->sum('transaction_amount'));
|
||||
|
||||
return $sum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function spentInPeriod(Tag $tag, Carbon $start, Carbon $end): string
|
||||
{
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
||||
$collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setAllAssetAccounts()->setTag($tag);
|
||||
$set = $collector->getJournals();
|
||||
$sum = strval($set->sum('transaction_amount'));
|
||||
|
||||
return $sum;
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Repositories\Tag;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
@ -44,6 +45,15 @@ interface TagRepositoryInterface
|
||||
*/
|
||||
public function destroy(Tag $tag): bool;
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function earnedInPeriod(Tag $tag, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* @param int $tagId
|
||||
*
|
||||
@ -58,6 +68,13 @@ interface TagRepositoryInterface
|
||||
*/
|
||||
public function findByTag(string $tag): Tag;
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return Carbon
|
||||
*/
|
||||
public function firstUseDate(Tag $tag): Carbon;
|
||||
|
||||
/**
|
||||
* This method returns all the user's tags.
|
||||
*
|
||||
@ -65,6 +82,22 @@ interface TagRepositoryInterface
|
||||
*/
|
||||
public function get(): Collection;
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return Carbon
|
||||
*/
|
||||
public function lastUseDate(Tag $tag): Carbon;
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function spentInPeriod(Tag $tag, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* This method stores a tag.
|
||||
*
|
||||
|
@ -17,6 +17,7 @@ use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Preferences as Prefs;
|
||||
|
||||
/**
|
||||
@ -26,6 +27,80 @@ use Preferences as Prefs;
|
||||
*/
|
||||
class Amount
|
||||
{
|
||||
/**
|
||||
* bool $sepBySpace is $localeconv['n_sep_by_space']
|
||||
* int $signPosn = $localeconv['n_sign_posn']
|
||||
* string $sign = $localeconv['negative_sign']
|
||||
* bool $csPrecedes = $localeconv['n_cs_precedes']
|
||||
*
|
||||
* @param bool $sepBySpace
|
||||
* @param int $signPosn
|
||||
* @param string $sign
|
||||
* @param bool $csPrecedes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getAmountJsConfig(bool $sepBySpace, int $signPosn, string $sign, bool $csPrecedes): string
|
||||
{
|
||||
// negative first:
|
||||
$space = ' ';
|
||||
|
||||
// require space between symbol and amount?
|
||||
if (!$sepBySpace) {
|
||||
$space = ''; // no
|
||||
}
|
||||
|
||||
// there are five possible positions for the "+" or "-" sign (if it is even used)
|
||||
// pos_a and pos_e could be the ( and ) symbol.
|
||||
$pos_a = ''; // before everything
|
||||
$pos_b = ''; // before currency symbol
|
||||
$pos_c = ''; // after currency symbol
|
||||
$pos_d = ''; // before amount
|
||||
$pos_e = ''; // after everything
|
||||
|
||||
// format would be (currency before amount)
|
||||
// AB%sC_D%vE
|
||||
// or:
|
||||
// AD%v_B%sCE (amount before currency)
|
||||
// the _ is the optional space
|
||||
|
||||
|
||||
// switch on how to display amount:
|
||||
switch ($signPosn) {
|
||||
default:
|
||||
case 0:
|
||||
// ( and ) around the whole thing
|
||||
$pos_a = '(';
|
||||
$pos_e = ')';
|
||||
break;
|
||||
case 1:
|
||||
// The sign string precedes the quantity and currency_symbol
|
||||
$pos_a = $sign;
|
||||
break;
|
||||
case 2:
|
||||
// The sign string succeeds the quantity and currency_symbol
|
||||
$pos_e = $sign;
|
||||
break;
|
||||
case 3:
|
||||
// The sign string immediately precedes the currency_symbol
|
||||
$pos_b = $sign;
|
||||
break;
|
||||
case 4:
|
||||
// The sign string immediately succeeds the currency_symbol
|
||||
$pos_c = $sign;
|
||||
}
|
||||
|
||||
// default: (amount before currency)
|
||||
$format = $pos_a . $pos_d . '%v' . $space . $pos_b . '%s' . $pos_c . $pos_e;
|
||||
|
||||
if ($csPrecedes) {
|
||||
// (currency before amount)
|
||||
$format = $pos_a . $pos_b . '%s' . $pos_c . $space . $pos_d . '%v' . $pos_e;
|
||||
}
|
||||
Log::debug(sprintf('Final format: "%s"', $format));
|
||||
|
||||
return $format;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $amount
|
||||
@ -50,7 +125,9 @@ class Amount
|
||||
*/
|
||||
public function formatAnything(TransactionCurrency $format, string $amount, bool $coloured = true): string
|
||||
{
|
||||
setlocale(LC_MONETARY, 0);
|
||||
$locale = explode(',', trans('config.locale'));
|
||||
$locale = array_map('trim', $locale);
|
||||
setlocale(LC_MONETARY, $locale);
|
||||
$float = round($amount, 12);
|
||||
$info = localeconv();
|
||||
$formatted = number_format($float, $format->decimal_places, $info['mon_decimal_point'], $info['mon_thousands_sep']);
|
||||
@ -195,4 +272,24 @@ class Amount
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the correct format rules required by accounting.js,
|
||||
* the library used to format amounts in charts.
|
||||
*
|
||||
* @param array $config
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getJsConfig(array $config): array
|
||||
{
|
||||
$negative = self::getAmountJsConfig($config['n_sep_by_space'] === 1, $config['n_sign_posn'], $config['negative_sign'], $config['n_cs_precedes'] === 1);
|
||||
$positive = self::getAmountJsConfig($config['p_sep_by_space'] === 1, $config['p_sign_posn'], $config['positive_sign'], $config['p_cs_precedes'] === 1);
|
||||
|
||||
return [
|
||||
'pos' => $positive,
|
||||
'neg' => $negative,
|
||||
'zero' => $positive,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -496,9 +496,6 @@ class ExpandedForm
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$options['step'] = 'any';
|
||||
if ($view !== 'balance') {
|
||||
$options['min'] = '0.01';
|
||||
}
|
||||
$defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency();
|
||||
$currencies = Amt::getAllCurrencies();
|
||||
unset($options['currency']);
|
||||
|
@ -129,12 +129,11 @@ class Navigation
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Carbon\Carbon $theCurrentEnd
|
||||
* @param string $repeatFreq
|
||||
* @param \Carbon\Carbon|null $maxDate
|
||||
*
|
||||
* @param \Carbon\Carbon $theCurrentEnd
|
||||
* @param $repeatFreq
|
||||
* @param \Carbon\Carbon $maxDate
|
||||
*
|
||||
* @return \Carbon\Carbon
|
||||
* @return Carbon
|
||||
*/
|
||||
public function endOfX(Carbon $theCurrentEnd, string $repeatFreq, Carbon $maxDate = null): Carbon
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ class Preferences
|
||||
/**
|
||||
* @param \FireflyIII\User $user
|
||||
* @param string $name
|
||||
* @param string $default
|
||||
* @param null|string $default
|
||||
*
|
||||
* @return \FireflyIII\Models\Preference|null
|
||||
*/
|
||||
|
@ -147,6 +147,20 @@ class FireflyValidator extends Validator
|
||||
return (intval($checksum) === 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $attribute
|
||||
* @param $value
|
||||
* @param $parameters
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateMore($attribute, $value, $parameters): bool
|
||||
{
|
||||
$compare = $parameters[0] ?? '0';
|
||||
return bccomp($value, $compare) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
* @param $attribute
|
||||
|
@ -28,11 +28,12 @@
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"ext-intl": "*",
|
||||
"laravel/framework": "5.3.18",
|
||||
"laravel/framework": "5.3.28",
|
||||
"davejamesmiller/laravel-breadcrumbs": "^3.0",
|
||||
"watson/validating": "3.*",
|
||||
"doctrine/dbal": "^2.5",
|
||||
"league/commonmark": "0.15.*",
|
||||
"twig/twig": "1.30.0",
|
||||
"rcrowe/twigbridge": "0.9.*",
|
||||
"league/csv": "8.*",
|
||||
"laravelcollective/html": "^5.3",
|
||||
@ -72,7 +73,6 @@
|
||||
],
|
||||
"post-install-cmd": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postInstall",
|
||||
"php artisan firefly:github-move",
|
||||
"php artisan optimize"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
@ -80,7 +80,6 @@
|
||||
"php artisan firefly:upgrade-instructions",
|
||||
"php artisan firefly:upgrade-database",
|
||||
"php artisan firefly:verify",
|
||||
"php artisan firefly:github-move",
|
||||
"php artisan optimize"
|
||||
]
|
||||
},
|
||||
|
75
composer.lock
generated
75
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "38cc0ca42a8c6c518d99045c4bfe5d19",
|
||||
"content-hash": "c1354d0797f44315708cc46642aca068",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -854,16 +854,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.3.18",
|
||||
"version": "v5.3.28",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "9bee167d173857c25966c19afdaa66f127ca6784"
|
||||
"reference": "a64fc4f8958091ca39623b2e8c8f173cb34fa47a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/9bee167d173857c25966c19afdaa66f127ca6784",
|
||||
"reference": "9bee167d173857c25966c19afdaa66f127ca6784",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/a64fc4f8958091ca39623b2e8c8f173cb34fa47a",
|
||||
"reference": "a64fc4f8958091ca39623b2e8c8f173cb34fa47a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -878,7 +878,7 @@
|
||||
"nesbot/carbon": "~1.20",
|
||||
"paragonie/random_compat": "~1.4|~2.0",
|
||||
"php": ">=5.6.4",
|
||||
"psy/psysh": "0.7.*",
|
||||
"psy/psysh": "0.7.*|0.8.*",
|
||||
"ramsey/uuid": "~3.0",
|
||||
"swiftmailer/swiftmailer": "~5.1",
|
||||
"symfony/console": "3.1.*",
|
||||
@ -945,7 +945,7 @@
|
||||
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).",
|
||||
"symfony/css-selector": "Required to use some of the crawler integration testing tools (3.1.*).",
|
||||
"symfony/dom-crawler": "Required to use most of the crawler integration testing tools (3.1.*).",
|
||||
"symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)."
|
||||
"symfony/psr-http-message-bridge": "Required to use psr7 bridging features (0.2.*)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@ -978,7 +978,7 @@
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2016-10-08T01:51:20+00:00"
|
||||
"time": "2016-12-15T18:03:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravelcollective/html",
|
||||
@ -1414,24 +1414,24 @@
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v2.1.1",
|
||||
"version": "v3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "4dd659edadffdc2143e4753df655d866dbfeedf0"
|
||||
"reference": "adf44419c0fc014a0f191db6f89d3e55d4211744"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4dd659edadffdc2143e4753df655d866dbfeedf0",
|
||||
"reference": "4dd659edadffdc2143e4753df655d866dbfeedf0",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/adf44419c0fc014a0f191db6f89d3e55d4211744",
|
||||
"reference": "adf44419c0fc014a0f191db6f89d3e55d4211744",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=5.4"
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
"phpunit/phpunit": "~4.0|~5.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/php-parse"
|
||||
@ -1439,7 +1439,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.1-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -1461,7 +1461,7 @@
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2016-09-16T12:04:44+00:00"
|
||||
"time": "2016-12-06T11:30:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
@ -1621,37 +1621,38 @@
|
||||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
"version": "v0.7.2",
|
||||
"version": "v0.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bobthecow/psysh.git",
|
||||
"reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280"
|
||||
"reference": "4a8860e13aa68a4bbf2476c014f8a1f14f1bf991"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/e64e10b20f8d229cac76399e1f3edddb57a0f280",
|
||||
"reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/4a8860e13aa68a4bbf2476c014f8a1f14f1bf991",
|
||||
"reference": "4a8860e13aa68a4bbf2476c014f8a1f14f1bf991",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dnoegel/php-xdg-base-dir": "0.1",
|
||||
"jakub-onderka/php-console-highlighter": "0.3.*",
|
||||
"nikic/php-parser": "^1.2.1|~2.0",
|
||||
"nikic/php-parser": "~1.3|~2.0|~3.0",
|
||||
"php": ">=5.3.9",
|
||||
"symfony/console": "~2.3.10|^2.4.2|~3.0",
|
||||
"symfony/var-dumper": "~2.7|~3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/php-cs-fixer": "~1.5",
|
||||
"phpunit/phpunit": "~3.7|~4.0|~5.0",
|
||||
"squizlabs/php_codesniffer": "~2.0",
|
||||
"friendsofphp/php-cs-fixer": "~1.11",
|
||||
"hoa/console": "~3.16|~1.14",
|
||||
"phpunit/phpunit": "~4.4|~5.0",
|
||||
"symfony/finder": "~2.1|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
|
||||
"ext-pdo-sqlite": "The doc command requires SQLite to work.",
|
||||
"ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.",
|
||||
"ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history."
|
||||
"ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.",
|
||||
"hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit."
|
||||
},
|
||||
"bin": [
|
||||
"bin/psysh"
|
||||
@ -1689,7 +1690,7 @@
|
||||
"interactive",
|
||||
"shell"
|
||||
],
|
||||
"time": "2016-03-09T05:03:14+00:00"
|
||||
"time": "2016-12-07T17:15:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
@ -2885,20 +2886,20 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v2.3.0",
|
||||
"version": "v2.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||
"reference": "0c87981df959c7c1943abe227baf607c92f204f9"
|
||||
"reference": "65b0465e38a9524c9d5eb2dfc0389aba23090625"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/0c87981df959c7c1943abe227baf607c92f204f9",
|
||||
"reference": "0c87981df959c7c1943abe227baf607c92f204f9",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/65b0465e38a9524c9d5eb2dfc0389aba23090625",
|
||||
"reference": "65b0465e38a9524c9d5eb2dfc0389aba23090625",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "5.1.*|5.2.*|5.3.*",
|
||||
"illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*",
|
||||
"maximebf/debugbar": "~1.13.0",
|
||||
"php": ">=5.5.9",
|
||||
"symfony/finder": "~2.7|~3.0"
|
||||
@ -2935,7 +2936,7 @@
|
||||
"profiler",
|
||||
"webprofiler"
|
||||
],
|
||||
"time": "2016-09-15T14:05:56+00:00"
|
||||
"time": "2017-01-05T08:53:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-ide-helper",
|
||||
@ -3251,16 +3252,16 @@
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.13.0",
|
||||
"version": "1.13.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maximebf/php-debugbar.git",
|
||||
"reference": "5f49a5ed6cfde81d31d89378806670d77462526e"
|
||||
"reference": "afee79a236348e39a44cb837106b7c5b4897ac2a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/5f49a5ed6cfde81d31d89378806670d77462526e",
|
||||
"reference": "5f49a5ed6cfde81d31d89378806670d77462526e",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/afee79a236348e39a44cb837106b7c5b4897ac2a",
|
||||
"reference": "afee79a236348e39a44cb837106b7c5b4897ac2a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3308,7 +3309,7 @@
|
||||
"debug",
|
||||
"debugbar"
|
||||
],
|
||||
"time": "2016-09-15T14:01:59+00:00"
|
||||
"time": "2017-01-05T08:46:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
|
@ -23,7 +23,7 @@ return [
|
||||
'is_demo_site' => false,
|
||||
],
|
||||
'chart' => 'chartjs',
|
||||
'version' => '4.3.1',
|
||||
'version' => '4.3.2',
|
||||
'csv_import_enabled' => true,
|
||||
'maxUploadSize' => 5242880,
|
||||
'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
|
||||
|
6
public/css/firefly.css
vendored
6
public/css/firefly.css
vendored
@ -95,4 +95,10 @@ body.waiting * {
|
||||
.loading {
|
||||
background: url('/images/loading-small.gif') no-repeat center center;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
a[href]:after {
|
||||
content: none !important;
|
||||
}
|
||||
}
|
@ -244,8 +244,7 @@ function drawAChart(URI, container, chartType, options, colorData) {
|
||||
|
||||
|
||||
$.getJSON(URI).done(function (data) {
|
||||
|
||||
|
||||
$('#' + container).removeClass('general-chart-error');
|
||||
if (data.labels.length === 0) {
|
||||
// remove the chart container + parent
|
||||
var holder = $('#' + container).parent().parent();
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
/** global: moment, dateRangeConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */
|
||||
/** global: moment, accountingConfig, dateRangeConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */
|
||||
|
||||
|
||||
$(function () {
|
||||
@ -112,7 +112,7 @@ function currencySelect(e) {
|
||||
accounting.settings = {
|
||||
currency: {
|
||||
symbol: currencySymbol, // default currency symbol is '$'
|
||||
format: "%s %v", // controls output: %s = symbol, %v = value/number (can be object: see below)
|
||||
format: accountingConfig, // controls output: %s = symbol, %v = value/number (can be object: see below)
|
||||
decimal: mon_decimal_point, // decimal point separator
|
||||
thousand: mon_thousands_sep, // thousands separator
|
||||
precision: frac_digits // decimal places
|
||||
|
@ -74,7 +74,8 @@ function loadAjaxPartial(holder, uri) {
|
||||
function displayAjaxPartial(data, holder) {
|
||||
"use strict";
|
||||
var obj = $('#' + holder);
|
||||
obj.removeClass('loading').html(data);
|
||||
obj.html(data);
|
||||
obj.parent().find('.overlay').remove();
|
||||
|
||||
// call some often needed recalculations and what-not:
|
||||
|
||||
@ -98,7 +99,9 @@ function displayAjaxPartial(data, holder) {
|
||||
|
||||
function failAjaxPartial(uri, holder) {
|
||||
"use strict";
|
||||
$('#' + holder).removeClass('loading').addClass('general-chart-error');
|
||||
var holder = $('#' + holder);
|
||||
holder.parent().find('.overlay').remove();
|
||||
holder.addClass('general-chart-error');
|
||||
|
||||
}
|
||||
|
||||
|
@ -60,14 +60,18 @@ $(function () {
|
||||
function getReportOptions() {
|
||||
"use strict";
|
||||
var reportType = $('select[name="report_type"]').val();
|
||||
$('#extra-options').empty();
|
||||
$('#extra-options').addClass('loading');
|
||||
var boxBody = $('#extra-options');
|
||||
var box = $('#extra-options-box');
|
||||
boxBody.empty();
|
||||
box.find('.overlay').show();
|
||||
|
||||
$.getJSON('reports/options/' + reportType, function (data) {
|
||||
$('#extra-options').removeClass('loading').html(data.html);
|
||||
boxBody.html(data.html);
|
||||
setOptionalFromCookies();
|
||||
box.find('.overlay').hide();
|
||||
}).fail(function () {
|
||||
$('#extra-options').removeClass('loading').addClass('error');
|
||||
boxBody.addClass('error');
|
||||
box.find('.overlay').hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -29,9 +29,11 @@ $(document).ready(function () {
|
||||
|
||||
if ($('input[name="tags"]').length > 0) {
|
||||
$.getJSON('json/tags').done(function (data) {
|
||||
|
||||
var opt = {
|
||||
typeahead: {
|
||||
source: data
|
||||
source: data,
|
||||
afterSelect: function(val) { this.$element.val(""); }
|
||||
}
|
||||
};
|
||||
$('input[name="tags"]').tagsinput(
|
||||
|
2
public/js/lib/bootstrap3-typeahead.min.js
vendored
2
public/js/lib/bootstrap3-typeahead.min.js
vendored
File diff suppressed because one or more lines are too long
4932
public/lib/adminlte/css/AdminLTE.css
vendored
Executable file
4932
public/lib/adminlte/css/AdminLTE.css
vendored
Executable file
File diff suppressed because it is too large
Load Diff
164
public/lib/adminlte/css/skins/skin-blue-light.css
vendored
Executable file
164
public/lib/adminlte/css/skins/skin-blue-light.css
vendored
Executable file
@ -0,0 +1,164 @@
|
||||
/*
|
||||
* Skin: Blue
|
||||
* ----------
|
||||
*/
|
||||
.skin-blue-light .main-header .navbar {
|
||||
background-color: #3c8dbc;
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .nav > li > a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .nav > li > a:hover,
|
||||
.skin-blue-light .main-header .navbar .nav > li > a:active,
|
||||
.skin-blue-light .main-header .navbar .nav > li > a:focus,
|
||||
.skin-blue-light .main-header .navbar .nav .open > a,
|
||||
.skin-blue-light .main-header .navbar .nav .open > a:hover,
|
||||
.skin-blue-light .main-header .navbar .nav .open > a:focus,
|
||||
.skin-blue-light .main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.skin-blue-light .main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.skin-blue-light .main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.skin-blue-light .main-header .logo {
|
||||
background-color: #3c8dbc;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue-light .main-header .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
.skin-blue-light .main-header li.user-header {
|
||||
background-color: #3c8dbc;
|
||||
}
|
||||
.skin-blue-light .content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.skin-blue-light .wrapper,
|
||||
.skin-blue-light .main-sidebar,
|
||||
.skin-blue-light .left-side {
|
||||
background-color: #f9fafc;
|
||||
}
|
||||
.skin-blue-light .content-wrapper,
|
||||
.skin-blue-light .main-footer {
|
||||
border-left: 1px solid #d2d6de;
|
||||
}
|
||||
.skin-blue-light .user-panel > .info,
|
||||
.skin-blue-light .user-panel > .info > a {
|
||||
color: #444444;
|
||||
}
|
||||
.skin-blue-light .sidebar-menu > li {
|
||||
-webkit-transition: border-left-color 0.3s ease;
|
||||
-o-transition: border-left-color 0.3s ease;
|
||||
transition: border-left-color 0.3s ease;
|
||||
}
|
||||
.skin-blue-light .sidebar-menu > li.header {
|
||||
color: #848484;
|
||||
background: #f9fafc;
|
||||
}
|
||||
.skin-blue-light .sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.skin-blue-light .sidebar-menu > li:hover > a,
|
||||
.skin-blue-light .sidebar-menu > li.active > a {
|
||||
color: #000000;
|
||||
background: #f4f4f5;
|
||||
}
|
||||
.skin-blue-light .sidebar-menu > li.active {
|
||||
border-left-color: #3c8dbc;
|
||||
}
|
||||
.skin-blue-light .sidebar-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.skin-blue-light .sidebar-menu > li > .treeview-menu {
|
||||
background: #f4f4f5;
|
||||
}
|
||||
.skin-blue-light .sidebar a {
|
||||
color: #444444;
|
||||
}
|
||||
.skin-blue-light .sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.skin-blue-light .treeview-menu > li > a {
|
||||
color: #777777;
|
||||
}
|
||||
.skin-blue-light .treeview-menu > li.active > a,
|
||||
.skin-blue-light .treeview-menu > li > a:hover {
|
||||
color: #000000;
|
||||
}
|
||||
.skin-blue-light .treeview-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.skin-blue-light .sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d2d6de;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.skin-blue-light .sidebar-form input[type="text"],
|
||||
.skin-blue-light .sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.skin-blue-light .sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.skin-blue-light .sidebar-form input[type="text"]:focus,
|
||||
.skin-blue-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.skin-blue-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.skin-blue-light .sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
|
||||
border-left: 1px solid #d2d6de;
|
||||
}
|
||||
}
|
||||
.skin-blue-light .main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #3c8dbc;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
763
public/lib/adminlte/js/app.js
Executable file
763
public/lib/adminlte/js/app.js
Executable file
@ -0,0 +1,763 @@
|
||||
/*! AdminLTE app.js
|
||||
* ================
|
||||
* Main JS application file for AdminLTE v2. This file
|
||||
* should be included in all pages. It controls some layout
|
||||
* options and implements exclusive AdminLTE plugins.
|
||||
*
|
||||
* @Author Almsaeed Studio
|
||||
* @Support <http://www.almsaeedstudio.com>
|
||||
* @Email <abdullah@almsaeedstudio.com>
|
||||
* @version 2.3.7
|
||||
* @license MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
|
||||
//Make sure jQuery has been loaded before app.js
|
||||
if (typeof jQuery === "undefined") {
|
||||
throw new Error("AdminLTE requires jQuery");
|
||||
}
|
||||
|
||||
/* AdminLTE
|
||||
*
|
||||
* @type Object
|
||||
* @description $.AdminLTE is the main object for the template's app.
|
||||
* It's used for implementing functions and options related
|
||||
* to the template. Keeping everything wrapped in an object
|
||||
* prevents conflict with other plugins and is a better
|
||||
* way to organize our code.
|
||||
*/
|
||||
$.AdminLTE = {};
|
||||
|
||||
/* --------------------
|
||||
* - AdminLTE Options -
|
||||
* --------------------
|
||||
* Modify these options to suit your implementation
|
||||
*/
|
||||
$.AdminLTE.options = {
|
||||
//Add slimscroll to navbar menus
|
||||
//This requires you to load the slimscroll plugin
|
||||
//in every page before app.js
|
||||
navbarMenuSlimscroll: true,
|
||||
navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
|
||||
navbarMenuHeight: "200px", //The height of the inner menu
|
||||
//General animation speed for JS animated elements such as box collapse/expand and
|
||||
//sidebar treeview slide up/down. This options accepts an integer as milliseconds,
|
||||
//'fast', 'normal', or 'slow'
|
||||
animationSpeed: 500,
|
||||
//Sidebar push menu toggle button selector
|
||||
sidebarToggleSelector: "[data-toggle='offcanvas']",
|
||||
//Activate sidebar push menu
|
||||
sidebarPushMenu: true,
|
||||
//Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
|
||||
sidebarSlimScroll: true,
|
||||
//Enable sidebar expand on hover effect for sidebar mini
|
||||
//This option is forced to true if both the fixed layout and sidebar mini
|
||||
//are used together
|
||||
sidebarExpandOnHover: false,
|
||||
//BoxRefresh Plugin
|
||||
enableBoxRefresh: true,
|
||||
//Bootstrap.js tooltip
|
||||
enableBSToppltip: true,
|
||||
BSTooltipSelector: "[data-toggle='tooltip']",
|
||||
//Enable Fast Click. Fastclick.js creates a more
|
||||
//native touch experience with touch devices. If you
|
||||
//choose to enable the plugin, make sure you load the script
|
||||
//before AdminLTE's app.js
|
||||
enableFastclick: false,
|
||||
//Control Sidebar Options
|
||||
enableControlSidebar: true,
|
||||
controlSidebarOptions: {
|
||||
//Which button should trigger the open/close event
|
||||
toggleBtnSelector: "[data-toggle='control-sidebar']",
|
||||
//The sidebar selector
|
||||
selector: ".control-sidebar",
|
||||
//Enable slide over content
|
||||
slide: true
|
||||
},
|
||||
//Box Widget Plugin. Enable this plugin
|
||||
//to allow boxes to be collapsed and/or removed
|
||||
enableBoxWidget: true,
|
||||
//Box Widget plugin options
|
||||
boxWidgetOptions: {
|
||||
boxWidgetIcons: {
|
||||
//Collapse icon
|
||||
collapse: 'fa-minus',
|
||||
//Open icon
|
||||
open: 'fa-plus',
|
||||
//Remove icon
|
||||
remove: 'fa-times'
|
||||
},
|
||||
boxWidgetSelectors: {
|
||||
//Remove button selector
|
||||
remove: '[data-widget="remove"]',
|
||||
//Collapse button selector
|
||||
collapse: '[data-widget="collapse"]'
|
||||
}
|
||||
},
|
||||
//Direct Chat plugin options
|
||||
directChat: {
|
||||
//Enable direct chat by default
|
||||
enable: true,
|
||||
//The button to open and close the chat contacts pane
|
||||
contactToggleSelector: '[data-widget="chat-pane-toggle"]'
|
||||
},
|
||||
//Define the set of colors to use globally around the website
|
||||
colors: {
|
||||
lightBlue: "#3c8dbc",
|
||||
red: "#f56954",
|
||||
green: "#00a65a",
|
||||
aqua: "#00c0ef",
|
||||
yellow: "#f39c12",
|
||||
blue: "#0073b7",
|
||||
navy: "#001F3F",
|
||||
teal: "#39CCCC",
|
||||
olive: "#3D9970",
|
||||
lime: "#01FF70",
|
||||
orange: "#FF851B",
|
||||
fuchsia: "#F012BE",
|
||||
purple: "#8E24AA",
|
||||
maroon: "#D81B60",
|
||||
black: "#222222",
|
||||
gray: "#d2d6de"
|
||||
},
|
||||
//The standard screen sizes that bootstrap uses.
|
||||
//If you change these in the variables.less file, change
|
||||
//them here too.
|
||||
screenSizes: {
|
||||
xs: 480,
|
||||
sm: 768,
|
||||
md: 992,
|
||||
lg: 1200
|
||||
}
|
||||
};
|
||||
|
||||
/* ------------------
|
||||
* - Implementation -
|
||||
* ------------------
|
||||
* The next block of code implements AdminLTE's
|
||||
* functions and plugins as specified by the
|
||||
* options above.
|
||||
*/
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
//Fix for IE page transitions
|
||||
$("body").removeClass("hold-transition");
|
||||
|
||||
//Extend options if external options exist
|
||||
if (typeof AdminLTEOptions !== "undefined") {
|
||||
$.extend(true,
|
||||
$.AdminLTE.options,
|
||||
AdminLTEOptions);
|
||||
}
|
||||
|
||||
//Easy access to options
|
||||
var o = $.AdminLTE.options;
|
||||
|
||||
//Set up the object
|
||||
_init();
|
||||
|
||||
//Activate the layout maker
|
||||
$.AdminLTE.layout.activate();
|
||||
|
||||
//Enable sidebar tree view controls
|
||||
$.AdminLTE.tree('.sidebar');
|
||||
|
||||
//Enable control sidebar
|
||||
if (o.enableControlSidebar) {
|
||||
$.AdminLTE.controlSidebar.activate();
|
||||
}
|
||||
|
||||
//Add slimscroll to navbar dropdown
|
||||
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
|
||||
$(".navbar .menu").slimscroll({
|
||||
height: o.navbarMenuHeight,
|
||||
alwaysVisible: false,
|
||||
size: o.navbarMenuSlimscrollWidth
|
||||
}).css("width", "100%");
|
||||
}
|
||||
|
||||
//Activate sidebar push menu
|
||||
if (o.sidebarPushMenu) {
|
||||
$.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
|
||||
}
|
||||
|
||||
//Activate Bootstrap tooltip
|
||||
if (o.enableBSToppltip) {
|
||||
$('body').tooltip({
|
||||
selector: o.BSTooltipSelector
|
||||
});
|
||||
}
|
||||
|
||||
//Activate box widget
|
||||
if (o.enableBoxWidget) {
|
||||
$.AdminLTE.boxWidget.activate();
|
||||
}
|
||||
|
||||
//Activate fast click
|
||||
if (o.enableFastclick && typeof FastClick != 'undefined') {
|
||||
FastClick.attach(document.body);
|
||||
}
|
||||
|
||||
//Activate direct chat widget
|
||||
if (o.directChat.enable) {
|
||||
$(document).on('click', o.directChat.contactToggleSelector, function () {
|
||||
var box = $(this).parents('.direct-chat').first();
|
||||
box.toggleClass('direct-chat-contacts-open');
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* INITIALIZE BUTTON TOGGLE
|
||||
* ------------------------
|
||||
*/
|
||||
$('.btn-group[data-toggle="btn-toggle"]').each(function () {
|
||||
var group = $(this);
|
||||
$(this).find(".btn").on('click', function (e) {
|
||||
group.find(".btn.active").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
/* ----------------------------------
|
||||
* - Initialize the AdminLTE Object -
|
||||
* ----------------------------------
|
||||
* All AdminLTE functions are implemented below.
|
||||
*/
|
||||
function _init() {
|
||||
'use strict';
|
||||
/* Layout
|
||||
* ======
|
||||
* Fixes the layout height in case min-height fails.
|
||||
*
|
||||
* @type Object
|
||||
* @usage $.AdminLTE.layout.activate()
|
||||
* $.AdminLTE.layout.fix()
|
||||
* $.AdminLTE.layout.fixSidebar()
|
||||
*/
|
||||
$.AdminLTE.layout = {
|
||||
activate: function () {
|
||||
var _this = this;
|
||||
_this.fix();
|
||||
_this.fixSidebar();
|
||||
$(window, ".wrapper").resize(function () {
|
||||
_this.fix();
|
||||
_this.fixSidebar();
|
||||
});
|
||||
},
|
||||
fix: function () {
|
||||
//Get window height and the wrapper height
|
||||
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
|
||||
var window_height = $(window).height();
|
||||
var sidebar_height = $(".sidebar").height();
|
||||
//Set the min-height of the content and sidebar based on the
|
||||
//the height of the document.
|
||||
if ($("body").hasClass("fixed")) {
|
||||
$(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
|
||||
} else {
|
||||
var postSetWidth;
|
||||
if (window_height >= sidebar_height) {
|
||||
$(".content-wrapper, .right-side").css('min-height', window_height - neg);
|
||||
postSetWidth = window_height - neg;
|
||||
} else {
|
||||
$(".content-wrapper, .right-side").css('min-height', sidebar_height);
|
||||
postSetWidth = sidebar_height;
|
||||
}
|
||||
|
||||
//Fix for the control sidebar height
|
||||
var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
|
||||
if (typeof controlSidebar !== "undefined") {
|
||||
if (controlSidebar.height() > postSetWidth)
|
||||
$(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
fixSidebar: function () {
|
||||
//Make sure the body tag has the .fixed class
|
||||
if (!$("body").hasClass("fixed")) {
|
||||
if (typeof $.fn.slimScroll != 'undefined') {
|
||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
||||
}
|
||||
return;
|
||||
} else if (typeof $.fn.slimScroll == 'undefined' && window.console) {
|
||||
window.console.error("Error: the fixed layout requires the slimscroll plugin!");
|
||||
}
|
||||
//Enable slimscroll for fixed layout
|
||||
if ($.AdminLTE.options.sidebarSlimScroll) {
|
||||
if (typeof $.fn.slimScroll != 'undefined') {
|
||||
//Destroy if it exists
|
||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
||||
//Add slimscroll
|
||||
$(".sidebar").slimscroll({
|
||||
height: ($(window).height() - $(".main-header").height()) + "px",
|
||||
color: "rgba(0,0,0,0.2)",
|
||||
size: "3px"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* PushMenu()
|
||||
* ==========
|
||||
* Adds the push menu functionality to the sidebar.
|
||||
*
|
||||
* @type Function
|
||||
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
|
||||
*/
|
||||
$.AdminLTE.pushMenu = {
|
||||
activate: function (toggleBtn) {
|
||||
//Get the screen sizes
|
||||
var screenSizes = $.AdminLTE.options.screenSizes;
|
||||
|
||||
//Enable sidebar toggle
|
||||
$(document).on('click', toggleBtn, function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
//Enable sidebar push menu
|
||||
if ($(window).width() > (screenSizes.sm - 1)) {
|
||||
if ($("body").hasClass('sidebar-collapse')) {
|
||||
$("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu');
|
||||
} else {
|
||||
$("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu');
|
||||
}
|
||||
}
|
||||
//Handle sidebar push menu for small screens
|
||||
else {
|
||||
if ($("body").hasClass('sidebar-open')) {
|
||||
$("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
|
||||
} else {
|
||||
$("body").addClass('sidebar-open').trigger('expanded.pushMenu');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".content-wrapper").click(function () {
|
||||
//Enable hide menu when clicking on the content-wrapper on small screens
|
||||
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
}
|
||||
});
|
||||
|
||||
//Enable expand on hover for sidebar mini
|
||||
if ($.AdminLTE.options.sidebarExpandOnHover
|
||||
|| ($('body').hasClass('fixed')
|
||||
&& $('body').hasClass('sidebar-mini'))) {
|
||||
this.expandOnHover();
|
||||
}
|
||||
},
|
||||
expandOnHover: function () {
|
||||
var _this = this;
|
||||
var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
|
||||
//Expand sidebar on hover
|
||||
$('.main-sidebar').hover(function () {
|
||||
if ($('body').hasClass('sidebar-mini')
|
||||
&& $("body").hasClass('sidebar-collapse')
|
||||
&& $(window).width() > screenWidth) {
|
||||
_this.expand();
|
||||
}
|
||||
}, function () {
|
||||
if ($('body').hasClass('sidebar-mini')
|
||||
&& $('body').hasClass('sidebar-expanded-on-hover')
|
||||
&& $(window).width() > screenWidth) {
|
||||
_this.collapse();
|
||||
}
|
||||
});
|
||||
},
|
||||
expand: function () {
|
||||
$("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
|
||||
},
|
||||
collapse: function () {
|
||||
if ($('body').hasClass('sidebar-expanded-on-hover')) {
|
||||
$('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* Tree()
|
||||
* ======
|
||||
* Converts the sidebar into a multilevel
|
||||
* tree view menu.
|
||||
*
|
||||
* @type Function
|
||||
* @Usage: $.AdminLTE.tree('.sidebar')
|
||||
*/
|
||||
$.AdminLTE.tree = function (menu) {
|
||||
var _this = this;
|
||||
var animationSpeed = $.AdminLTE.options.animationSpeed;
|
||||
$(document).off('click', menu + ' li a')
|
||||
.on('click', menu + ' li a', function (e) {
|
||||
//Get the clicked link and the next element
|
||||
var $this = $(this);
|
||||
var checkElement = $this.next();
|
||||
|
||||
//Check if the next element is a menu and is visible
|
||||
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
|
||||
//Close the menu
|
||||
checkElement.slideUp(animationSpeed, function () {
|
||||
checkElement.removeClass('menu-open');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
//_this.layout.fix();
|
||||
});
|
||||
checkElement.parent("li").removeClass("active");
|
||||
}
|
||||
//If the menu is not visible
|
||||
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
|
||||
//Get the parent menu
|
||||
var parent = $this.parents('ul').first();
|
||||
//Close all open menus within the parent
|
||||
var ul = parent.find('ul:visible').slideUp(animationSpeed);
|
||||
//Remove the menu-open class from the parent
|
||||
ul.removeClass('menu-open');
|
||||
//Get the parent li
|
||||
var parent_li = $this.parent("li");
|
||||
|
||||
//Open the target menu and add the menu-open class
|
||||
checkElement.slideDown(animationSpeed, function () {
|
||||
//Add the class active to the parent li
|
||||
checkElement.addClass('menu-open');
|
||||
parent.find('li.active').removeClass('active');
|
||||
parent_li.addClass('active');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
_this.layout.fix();
|
||||
});
|
||||
}
|
||||
//if this isn't a link, prevent the page from being redirected
|
||||
if (checkElement.is('.treeview-menu')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ControlSidebar
|
||||
* ==============
|
||||
* Adds functionality to the right sidebar
|
||||
*
|
||||
* @type Object
|
||||
* @usage $.AdminLTE.controlSidebar.activate(options)
|
||||
*/
|
||||
$.AdminLTE.controlSidebar = {
|
||||
//instantiate the object
|
||||
activate: function () {
|
||||
//Get the object
|
||||
var _this = this;
|
||||
//Update options
|
||||
var o = $.AdminLTE.options.controlSidebarOptions;
|
||||
//Get the sidebar
|
||||
var sidebar = $(o.selector);
|
||||
//The toggle button
|
||||
var btn = $(o.toggleBtnSelector);
|
||||
|
||||
//Listen to the click event
|
||||
btn.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
//If the sidebar is not open
|
||||
if (!sidebar.hasClass('control-sidebar-open')
|
||||
&& !$('body').hasClass('control-sidebar-open')) {
|
||||
//Open the sidebar
|
||||
_this.open(sidebar, o.slide);
|
||||
} else {
|
||||
_this.close(sidebar, o.slide);
|
||||
}
|
||||
});
|
||||
|
||||
//If the body has a boxed layout, fix the sidebar bg position
|
||||
var bg = $(".control-sidebar-bg");
|
||||
_this._fix(bg);
|
||||
|
||||
//If the body has a fixed layout, make the control sidebar fixed
|
||||
if ($('body').hasClass('fixed')) {
|
||||
_this._fixForFixed(sidebar);
|
||||
} else {
|
||||
//If the content height is less than the sidebar's height, force max height
|
||||
if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
|
||||
_this._fixForContent(sidebar);
|
||||
}
|
||||
}
|
||||
},
|
||||
//Open the control sidebar
|
||||
open: function (sidebar, slide) {
|
||||
//Slide over content
|
||||
if (slide) {
|
||||
sidebar.addClass('control-sidebar-open');
|
||||
} else {
|
||||
//Push the content by adding the open class to the body instead
|
||||
//of the sidebar itself
|
||||
$('body').addClass('control-sidebar-open');
|
||||
}
|
||||
},
|
||||
//Close the control sidebar
|
||||
close: function (sidebar, slide) {
|
||||
if (slide) {
|
||||
sidebar.removeClass('control-sidebar-open');
|
||||
} else {
|
||||
$('body').removeClass('control-sidebar-open');
|
||||
}
|
||||
},
|
||||
_fix: function (sidebar) {
|
||||
var _this = this;
|
||||
if ($("body").hasClass('layout-boxed')) {
|
||||
sidebar.css('position', 'absolute');
|
||||
sidebar.height($(".wrapper").height());
|
||||
if (_this.hasBindedResize) {
|
||||
return;
|
||||
}
|
||||
$(window).resize(function () {
|
||||
_this._fix(sidebar);
|
||||
});
|
||||
_this.hasBindedResize = true;
|
||||
} else {
|
||||
sidebar.css({
|
||||
'position': 'fixed',
|
||||
'height': 'auto'
|
||||
});
|
||||
}
|
||||
},
|
||||
_fixForFixed: function (sidebar) {
|
||||
sidebar.css({
|
||||
'position': 'fixed',
|
||||
'max-height': '100%',
|
||||
'overflow': 'auto',
|
||||
'padding-bottom': '50px'
|
||||
});
|
||||
},
|
||||
_fixForContent: function (sidebar) {
|
||||
$(".content-wrapper, .right-side").css('min-height', sidebar.height());
|
||||
}
|
||||
};
|
||||
|
||||
/* BoxWidget
|
||||
* =========
|
||||
* BoxWidget is a plugin to handle collapsing and
|
||||
* removing boxes from the screen.
|
||||
*
|
||||
* @type Object
|
||||
* @usage $.AdminLTE.boxWidget.activate()
|
||||
* Set all your options in the main $.AdminLTE.options object
|
||||
*/
|
||||
$.AdminLTE.boxWidget = {
|
||||
selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,
|
||||
icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,
|
||||
animationSpeed: $.AdminLTE.options.animationSpeed,
|
||||
activate: function (_box) {
|
||||
var _this = this;
|
||||
if (!_box) {
|
||||
_box = document; // activate all boxes per default
|
||||
}
|
||||
//Listen for collapse event triggers
|
||||
$(_box).on('click', _this.selectors.collapse, function (e) {
|
||||
e.preventDefault();
|
||||
_this.collapse($(this));
|
||||
});
|
||||
|
||||
//Listen for remove event triggers
|
||||
$(_box).on('click', _this.selectors.remove, function (e) {
|
||||
e.preventDefault();
|
||||
_this.remove($(this));
|
||||
});
|
||||
},
|
||||
collapse: function (element) {
|
||||
var _this = this;
|
||||
//Find the box parent
|
||||
var box = element.parents(".box").first();
|
||||
//Find the body and the footer
|
||||
var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");
|
||||
if (!box.hasClass("collapsed-box")) {
|
||||
//Convert minus into plus
|
||||
element.children(":first")
|
||||
.removeClass(_this.icons.collapse)
|
||||
.addClass(_this.icons.open);
|
||||
//Hide the content
|
||||
box_content.slideUp(_this.animationSpeed, function () {
|
||||
box.addClass("collapsed-box");
|
||||
});
|
||||
} else {
|
||||
//Convert plus into minus
|
||||
element.children(":first")
|
||||
.removeClass(_this.icons.open)
|
||||
.addClass(_this.icons.collapse);
|
||||
//Show the content
|
||||
box_content.slideDown(_this.animationSpeed, function () {
|
||||
box.removeClass("collapsed-box");
|
||||
});
|
||||
}
|
||||
},
|
||||
remove: function (element) {
|
||||
//Find the box parent
|
||||
var box = element.parents(".box").first();
|
||||
box.slideUp(this.animationSpeed);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* ------------------
|
||||
* - Custom Plugins -
|
||||
* ------------------
|
||||
* All custom plugins are defined below.
|
||||
*/
|
||||
|
||||
/*
|
||||
* BOX REFRESH BUTTON
|
||||
* ------------------
|
||||
* This is a custom plugin to use with the component BOX. It allows you to add
|
||||
* a refresh button to the box. It converts the box's state to a loading state.
|
||||
*
|
||||
* @type plugin
|
||||
* @usage $("#box-widget").boxRefresh( options );
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
$.fn.boxRefresh = function (options) {
|
||||
|
||||
// Render options
|
||||
var settings = $.extend({
|
||||
//Refresh button selector
|
||||
trigger: ".refresh-btn",
|
||||
//File source to be loaded (e.g: ajax/src.php)
|
||||
source: "",
|
||||
//Callbacks
|
||||
onLoadStart: function (box) {
|
||||
return box;
|
||||
}, //Right after the button has been clicked
|
||||
onLoadDone: function (box) {
|
||||
return box;
|
||||
} //When the source has been loaded
|
||||
|
||||
}, options);
|
||||
|
||||
//The overlay
|
||||
var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
|
||||
|
||||
return this.each(function () {
|
||||
//if a source is specified
|
||||
if (settings.source === "") {
|
||||
if (window.console) {
|
||||
window.console.log("Please specify a source first - boxRefresh()");
|
||||
}
|
||||
return;
|
||||
}
|
||||
//the box
|
||||
var box = $(this);
|
||||
//the button
|
||||
var rBtn = box.find(settings.trigger).first();
|
||||
|
||||
//On trigger click
|
||||
rBtn.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
//Add loading overlay
|
||||
start(box);
|
||||
|
||||
//Perform ajax call
|
||||
box.find(".box-body").load(settings.source, function () {
|
||||
done(box);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function start(box) {
|
||||
//Add overlay and loading img
|
||||
box.append(overlay);
|
||||
|
||||
settings.onLoadStart.call(box);
|
||||
}
|
||||
|
||||
function done(box) {
|
||||
//Remove overlay and loading img
|
||||
box.find(overlay).remove();
|
||||
|
||||
settings.onLoadDone.call(box);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/*
|
||||
* EXPLICIT BOX CONTROLS
|
||||
* -----------------------
|
||||
* This is a custom plugin to use with the component BOX. It allows you to activate
|
||||
* a box inserted in the DOM after the app.js was loaded, toggle and remove box.
|
||||
*
|
||||
* @type plugin
|
||||
* @usage $("#box-widget").activateBox();
|
||||
* @usage $("#box-widget").toggleBox();
|
||||
* @usage $("#box-widget").removeBox();
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
'use strict';
|
||||
|
||||
$.fn.activateBox = function () {
|
||||
$.AdminLTE.boxWidget.activate(this);
|
||||
};
|
||||
|
||||
$.fn.toggleBox = function () {
|
||||
var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
|
||||
$.AdminLTE.boxWidget.collapse(button);
|
||||
};
|
||||
|
||||
$.fn.removeBox = function () {
|
||||
var button = $($.AdminLTE.boxWidget.selectors.remove, this);
|
||||
$.AdminLTE.boxWidget.remove(button);
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/*
|
||||
* TODO LIST CUSTOM PLUGIN
|
||||
* -----------------------
|
||||
* This plugin depends on iCheck plugin for checkbox and radio inputs
|
||||
*
|
||||
* @type plugin
|
||||
* @usage $("#todo-widget").todolist( options );
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
'use strict';
|
||||
|
||||
$.fn.todolist = function (options) {
|
||||
// Render options
|
||||
var settings = $.extend({
|
||||
//When the user checks the input
|
||||
onCheck: function (ele) {
|
||||
return ele;
|
||||
},
|
||||
//When the user unchecks the input
|
||||
onUncheck: function (ele) {
|
||||
return ele;
|
||||
}
|
||||
}, options);
|
||||
|
||||
return this.each(function () {
|
||||
|
||||
if (typeof $.fn.iCheck != 'undefined') {
|
||||
$('input', this).on('ifChecked', function () {
|
||||
var ele = $(this).parents("li").first();
|
||||
ele.toggleClass("done");
|
||||
settings.onCheck.call(ele);
|
||||
});
|
||||
|
||||
$('input', this).on('ifUnchecked', function () {
|
||||
var ele = $(this).parents("li").first();
|
||||
ele.toggleClass("done");
|
||||
settings.onUncheck.call(ele);
|
||||
});
|
||||
} else {
|
||||
$('input', this).on('change', function () {
|
||||
var ele = $(this).parents("li").first();
|
||||
ele.toggleClass("done");
|
||||
if ($('input', ele).is(":checked")) {
|
||||
settings.onCheck.call(ele);
|
||||
} else {
|
||||
settings.onUncheck.call(ele);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
}(jQuery));
|
@ -49,7 +49,7 @@ return [
|
||||
'flash_warning' => 'Achtung!',
|
||||
'flash_error' => 'Fehler!',
|
||||
'flash_info_multiple' => 'Es gibt eine Nachricht | Es gibt :count Nachrichten',
|
||||
'flash_error_multiple' => 'Es gibt einen Fehler | Es gibt :count Fehler',
|
||||
'flash_error_multiple' => 'Es gibt einen Fehler|Es gibt :count Fehler',
|
||||
'net_worth' => 'Vermögen',
|
||||
'route_has_no_help' => 'Es gibt keinen Hilfetext für diese Seite.',
|
||||
'help_may_not_be_your_language' => 'Dieser Hilfstext ist in Englisch. Er ist noch nicht in Deutsch verfügbar',
|
||||
@ -539,8 +539,8 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
||||
'stored_new_account' => 'Neues Konto ":name" gespeichert!',
|
||||
'updated_account' => 'Updated account ":name"',
|
||||
'credit_card_options' => 'Kreditkartenoptionen',
|
||||
'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".',
|
||||
'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.',
|
||||
'no_transactions_account' => 'Es gibt keine Transaktionen (in dieser Zeit) für Girokonto ":name".',
|
||||
'no_data_for_chart' => 'Es gibt derzeit (noch) nicht genügend Informationen, um dieses Diagramm zu generieren.',
|
||||
'select_more_than_one_account' => 'Bitte mehr als ein Konto wählen',
|
||||
'select_more_than_one_category' => 'Bitte mehr als eine Kategorie wählen',
|
||||
'select_more_than_one_budget' => 'Bitte mehr als ein Budget wählen',
|
||||
@ -806,6 +806,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
||||
'add_set_amount_to_piggy' => ':amount einzahlen um Sparschwein bis :date zu füllen',
|
||||
'delete_piggy_bank' => 'Sparschwein ":name" löschen',
|
||||
'cannot_add_amount_piggy' => ':amount konnte nicht zu ":name" hinzugefügt werden.',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Sparschwein ":name" gelöscht',
|
||||
'added_amount_to_piggy' => ':amount zu ":name" hinzugefügt',
|
||||
'removed_amount_from_piggy' => ':amount von ":name" entfernt',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'Der Wert von :attribute ist nicht bekannt',
|
||||
'accepted' => ':attribute muss akzeptiert werden.',
|
||||
'bic' => 'Dies ist kein gültiger BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => ':attribute ist keine gültige URL.',
|
||||
'after' => ':attribute muss ein Datum nach :date sein.',
|
||||
'alpha' => ':attribute darf nur Buchstaben enthalten.',
|
||||
|
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'The value of :attribute is unknown',
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'bic' => 'This is not a valid BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
|
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'The value of :attribute is unknown',
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'bic' => 'This is not a valid BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
|
@ -49,7 +49,7 @@ return [
|
||||
'flash_warning' => 'Attention !',
|
||||
'flash_error' => 'Erreur !',
|
||||
'flash_info_multiple' => 'Il y a un message| Il y a :count messages',
|
||||
'flash_error_multiple' => 'Il y a une erreur| Il y a :count errors',
|
||||
'flash_error_multiple' => 'Il y a une erreur|Il y a :count errors',
|
||||
'net_worth' => 'Valeur nette',
|
||||
'route_has_no_help' => 'There is no help for this route.',
|
||||
'help_may_not_be_your_language' => 'This help text is in English. It is not yet available in your language',
|
||||
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Tirelire ":name" supprimée',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'La valeur de :attribute est inconnue',
|
||||
'accepted' => 'Le champ :attribute doit être accepté.',
|
||||
'bic' => 'This is not a valid BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => 'Le champ :attribute n\'est pas une URL valide.',
|
||||
'after' => 'Le champ :attribute doit être une date postérieure à :date.',
|
||||
'alpha' => 'Le champ :attribute doit seulement contenir des lettres.',
|
||||
|
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'The value of :attribute is unknown',
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'bic' => 'This is not a valid BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
|
@ -727,8 +727,8 @@ return [
|
||||
'expense_per_account' => 'Uitgaven per rekening',
|
||||
'include_expense_not_in_budget' => 'Inclusief uitgaven niet in deze budget(ten)',
|
||||
'include_expense_not_in_account' => 'Inclusief uitgaven niet vanaf deze rekening(en)',
|
||||
'include_expense_not_in_category' => 'Included expenses not in the selected category(ies)',
|
||||
'include_income_not_in_category' => 'Included income not in the selected category(ies)',
|
||||
'include_expense_not_in_category' => 'Inclusief uitgaven niet in deze categorie(ën)',
|
||||
'include_income_not_in_category' => 'Inclusief inkomsten niet in deze categorie(ën)',
|
||||
'include_income_not_in_account' => 'Inclusief inkomsten niet op deze rekening(en)',
|
||||
'everything_else' => 'De rest',
|
||||
'income_and_expenses' => 'Inkomsten en uitgaven',
|
||||
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Stop voor :date :amount in dit spaarpotje om hem op tijd te vullen.',
|
||||
'delete_piggy_bank' => 'Verwijder spaarpotje ":name"',
|
||||
'cannot_add_amount_piggy' => 'Kon bedrag :amount niet aan ":name" toevoegen.',
|
||||
'cannot_remove_from_piggy' => 'Kon bedrag :amount niet weghalen uit ":name".',
|
||||
'deleted_piggy_bank' => 'Spaarpotje ":name" verwijderd',
|
||||
'added_amount_to_piggy' => ':amount aan ":name" toegevoegd',
|
||||
'removed_amount_from_piggy' => ':amount uit ":name" gehaald',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'De waarde van :attribute is onbekend',
|
||||
'accepted' => ':attribute moet geaccepteerd zijn.',
|
||||
'bic' => 'Dit is geen geldige BIC.',
|
||||
'more' => ':attribute moet groter zijn dan nul.',
|
||||
'active_url' => ':attribute is geen geldige URL.',
|
||||
'after' => ':attribute moet een datum na :date zijn.',
|
||||
'alpha' => ':attribute mag alleen letters bevatten.',
|
||||
|
@ -12,7 +12,7 @@
|
||||
return [
|
||||
'locale' => 'pl, Polski, pl_PL, pl_PL.utf8',
|
||||
'month' => '%B %Y',
|
||||
'month_and_day' => '%B %e, %Y',
|
||||
'month_and_day' => '%e %B %Y',
|
||||
'date_time' => '%B %e, %Y, @ %T',
|
||||
'specific_day' => '%e %B %Y',
|
||||
'week_in_year' => 'Tydzień %W, %Y',
|
||||
|
@ -38,7 +38,7 @@ return [
|
||||
|
||||
'field_value' => 'Wartość pola',
|
||||
'field_mapped_to' => 'Mapped to',
|
||||
'store_column_mapping' => 'Store mapping',
|
||||
'store_column_mapping' => 'Zapisz mapowanie',
|
||||
|
||||
// map things.
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
return [
|
||||
'no_demo_text' => 'Sorry, there is no extra demo-explanation text for <abbr title=":route">this page</abbr>.',
|
||||
'see_help_icon' => 'However, the <i class="fa fa-question-circle"></i>-icon in the top right corner may tell you more.',
|
||||
'index' => 'Welcome to <strong>Firefly III</strong>! On this page you get a quick overview of your finances. For more information, check out Accounts → <a href=":asset">Asset Accounts</a> and of course the <a href=":budgets">Budgets</a> and <a href=":reports">Reports</a> pages. Or just take a look around and see where you end up.',
|
||||
'accounts-index' => 'Asset accounts are your personal bank accounts. Expense accounts are the accounts you spend money at, such as stores and friends. Revenue accounts are accounts you receive money from, such as your job, the government or other sources of income. On this page you can edit or remove them.',
|
||||
'see_help_icon' => 'Jednakże ikona <i class="fa fa-question-circle"></i> w prawym górnym rogu może powiedzieć Ci więcej.',
|
||||
'index' => 'Witaj w <strong>Firefly III</strong>! Na tej stronie znajduje się szybki przegląd Twoich finansów. Aby uzyskać więcej informacji sprawdź Konta → <a href=":asset">Konta aktywów</a> oraz oczywiście strony <a href=":budgets">Budżety</a> oraz <a href=":reports">Raporty</a>. Lub po prostu się rozejrzyj i zobacz gdzie trafisz w końcu.',
|
||||
'accounts-index' => 'Konta aktywów są Twoimi osobistymi kontami bankowymi. Konta wydatków to konta na które wydajesz pieniądze takie jak sklepy oraz przyjaciele. Kona przychodów są kontami, z których otrzymujesz pieniądze takie jak twoja praca, zwrot podatków lub inne źródła przychodów. Na tej stronie możesz je modyfikować oraz usuwać.',
|
||||
'budgets-index' => 'This page shows you an overview of your budgets. The top bar shows the amount that is available to be budgeted. This can be customized for any period by clicking the amount on the right. The amount you\'ve actually spent is shown in the bar below. Below that are the expenses per budget and what you\'ve budgeted for them.',
|
||||
'reports-index-start' => 'Firefly III supports four types of reports. Read about them by clicking on the <i class="fa fa-question-circle"></i>-icon in the top right corner.',
|
||||
'reports-index-examples' => 'Be sure to check out these examples: <a href=":one">a monthly financial overview</a>, <a href=":two">a yearly financial overview</a> and <a href=":three">a budget overview</a>.',
|
||||
@ -20,5 +20,5 @@ return [
|
||||
'piggy-banks-index' => 'As you can see, there are three piggy banks. Use the plus and minus buttons to influence the amount of money in each piggy bank. Click the name of the piggy bank to see the administration for each piggy bank.',
|
||||
'import-index' => 'Of course, any CSV file can be imported into Firefly III ',
|
||||
'import-configure-security' => 'Because of security concerns, your upload has been replaced with a local file.',
|
||||
'import-configure-configuration' => 'The configuration you see below is correct for the local file.',
|
||||
'import-configure-configuration' => 'Konfiguracja, która widzisz poniżej jest prawidłowa dla lokalnego pliku.',
|
||||
];
|
@ -27,8 +27,8 @@ return [
|
||||
'never' => 'Nigdy',
|
||||
'search_results_for' => 'Wyniki wyszukiwania dla ":query"',
|
||||
'bounced_error' => 'Wiadomość wysłana na adres :email została odrzucona, więc nie ma dostępu dla Ciebie.',
|
||||
'deleted_error' => 'These credentials do not match our records.',
|
||||
'general_blocked_error' => 'Your account has been disabled, so you cannot login.',
|
||||
'deleted_error' => 'Te poświadczenia nie zgadzają się z naszymi danymi.',
|
||||
'general_blocked_error' => 'Twoje konto zostało zablokowane. Dlatego nie możesz się zalogować.',
|
||||
'expired_error' => 'Twoje konto wygasło i nie może być dalej używane.',
|
||||
'removed_amount' => 'Usunięto :amount',
|
||||
'added_amount' => 'Dodano :amount',
|
||||
@ -57,10 +57,10 @@ return [
|
||||
'two_factor_enter_code' => 'Aby kontynuować, wprowadź kod uwierzytelniania dwuskładnikowego. Twoja aplikacja może wygenerować go dla Ciebie.',
|
||||
'two_factor_code_here' => 'Wprowadź tutaj kod',
|
||||
'two_factor_title' => 'Weryfikacja dwuskładnikowa',
|
||||
'authenticate' => 'Authenticate',
|
||||
'authenticate' => 'Uwierzytelnij',
|
||||
'two_factor_forgot_title' => 'Lost two factor authentication',
|
||||
'two_factor_forgot' => 'I forgot my two-factor thing.',
|
||||
'two_factor_lost_header' => 'Lost your two factor authentication?',
|
||||
'two_factor_lost_header' => 'Straciłeś uwierzytelnianie dwuskładnikowe?',
|
||||
'two_factor_lost_intro' => 'Unfortunately, this is not something you can reset from the web interface. You have two choices.',
|
||||
'two_factor_lost_fix_self' => 'If you run your own instance of Firefly III, check the logs in <code>storage/logs</code> for instructions.',
|
||||
'two_factor_lost_fix_owner' => 'Otherwise, email the site owner, <a href="mailto::site_owner">:site_owner</a> and ask them to reset your two factor authentication.',
|
||||
@ -86,7 +86,7 @@ return [
|
||||
'field_supports_markdown' => 'To pole obsługuje <a href="https://en.support.wordpress.com/markdown-quick-reference/"> Markdown</a>.',
|
||||
'need_more_help' => 'If you need more help using Firefly III, please <a href="https://github.com/firefly-iii/firefly-iii/issues">open a ticket on Github</a>.',
|
||||
'nothing_to_display' => 'There are no transactions to show you',
|
||||
'show_all_no_filter' => 'Show all transactions without grouping them by date.',
|
||||
'show_all_no_filter' => 'Pokaż wszystkie transakcje bez grupowania ich według daty.',
|
||||
'expenses_by_category' => 'Wydatki wg kategorii',
|
||||
'expenses_by_budget' => 'Wydatki wg budżetu',
|
||||
'income_by_category' => 'Dochody wg kategorii',
|
||||
@ -94,15 +94,15 @@ return [
|
||||
'sum_of_expenses' => 'Suma wydatków',
|
||||
'sum_of_income' => 'Suma dochodów',
|
||||
'spent_in_specific_budget' => 'Wydatki w budżecie ":budget"',
|
||||
'sum_of_expenses_in_budget' => 'Spent total in budget ":budget"',
|
||||
'sum_of_expenses_in_budget' => 'Wydano łącznie w budżecie ":budget"',
|
||||
'left_in_budget_limit' => 'Left to spend according to budgeting',
|
||||
'cannot_change_demo' => 'Nie można zmienić hasła do konta demonstracyjnego.',
|
||||
'cannot_delete_demo' => 'You cannot remove the demonstration account.',
|
||||
'cannot_reset_demo_user' => 'Nie można zresetować hasła do konta demonstracyjnego',
|
||||
'per_period' => 'Per period',
|
||||
'per_period' => 'Za okres',
|
||||
'all_periods' => 'Wszystkie okresy',
|
||||
'current_period' => 'Bieżący okres',
|
||||
'show_the_current_period_and_overview' => 'Show the current period and overview',
|
||||
'show_the_current_period_and_overview' => 'Pokaż bieżący okres oraz przegląd',
|
||||
'pref_languages_locale' => 'For a language other than English to work properly, your operating system must be equipped with the correct locale-information. If these are not present, currency data, dates and amounts may be formatted wrong.',
|
||||
'budget_in_period' => '":name" między :start oraz :end',
|
||||
'budget_in_period_breadcrumb' => 'Między :start i :end',
|
||||
@ -116,7 +116,7 @@ return [
|
||||
'yearly' => 'rocznie',
|
||||
// account confirmation:
|
||||
'confirm_account_header' => 'Proszę potwierdzić swoje konto',
|
||||
'confirm_account_intro' => 'An email has been sent to the address you used during your registration. Please check it out for further instructions. If you did not get this message, you can have Firefly send it again.',
|
||||
'confirm_account_intro' => 'Wiadomość e-mail została wysłana na adres, którego użyłeś podczas rejestracji. Sprawdź ją proszę w celu otrzymania dalszych instrukcji. Jeśli nie otrzymałeś tej wiadomości, możesz ją wysłać ponownie z Firefly.',
|
||||
'confirm_account_resend_email' => 'Send me the confirmation message I need to activate my account.',
|
||||
'account_is_confirmed' => 'Twoje konto zostało potwierdzone!',
|
||||
'invalid_activation_code' => 'Wygląda na to że kod którego używasz jest nieprawidłowy lub wygasł.',
|
||||
@ -143,14 +143,14 @@ return [
|
||||
'export_status_collected_journals' => 'Collected your transactions!',
|
||||
'export_status_converting_to_export_format' => 'Converting your transactions...',
|
||||
'export_status_converted_to_export_format' => 'Converted your transactions!',
|
||||
'export_status_creating_journal_file' => 'Creating the export file...',
|
||||
'export_status_created_journal_file' => 'Created the export file!',
|
||||
'export_status_creating_journal_file' => 'Tworzenie pliku eksportu...',
|
||||
'export_status_created_journal_file' => 'Utworzono plik eksportu!',
|
||||
'export_status_collecting_attachments' => 'Collecting all your attachments...',
|
||||
'export_status_collected_attachments' => 'Collected all your attachments!',
|
||||
'export_status_collecting_old_uploads' => 'Collecting all your previous uploads...',
|
||||
'export_status_collected_old_uploads' => 'Collected all your previous uploads!',
|
||||
'export_status_creating_config_file' => 'Tworzenie pliku konfiguracji...',
|
||||
'export_status_created_config_file' => 'Created a configuration file!',
|
||||
'export_status_created_config_file' => 'Utworzono plik konfiguracyjny!',
|
||||
'export_status_creating_zip_file' => 'Tworzenie pliku zip...',
|
||||
'export_status_created_zip_file' => 'Utworzono plik zip!',
|
||||
'export_status_finished' => 'Eksport został pomyślnie zakończony! Yay!',
|
||||
@ -173,22 +173,22 @@ return [
|
||||
'updated_rule_group' => 'Pomyślnie zmodyfikowano grupę reguł ":title".',
|
||||
'edit_rule_group' => 'Modyfikuj grupę reguł ":title"',
|
||||
'delete_rule_group' => 'Usuń grupę reguł ":title"',
|
||||
'deleted_rule_group' => 'Deleted rule group ":title"',
|
||||
'deleted_rule_group' => 'Usunięto grupę reguł ":title"',
|
||||
'update_rule_group' => 'Aktualizuj grupę reguł',
|
||||
'no_rules_in_group' => 'Nie ma żadnych reguł w tej grupie',
|
||||
'move_rule_group_up' => 'Przenieś grupę reguł w górę',
|
||||
'move_rule_group_down' => 'Przenieś grupę reguł w dół',
|
||||
'save_rules_by_moving' => 'Save these rule(s) by moving them to another rule group:',
|
||||
'save_rules_by_moving' => 'Zapisz te reguły, przenosząc je do innej grupy reguł:',
|
||||
'make_new_rule' => 'Utwórz nową regułę w grupie reguł ":title"',
|
||||
'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.',
|
||||
'rule_help_stop_processing' => 'Gdy zaznaczysz ten checkbox, kolejne reguły w tej grupie nie będą wykonywane.',
|
||||
'rule_help_active' => 'Nieaktywne reguły nigdy nie zostaną uruchomione.',
|
||||
'stored_new_rule' => 'Zapisano regułę o nazwie ":title"',
|
||||
'deleted_rule' => 'Usunięto regułę o nazwie ":title"',
|
||||
'store_new_rule' => 'Zapisz nową regułę',
|
||||
'updated_rule' => 'Zmodyfikowano regułę o nazwie ":title"',
|
||||
'default_rule_group_name' => 'Reguły domyślne',
|
||||
'default_rule_group_description' => 'All your rules not in a particular group.',
|
||||
'default_rule_name' => 'Your first default rule',
|
||||
'default_rule_group_description' => 'Wszystkie twoje reguły, które nie znajdują się w określonej grupie.',
|
||||
'default_rule_name' => 'Twoja pierwsza reguła domyślna',
|
||||
'default_rule_description' => 'Ta reguła jest przykładem. Możesz ją bezpiecznie usunąć.',
|
||||
'default_rule_trigger_description' => 'The Man Who Sold the World',
|
||||
'default_rule_trigger_from_account' => 'David Bowie',
|
||||
@ -210,34 +210,34 @@ return [
|
||||
'warning_no_matching_transactions' => 'No matching transactions found. Please note that for performance reasons, only the last :num_transactions transactions have been checked.',
|
||||
'warning_no_valid_triggers' => 'Nie dostarczono prawidłowych wyzwalaczy.',
|
||||
'execute_on_existing_transactions' => 'Wykonaj dla istniejących transakcji',
|
||||
'rule_group_select_transactions' => 'Execute rule group ":title" on existing transactions',
|
||||
'rule_group_select_transactions' => 'Wykonaj grupę reguł ":title" na istniejących transakcjach',
|
||||
'execute_on_existing_transactions_intro' => 'When a rule or group has been changed or added, you can execute it for existing transactions',
|
||||
'execute_on_existing_transactions_short' => 'Istniejące transakcje',
|
||||
'executed_group_on_existing_transactions' => 'Executed group ":title" for existing transactions',
|
||||
'execute_group_on_existing_transactions' => 'Execute group ":title" for existing transactions',
|
||||
'executed_group_on_existing_transactions' => 'Wykonano grupę ":title" dla istniejących transakcji',
|
||||
'execute_group_on_existing_transactions' => 'Wykonaj grupę ":title" dla istniejących transakcji',
|
||||
'include_transactions_from_accounts' => 'Include transactions from these accounts',
|
||||
'execute' => 'Wykonaj',
|
||||
|
||||
// actions and triggers
|
||||
'rule_trigger_user_action' => 'Akcją użytkownika jest ":trigger_value"',
|
||||
'rule_trigger_from_account_starts' => 'Source account starts with ":trigger_value"',
|
||||
'rule_trigger_from_account_ends' => 'Source account ends with ":trigger_value"',
|
||||
'rule_trigger_from_account_is' => 'Source account is ":trigger_value"',
|
||||
'rule_trigger_from_account_contains' => 'Source account contains ":trigger_value"',
|
||||
'rule_trigger_to_account_starts' => 'Destination account starts with ":trigger_value"',
|
||||
'rule_trigger_to_account_ends' => 'Destination account ends with ":trigger_value"',
|
||||
'rule_trigger_to_account_is' => 'Destination account is ":trigger_value"',
|
||||
'rule_trigger_to_account_contains' => 'Destination account contains ":trigger_value"',
|
||||
'rule_trigger_transaction_type' => 'Transaction is of type ":trigger_value"',
|
||||
'rule_trigger_amount_less' => 'Amount is less than :trigger_value',
|
||||
'rule_trigger_amount_exactly' => 'Amount is :trigger_value',
|
||||
'rule_trigger_from_account_starts' => 'Konto źródłowe się zaczyna od ":trigger_value"',
|
||||
'rule_trigger_from_account_ends' => 'Konto źródłowe się kończy na ":trigger_value"',
|
||||
'rule_trigger_from_account_is' => 'Kontem źródłowym jest ":trigger_value"',
|
||||
'rule_trigger_from_account_contains' => 'Konto źródłowe zawiera ":trigger_value"',
|
||||
'rule_trigger_to_account_starts' => 'Konto docelowe się zaczyna od ":trigger_value"',
|
||||
'rule_trigger_to_account_ends' => 'Konto docelowe się kończy na ":trigger_value"',
|
||||
'rule_trigger_to_account_is' => 'Kontem docelowym jest ":trigger_value"',
|
||||
'rule_trigger_to_account_contains' => 'Konto docelowe zawiera ":trigger_value"',
|
||||
'rule_trigger_transaction_type' => 'Transakcja jest typu ":trigger_value"',
|
||||
'rule_trigger_amount_less' => 'Kwota jest mniejsza niż :trigger_value',
|
||||
'rule_trigger_amount_exactly' => 'Kwota jest równa :trigger_value',
|
||||
'rule_trigger_amount_more' => 'Kwota jest większa niż :trigger_value',
|
||||
'rule_trigger_description_starts' => 'Opis się zaczyna od ":trigger_value"',
|
||||
'rule_trigger_description_ends' => 'Opis się kończy na ":trigger_value"',
|
||||
'rule_trigger_description_contains' => 'Opis zawiera ":trigger_value"',
|
||||
'rule_trigger_description_is' => 'Opis jest ":trigger_value"',
|
||||
'rule_trigger_from_account_starts_choice' => 'Konto źródłowe zaczyna się od..',
|
||||
'rule_trigger_from_account_ends_choice' => 'Konto źródłowe kończy się na..',
|
||||
'rule_trigger_from_account_starts_choice' => 'Konto źródłowe się zaczyna od..',
|
||||
'rule_trigger_from_account_ends_choice' => 'Konto źródłowe się kończy na..',
|
||||
'rule_trigger_from_account_is_choice' => 'Kontem źródłowym jest..',
|
||||
'rule_trigger_from_account_contains_choice' => 'Konto źródłowe zawiera..',
|
||||
'rule_trigger_to_account_starts_choice' => 'Konto docelowe zaczyna się od..',
|
||||
@ -262,8 +262,8 @@ return [
|
||||
'rule_action_remove_tag' => 'Usuń tag ":action_value"',
|
||||
'rule_action_remove_all_tags' => 'Usuń wszystkie tagi',
|
||||
'rule_action_set_description' => 'Ustaw opis na ":action_value"',
|
||||
'rule_action_append_description' => 'Append description with ":action_value"',
|
||||
'rule_action_prepend_description' => 'Prepend description with ":action_value"',
|
||||
'rule_action_append_description' => 'Dołącz do opisu wartość ":action_value"',
|
||||
'rule_action_prepend_description' => 'Poprzedź opis wartością ":action_value"',
|
||||
'rule_action_set_category_choice' => 'Ustaw kategorię na..',
|
||||
'rule_action_clear_category_choice' => 'Wyczyść wszystkie kategorie',
|
||||
'rule_action_set_budget_choice' => 'Ustaw budżetu na..',
|
||||
@ -272,12 +272,12 @@ return [
|
||||
'rule_action_remove_tag_choice' => 'Usuń tag..',
|
||||
'rule_action_remove_all_tags_choice' => 'Usuń wszystkie tagi',
|
||||
'rule_action_set_description_choice' => 'Ustaw opis na..',
|
||||
'rule_action_append_description_choice' => 'Append description with..',
|
||||
'rule_action_prepend_description_choice' => 'Prepend description with..',
|
||||
'rule_action_append_description_choice' => 'Dołącz do opisu..',
|
||||
'rule_action_prepend_description_choice' => 'Poprzedź opis..',
|
||||
'rule_action_set_source_account_choice' => 'Ustaw konto źródłowe na...',
|
||||
'rule_action_set_source_account' => 'Set source account to :action_value',
|
||||
'rule_action_set_source_account' => 'Ustaw konto źródłowe na :action_value',
|
||||
'rule_action_set_destination_account_choice' => 'Ustaw konto docelowe na...',
|
||||
'rule_action_set_destination_account' => 'Set destination account to :action_value',
|
||||
'rule_action_set_destination_account' => 'Ustaw konto docelowe na :action_value',
|
||||
|
||||
// tags
|
||||
'store_new_tag' => 'Zapisz nowy tag',
|
||||
@ -287,10 +287,10 @@ return [
|
||||
'location' => 'Lokalizacja',
|
||||
|
||||
// preferences
|
||||
'pref_home_screen_accounts' => 'Home screen accounts',
|
||||
'pref_home_screen_accounts_help' => 'Which accounts should be displayed on the home page?',
|
||||
'pref_home_screen_accounts' => 'Konta na stronie domowej',
|
||||
'pref_home_screen_accounts_help' => 'Które konta powinny być wyświetlane na stronie głównej?',
|
||||
'pref_view_range' => 'Pokaż zakres',
|
||||
'pref_view_range_help' => 'Some charts are automatically grouped in periods. What period would you prefer?',
|
||||
'pref_view_range_help' => 'Niektóre wykresy są automatycznie grupowane w okresach. Jaki okres wolisz?',
|
||||
'pref_1D' => 'Dzień',
|
||||
'pref_1W' => 'Tydzień',
|
||||
'pref_1M' => 'Miesiąc',
|
||||
@ -312,15 +312,15 @@ return [
|
||||
'pref_two_factor_auth_code_help' => 'Scan the QR code with an application on your phone such as Authy or Google Authenticator and enter the generated code.',
|
||||
'pref_two_factor_auth_reset_code' => 'Zresetuj kod weryfikacyjny',
|
||||
'pref_two_factor_auth_remove_code' => 'Usuń kod weryfikacyjny',
|
||||
'pref_two_factor_auth_remove_will_disable' => '(this will also disable two-factor authentication)',
|
||||
'pref_two_factor_auth_remove_will_disable' => '(to również wyłączy uwierzytelnianie dwuskładnikowe)',
|
||||
'pref_save_settings' => 'Zapisz ustawienia',
|
||||
'saved_preferences' => 'Preferencje zostały zapisane!',
|
||||
'preferences_general' => 'Ogólne',
|
||||
'preferences_frontpage' => 'Ekran główny',
|
||||
'preferences_security' => 'Bezpieczeństwo',
|
||||
'preferences_layout' => 'Układ',
|
||||
'pref_home_show_deposits' => 'Show deposits on the home screen',
|
||||
'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?',
|
||||
'pref_home_show_deposits' => 'Pokaż przychody na stronie domowej',
|
||||
'pref_home_show_deposits_info' => 'Ekran główny pokazuje już konta wydatków. Czy chcesz wyświetlać również konta przychodów?',
|
||||
'pref_home_do_show_deposits' => 'Tak, pokaż je',
|
||||
'successful_count' => 'of which :count successful',
|
||||
'transaction_page_size_title' => 'Rozmiar strony',
|
||||
@ -329,9 +329,9 @@ return [
|
||||
'between_dates' => '(:start i :end)',
|
||||
'pref_optional_fields_transaction' => 'Opcjonalne pola dla transakcji',
|
||||
'pref_optional_fields_transaction_help' => 'By default not all fields are enabled when creating a new transaction (because of the clutter). Below, you can enable these fields if you think they could be useful for you. Of course, any field that is disabled, but already filled in, will be visible regardless of the setting.',
|
||||
'optional_tj_date_fields' => 'Date fields',
|
||||
'optional_tj_business_fields' => 'Business fields',
|
||||
'optional_tj_attachment_fields' => 'Attachment fields',
|
||||
'optional_tj_date_fields' => 'Pola daty',
|
||||
'optional_tj_business_fields' => 'Pola biznesowe',
|
||||
'optional_tj_attachment_fields' => 'Pola załączników',
|
||||
'pref_optional_tj_interest_date' => 'Interest date',
|
||||
'pref_optional_tj_book_date' => 'Data księgowania',
|
||||
'pref_optional_tj_process_date' => 'Processing date',
|
||||
@ -354,12 +354,12 @@ return [
|
||||
'new_password' => 'Nowe Hasło',
|
||||
'new_password_again' => 'Nowe hasło (ponownie)',
|
||||
'delete_your_account' => 'Usuń swoje konto',
|
||||
'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, <em>anything</em> you might have saved into Firefly III. It\'ll be GONE.',
|
||||
'delete_your_account_password' => 'Enter your password to continue.',
|
||||
'delete_your_account_help' => 'Usunięcie twojego konta usunie również wszystkie konta, transakcje, <em>wszystko</em> co mogłeś mieć zapisane w Firefly III. Po prostu ZNIKNIE.',
|
||||
'delete_your_account_password' => 'Wprowadź hasło aby kontynuować.',
|
||||
'password' => 'Hasło',
|
||||
'are_you_sure' => 'Jesteś pewny? Nie możesz tego cofnąć.',
|
||||
'delete_account_button' => 'USUŃ swoje konto',
|
||||
'invalid_current_password' => 'Invalid current password!',
|
||||
'invalid_current_password' => 'Nieprawidłowe hasło bieżące!',
|
||||
'password_changed' => 'Hasło zostało zmienione!',
|
||||
'should_change' => 'Chodzi o to, aby zmienić swoje hasło.',
|
||||
'invalid_password' => 'Nieprawidłowe hasło!',
|
||||
@ -390,17 +390,17 @@ return [
|
||||
'title_transfers' => 'Transfery',
|
||||
|
||||
// convert stuff:
|
||||
'convert_is_already_type_Withdrawal' => 'This transaction is already a withdrawal',
|
||||
'convert_is_already_type_Deposit' => 'This transaction is already a deposit',
|
||||
'convert_is_already_type_Transfer' => 'This transaction is already a transfer',
|
||||
'convert_is_already_type_Withdrawal' => 'Ta transakcja jest już wypłatą',
|
||||
'convert_is_already_type_Deposit' => 'Ta transakcja jest już wpłatą',
|
||||
'convert_is_already_type_Transfer' => 'Ta transakcja jest już transferem',
|
||||
'convert_to_Withdrawal' => 'Convert ":description" to a withdrawal',
|
||||
'convert_to_Deposit' => 'Convert ":description" to a deposit',
|
||||
'convert_to_Transfer' => 'Convert ":description" to a transfer',
|
||||
'convert_options_WithdrawalDeposit' => 'Convert a withdrawal into a deposit',
|
||||
'convert_options_WithdrawalTransfer' => 'Convert a withdrawal into a transfer',
|
||||
'convert_options_DepositTransfer' => 'Convert a deposit into a transfer',
|
||||
'convert_options_DepositWithdrawal' => 'Convert a deposit into a withdrawal',
|
||||
'convert_options_TransferWithdrawal' => 'Convert a transfer into a withdrawal',
|
||||
'convert_options_WithdrawalDeposit' => 'Konwertuj wypłatę na wpłatę',
|
||||
'convert_options_WithdrawalTransfer' => 'Konwertuj wypłatę na transfer',
|
||||
'convert_options_DepositTransfer' => 'Konwertuj wpłatę na transfer',
|
||||
'convert_options_DepositWithdrawal' => 'Konwertuj wpłatę na wypłatę',
|
||||
'convert_options_TransferWithdrawal' => 'Konwertuj transfer na wypłatę',
|
||||
'convert_options_TransferDeposit' => 'Convert a transfer into a deposit',
|
||||
'transaction_journal_convert_options' => 'Konwertuj tę transakcję',
|
||||
'convert_Withdrawal_to_deposit' => 'Convert this withdrawal to a deposit',
|
||||
@ -454,8 +454,8 @@ return [
|
||||
'to_get_started' => 'Aby rozpocząć pracę z Firefly, wprowadź nazwę twojego banku oraz saldo konta bankowego:',
|
||||
'savings_balance_text' => 'If you have a savings account, please enter the current balance of your savings account:',
|
||||
'cc_balance_text' => 'If you have a credit card, please enter your credit card\'s limit.',
|
||||
'stored_new_account_new_user' => 'Yay! Your new account has been stored.',
|
||||
'stored_new_accounts_new_user' => 'Yay! Your new accounts have been stored.',
|
||||
'stored_new_account_new_user' => 'Yay! Twoje nowe konto zostało zachowane.',
|
||||
'stored_new_accounts_new_user' => 'Yay! Twoje nowe konta zostały zapisane.',
|
||||
|
||||
// forms:
|
||||
'mandatoryFields' => 'Pola wymagane',
|
||||
@ -466,13 +466,13 @@ return [
|
||||
'create_new_budget' => 'Utwórz nowy budżet',
|
||||
'store_new_budget' => 'Zapisz nowy budżet',
|
||||
'stored_new_budget' => 'Zapisano nowy budżet ":name"',
|
||||
'available_between' => 'Available between :start and :end',
|
||||
'available_between' => 'Dostępne od :start i :end',
|
||||
'transactionsWithoutBudget' => 'Wydatki bez budżetu',
|
||||
'transactions_no_budget' => 'Expenses without budget between :start and :end',
|
||||
'spent_between' => 'Spent between :start and :end',
|
||||
'transactions_no_budget' => 'Wydatki bez budżetu między :start i :end',
|
||||
'spent_between' => 'Wydano między :start i :end',
|
||||
'createBudget' => 'Nowy budżet',
|
||||
'inactiveBudgets' => 'Nieaktywne budżety',
|
||||
'without_budget_between' => 'Transactions without a budget between :start and :end',
|
||||
'without_budget_between' => 'Transakcje bez budżetu między :start i :end',
|
||||
'budget_in_month' => ':name w :month',
|
||||
'delete_budget' => 'Usuń budżet ":name"',
|
||||
'deleted_budget' => 'Usunięto budżet ":name"',
|
||||
@ -501,27 +501,27 @@ return [
|
||||
'stored_new_bill' => 'Zapisano nowy rachunek ":name"',
|
||||
'cannot_scan_inactive_bill' => 'Nieaktywne rachunki nie mogą być zeskanowane.',
|
||||
'rescanned_bill' => 'Zeskanowano wszystko.',
|
||||
'average_bill_amount_year' => 'Average bill amount (:year)',
|
||||
'average_bill_amount_overall' => 'Average bill amount (overall)',
|
||||
'average_bill_amount_year' => 'Średnia kwota rachunku (:year)',
|
||||
'average_bill_amount_overall' => 'Średnia kwota rachunku (ogólnie)',
|
||||
'not_or_not_yet' => 'Not (yet)',
|
||||
'not_expected_period' => 'Not expected this period',
|
||||
// accounts:
|
||||
'details_for_asset' => 'Szczegóły konta aktywów ":name"',
|
||||
'details_for_expense' => 'Szczegóły konta wydatków ":name"',
|
||||
'details_for_revenue' => 'Szczegóły konta przychodów ":name"',
|
||||
'details_for_cash' => 'Details for cash account ":name"',
|
||||
'details_for_cash' => 'Szczegóły konta gotówkowego ":name"',
|
||||
'store_new_asset_account' => 'Zapisz nowe konto aktywów',
|
||||
'store_new_expense_account' => 'Zapisz nowe konto wydatków',
|
||||
'store_new_revenue_account' => 'Zapisz nowe konto przychodów',
|
||||
'edit_asset_account' => 'Edit asset account ":name"',
|
||||
'edit_expense_account' => 'Edit expense account ":name"',
|
||||
'edit_revenue_account' => 'Edit revenue account ":name"',
|
||||
'delete_asset_account' => 'Delete asset account ":name"',
|
||||
'delete_expense_account' => 'Delete expense account ":name"',
|
||||
'delete_revenue_account' => 'Delete revenue account ":name"',
|
||||
'asset_deleted' => 'Successfully deleted asset account ":name"',
|
||||
'expense_deleted' => 'Successfully deleted expense account ":name"',
|
||||
'revenue_deleted' => 'Successfully deleted revenue account ":name"',
|
||||
'edit_asset_account' => 'Modyfikuj konto aktywów ":name"',
|
||||
'edit_expense_account' => 'Modyfikuj konto wydatków ":name"',
|
||||
'edit_revenue_account' => 'Modyfikuj konto przychodów ":name"',
|
||||
'delete_asset_account' => 'Usuń konto aktywów ":name"',
|
||||
'delete_expense_account' => 'Usuń konto wydatków ":name"',
|
||||
'delete_revenue_account' => 'Usuń konto przychodów ":name"',
|
||||
'asset_deleted' => 'Pomyślnie usunięto konto aktywów ":name"',
|
||||
'expense_deleted' => 'Pomyślnie usunięto konto wydatków ":name"',
|
||||
'revenue_deleted' => 'Pomyślnie usunięto konto przychodów ":name"',
|
||||
'update_asset_account' => 'Aktualizuj konto aktywów',
|
||||
'update_expense_account' => 'Aktualizuj konto wydatków',
|
||||
'update_revenue_account' => 'Aktualizuj konto przychodów',
|
||||
@ -535,8 +535,8 @@ return [
|
||||
'Cash account' => 'Konto gotówkowe',
|
||||
'account_type' => 'Typ konta',
|
||||
'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:',
|
||||
'stored_new_account' => 'New account ":name" stored!',
|
||||
'updated_account' => 'Updated account ":name"',
|
||||
'stored_new_account' => 'Nowe konto ":name" zostało zapisane!',
|
||||
'updated_account' => 'Zaktualizowano konto ":name"',
|
||||
'credit_card_options' => 'Opcje karty kredytowej',
|
||||
'no_transactions_account' => 'Brak transakcji (w tym okresie) na koncie aktywów ":name".',
|
||||
'no_data_for_chart' => 'Nie ma wystarczająco dużo informacji (póki co), aby wygenerować ten wykres.',
|
||||
@ -595,7 +595,7 @@ return [
|
||||
'budgetsAndSpending' => 'Budżety i wydatki',
|
||||
'savings' => 'Oszczędności',
|
||||
'markAsSavingsToContinue' => 'Mark your asset accounts as "Savings account" to fill this panel',
|
||||
'createPiggyToContinue' => 'Create piggy banks to fill this panel.',
|
||||
'createPiggyToContinue' => 'Utwórz skarbonki aby wypełnić ten panel.',
|
||||
'newWithdrawal' => 'Nowy wydatek',
|
||||
'newDeposit' => 'Nowa wpłata',
|
||||
'newTransfer' => 'Nowy transfer',
|
||||
@ -617,33 +617,33 @@ return [
|
||||
'Asset account' => 'Konto aktywów',
|
||||
'Default account' => 'Konto aktywów',
|
||||
'Expense account' => 'Konto wydatków',
|
||||
'Revenue account' => 'Revenue account',
|
||||
'Revenue account' => 'Konto przychodów',
|
||||
'Initial balance account' => 'Initial balance account',
|
||||
'budgets' => 'Budgets',
|
||||
'tags' => 'Tags',
|
||||
'reports' => 'Reports',
|
||||
'transactions' => 'Transactions',
|
||||
'expenses' => 'Expenses',
|
||||
'income' => 'Revenue / income',
|
||||
'transfers' => 'Transfers',
|
||||
'moneyManagement' => 'Money management',
|
||||
'piggyBanks' => 'Piggy banks',
|
||||
'bills' => 'Bills',
|
||||
'withdrawal' => 'Withdrawal',
|
||||
'deposit' => 'Deposit',
|
||||
'account' => 'Account',
|
||||
'budgets' => 'Budżety',
|
||||
'tags' => 'Tagi',
|
||||
'reports' => 'Raporty',
|
||||
'transactions' => 'Transakcje',
|
||||
'expenses' => 'Wydatki',
|
||||
'income' => 'Przychód / dochód',
|
||||
'transfers' => 'Transfery',
|
||||
'moneyManagement' => 'Zarządzanie pieniędzmi',
|
||||
'piggyBanks' => 'Skarbonki',
|
||||
'bills' => 'Rachunki',
|
||||
'withdrawal' => 'Wypłata',
|
||||
'deposit' => 'Wpłata',
|
||||
'account' => 'Konto',
|
||||
'transfer' => 'Transfer',
|
||||
'Withdrawal' => 'Withdrawal',
|
||||
'Deposit' => 'Deposit',
|
||||
'Withdrawal' => 'Wypłata',
|
||||
'Deposit' => 'Wpłata',
|
||||
'Transfer' => 'Transfer',
|
||||
'bill' => 'Bill',
|
||||
'yes' => 'Yes',
|
||||
'no' => 'No',
|
||||
'amount' => 'Amount',
|
||||
'overview' => 'Overview',
|
||||
'bill' => 'Rachunek',
|
||||
'yes' => 'Tak',
|
||||
'no' => 'Nie',
|
||||
'amount' => 'Kwota',
|
||||
'overview' => 'Przegląd',
|
||||
'saveOnAccount' => 'Save on account',
|
||||
'unknown' => 'Unknown',
|
||||
'daily' => 'Daily',
|
||||
'unknown' => 'Nieznane',
|
||||
'daily' => 'Dziennie',
|
||||
'monthly' => 'Miesięcznie',
|
||||
'profile' => 'Profil',
|
||||
'errors' => 'Błędy',
|
||||
@ -694,37 +694,37 @@ return [
|
||||
'average_of_year' => 'Average of year',
|
||||
'average_of_years' => 'Average of years',
|
||||
'categories_earned_in_year' => 'Categories (by earnings)',
|
||||
'categories_spent_in_year' => 'Categories (by spendings)',
|
||||
'categories_spent_in_year' => 'Kategorie (wg wydatków)',
|
||||
'report_type' => 'Typ raportu',
|
||||
'report_type_default' => 'Default financial report',
|
||||
'report_type_audit' => 'Transaction history overview (audit)',
|
||||
'report_type_category' => 'Category report',
|
||||
'report_type_budget' => 'Budget report',
|
||||
'report_type_meta-history' => 'Categories, budgets and bills overview',
|
||||
'report_type_default' => 'Domyślny raport finansowy',
|
||||
'report_type_audit' => 'Przegląd historii transakcji (audyt)',
|
||||
'report_type_category' => 'Raport kategorii',
|
||||
'report_type_budget' => 'Raport budżetów',
|
||||
'report_type_meta-history' => 'Przegląd kategorii, budżetów i rachunków',
|
||||
'more_info_help' => 'More information about these types of reports can be found in the help pages. Press the (?) icon in the top right corner.',
|
||||
'report_included_accounts' => 'Included accounts',
|
||||
'report_date_range' => 'Date range',
|
||||
'report_date_range' => 'Zakres dat',
|
||||
'report_preset_ranges' => 'Pre-set ranges',
|
||||
'shared' => 'Shared',
|
||||
'shared' => 'Udostępnione',
|
||||
'fiscal_year' => 'Fiscal year',
|
||||
'income_entry' => 'Income from account ":name" between :start and :end',
|
||||
'expense_entry' => 'Expenses to account ":name" between :start and :end',
|
||||
'category_entry' => 'Expenses in category ":name" between :start and :end',
|
||||
'budget_spent_amount' => 'Expenses in budget ":budget" between :start and :end',
|
||||
'budget_spent_amount' => 'Wydatki w budżecie ":budget" między :start i :end',
|
||||
'balance_amount' => 'Expenses in budget ":budget" paid from account ":account" between :start and :end',
|
||||
'no_audit_activity' => 'No activity was recorded on account <a href=":url" title=":account_name">:account_name</a> between :start and :end.',
|
||||
'audit_end_balance' => 'Account balance of <a href=":url" title=":account_name">:account_name</a> at the end of :end was: :balance',
|
||||
'reports_extra_options' => 'Extra options',
|
||||
'report_has_no_extra_options' => 'This report has no extra options',
|
||||
'reports_submit' => 'View report',
|
||||
'end_after_start_date' => 'End date of report must be after start date.',
|
||||
'reports_extra_options' => 'Dodatkowe opcje',
|
||||
'report_has_no_extra_options' => 'Ten raport nie ma dodatkowych opcji',
|
||||
'reports_submit' => 'Zobacz raport',
|
||||
'end_after_start_date' => 'Data zakończenia raportu musi być po dacie rozpoczęcia.',
|
||||
'select_category' => 'Wybierz jedną lub więcej kategorii.',
|
||||
'select_budget' => 'Wybierz jeden lub więcej budżetów.',
|
||||
'income_per_category' => 'Income per category',
|
||||
'expense_per_category' => 'Expense per category',
|
||||
'expense_per_budget' => 'Expense per budget',
|
||||
'income_per_account' => 'Income per account',
|
||||
'expense_per_account' => 'Expense per account',
|
||||
'income_per_category' => 'Dochód wg kategorii',
|
||||
'expense_per_category' => 'Wydatek wg kategorii',
|
||||
'expense_per_budget' => 'Wydatek wg budżetu',
|
||||
'income_per_account' => 'Dochód wg konta',
|
||||
'expense_per_account' => 'Wydatek wg konta',
|
||||
'include_expense_not_in_budget' => 'Included expenses not in the selected budget(s)',
|
||||
'include_expense_not_in_account' => 'Included expenses not in the selected account(s)',
|
||||
'include_expense_not_in_category' => 'Included expenses not in the selected category(ies)',
|
||||
@ -748,15 +748,15 @@ return [
|
||||
'dayOfMonth' => 'Dzień miesiąca',
|
||||
'month' => 'Miesiąc',
|
||||
'budget' => 'Budżet',
|
||||
'spent' => 'Spent',
|
||||
'spent_in_budget' => 'Spent in budget',
|
||||
'spent' => 'Wydano',
|
||||
'spent_in_budget' => 'Wydano w budżecie',
|
||||
'left_to_spend' => 'Pozostało do wydania',
|
||||
'earned' => 'Zarobione',
|
||||
'overspent' => 'Overspent',
|
||||
'left' => 'Left',
|
||||
'no_budget' => '(no budget)',
|
||||
'max-amount' => 'Maximum amount',
|
||||
'min-amount' => 'Minumum amount',
|
||||
'overspent' => 'Przepłacono',
|
||||
'left' => 'Pozostało',
|
||||
'no_budget' => '(bez budżetu)',
|
||||
'max-amount' => 'Maksymalna kwota',
|
||||
'min-amount' => 'Minimalna kwota',
|
||||
'journal-amount' => 'Current bill entry',
|
||||
'name' => 'Nazwa',
|
||||
'date' => 'Data',
|
||||
@ -786,14 +786,14 @@ return [
|
||||
'remove_money_from_piggy_title' => 'Usuń pieniądze ze skarbonki ":name"',
|
||||
'add' => 'Dodaj',
|
||||
|
||||
'remove' => 'Remove',
|
||||
'remove' => 'Usuń',
|
||||
'max_amount_add' => 'The maximum amount you can add is',
|
||||
'max_amount_remove' => 'The maximum amount you can remove is',
|
||||
'update_piggy_button' => 'Update piggy bank',
|
||||
'update_piggy_title' => 'Update piggy bank ":name"',
|
||||
'updated_piggy_bank' => 'Updated piggy bank ":name"',
|
||||
'details' => 'Szczegóły',
|
||||
'events' => 'Events',
|
||||
'events' => 'Zdarzenia',
|
||||
'target_amount' => 'Target amount',
|
||||
'start_date' => 'Start date',
|
||||
'target_date' => 'Target date',
|
||||
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
@ -877,13 +878,13 @@ return [
|
||||
'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.',
|
||||
'store_splitted_withdrawal' => 'Zachowaj podzieloną wypłatę',
|
||||
'update_splitted_withdrawal' => 'Aktualizuj podzieloną wypłatę',
|
||||
'split_title_deposit' => 'Podziel swój nowy depozyt',
|
||||
'split_title_deposit' => 'Podziel swoją nową wpłatę',
|
||||
'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.',
|
||||
'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.',
|
||||
'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.',
|
||||
'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.',
|
||||
'store_splitted_deposit' => 'Zachowaj podzielony depozyt',
|
||||
'split_title_transfer' => 'Podzielić swój nowy transfer',
|
||||
'store_splitted_deposit' => 'Zachowaj podzieloną wpłatę',
|
||||
'split_title_transfer' => 'Podziel swój nowy transfer',
|
||||
'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.',
|
||||
'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.',
|
||||
'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.',
|
||||
@ -894,7 +895,7 @@ return [
|
||||
'split-new-transaction' => 'Podziel nową transakcję',
|
||||
'do_split' => 'Podziel',
|
||||
'split_this_withdrawal' => 'Podziel tą wypłatę',
|
||||
'split_this_deposit' => 'Podziel ten depozyt',
|
||||
'split_this_deposit' => 'Podziel tą wpłatę',
|
||||
'split_this_transfer' => 'Podziel ten transfer',
|
||||
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
|
||||
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
|
||||
|
@ -16,7 +16,7 @@ return [
|
||||
'bank_balance' => 'Saldo',
|
||||
'savings_balance' => 'Saldo konta oszczędnościowego',
|
||||
'credit_card_limit' => 'Limit karty kredytowej',
|
||||
'automatch' => 'Match automatically',
|
||||
'automatch' => 'Dopasuj automatycznie',
|
||||
'skip' => 'Pomiń',
|
||||
'name' => 'Nazwa',
|
||||
'active' => 'Aktywny',
|
||||
@ -36,9 +36,9 @@ return [
|
||||
'account_to_id' => 'Na konto',
|
||||
'source_account' => 'Konto źródłowe',
|
||||
'destination_account' => 'Konto docelowe',
|
||||
'journal_destination_account_id' => 'Asset account (destination)',
|
||||
'asset_destination_account' => 'Asset account (destination)',
|
||||
'asset_source_account' => 'Asset account (source)',
|
||||
'journal_destination_account_id' => 'Konto aktywów (przeznaczenie)',
|
||||
'asset_destination_account' => 'Konto aktywów (przeznaczenie)',
|
||||
'asset_source_account' => 'Konto aktywów (źródło)',
|
||||
'journal_description' => 'Opis',
|
||||
'note' => 'Notatki',
|
||||
'split_journal' => 'Podziel tę transakcję',
|
||||
@ -71,9 +71,9 @@ return [
|
||||
'destination_account_asset' => 'Destination account (asset account)',
|
||||
'source_account_revenue' => 'Source account (revenue account)',
|
||||
'type' => 'Typ',
|
||||
'convert_Withdrawal' => 'Convert withdrawal',
|
||||
'convert_Deposit' => 'Convert deposit',
|
||||
'convert_Transfer' => 'Convert transfer',
|
||||
'convert_Withdrawal' => 'Konwertuj wypłatę',
|
||||
'convert_Deposit' => 'Konwertuj wpłatę',
|
||||
'convert_Transfer' => 'Konwertuj transfer',
|
||||
|
||||
|
||||
'amount' => 'Kwota',
|
||||
@ -85,9 +85,9 @@ return [
|
||||
'tags' => 'Tagi',
|
||||
'deletePermanently' => 'Usuń trwale',
|
||||
'cancel' => 'Anuluj',
|
||||
'targetdate' => 'Target date',
|
||||
'targetdate' => 'Data docelowa',
|
||||
'tag' => 'Tag',
|
||||
'under' => 'Under',
|
||||
'under' => 'Poniżej',
|
||||
'symbol' => 'Symbol',
|
||||
'code' => 'Kod',
|
||||
'iban' => 'IBAN',
|
||||
@ -117,13 +117,13 @@ return [
|
||||
'export_format' => 'Format pliku',
|
||||
'include_attachments' => 'Uwzględnij dołączone załączniki',
|
||||
'include_old_uploads' => 'Dołącz zaimportowane dane',
|
||||
'accounts' => 'Export transactions from these accounts',
|
||||
'accounts' => 'Eksportuj transakcje z tych kont',
|
||||
'delete_account' => 'Usuń konto ":name"',
|
||||
'delete_bill' => 'Usuń rachunek ":name"',
|
||||
'delete_budget' => 'Usuń budżet ":name"',
|
||||
'delete_category' => 'Usuń kategorię ":name"',
|
||||
'delete_currency' => 'Usuń walutę ":name"',
|
||||
'delete_journal' => 'Delete transaction with description ":description"',
|
||||
'delete_journal' => 'Usuń transakcję z opisem ":description"',
|
||||
'delete_attachment' => 'Usuń załącznik ":name"',
|
||||
'delete_rule' => 'Usuń regułę ":title"',
|
||||
'delete_rule_group' => 'Usuń grupę reguł ":title"',
|
||||
|
@ -15,5 +15,5 @@ return [
|
||||
'token' => 'Ten token do resetowania hasła jest nieprawidłowy.',
|
||||
'sent' => 'Wysłaliśmy link do resetowania hasła na twój adres email!',
|
||||
'reset' => 'Twoje hasło zostało zresetowane!',
|
||||
'blocked' => 'Nice try though.',
|
||||
'blocked' => 'Przynajmniej próbowałeś.',
|
||||
];
|
@ -13,16 +13,17 @@ return [
|
||||
'iban' => 'To nie jest prawidłowy IBAN.',
|
||||
'unique_account_number_for_user' => 'Wygląda na to, że ten numer konta jest już w użyciu.',
|
||||
'deleted_user' => 'Ze względu na zabezpieczenia nie możesz się zarejestrować używając tego adresu e-mail.',
|
||||
'rule_trigger_value' => 'This value is invalid for the selected trigger.',
|
||||
'rule_trigger_value' => 'Ta wartość jest nieprawidłowa dla wybranego wyzwalacza.',
|
||||
'rule_action_value' => 'Ta wartość jest nieprawidłowa dla wybranej akcji.',
|
||||
'invalid_domain' => 'Ze względu na zabezpieczenia nie możesz się zarejestrować z tej domeny.',
|
||||
'file_already_attached' => 'Przesłany plik ":name" jest już dołączony do tego obiektu.',
|
||||
'file_attached' => 'Pomyślnie wgrano plik ":name".',
|
||||
'file_invalid_mime' => 'File ":name" is of type ":mime" which is not accepted as a new upload.',
|
||||
'file_invalid_mime' => 'Plik ":name" jest typu ":mime", który nie jest akceptowany jako nowy plik do przekazania.',
|
||||
'file_too_large' => 'Plik ": nazwa" jest zbyt duży.',
|
||||
'belongs_to_user' => 'Wartość :attribute jest nieznana',
|
||||
'accepted' => ':attribute musi zostać zaakceptowany.',
|
||||
'bic' => 'To nie jest prawidłowy BIC.',
|
||||
'more' => ':attribute musi być większy od zera.',
|
||||
'active_url' => ':attribute nie jest prawidłowym adresem URL.',
|
||||
'after' => ':attribute musi być datą późniejszą od :date.',
|
||||
'alpha' => ':attribute może zawierać tylko litery.',
|
||||
|
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Adicionar :amount para encher este cofrinho em :date',
|
||||
'delete_piggy_bank' => 'Apagar cofrinho ":name"',
|
||||
'cannot_add_amount_piggy' => 'Não foi possível adicionar :amount a ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Apagar cofrinho ":name"',
|
||||
'added_amount_to_piggy' => 'Adicionado :amount de ":name"',
|
||||
'removed_amount_from_piggy' => 'Removido :amount de ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'O valor de :attribute é desconhecido',
|
||||
'accepted' => 'O campo :attribute deve ser aceito.',
|
||||
'bic' => 'Este não é um BIC válido.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => 'O campo :attribute não contém um URL válido.',
|
||||
'after' => 'O campo :attribute deverá conter uma data posterior a :date.',
|
||||
'alpha' => 'O campo :attribute deverá conter apenas letras.',
|
||||
|
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'The value of :attribute is unknown',
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'bic' => 'This is not a valid BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
|
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => 'The value of :attribute is unknown',
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'bic' => 'This is not a valid BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
|
@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
@ -23,6 +23,7 @@ return [
|
||||
'belongs_to_user' => ':attribute 的值是未知的。',
|
||||
'accepted' => ':attribute 必須被接受。',
|
||||
'bic' => 'This is not a valid BIC.',
|
||||
'more' => ':attribute must be larger than zero.',
|
||||
'active_url' => ':attribute 不是有效的URL。',
|
||||
'after' => ':attribute 必須是一個在 :date 之後的日期。',
|
||||
'alpha' => ':attribute 只允許包含字母。',
|
||||
|
@ -33,7 +33,7 @@
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if account.transactions|length > 0 %}
|
||||
{% if account.transactions.count > 0 %}
|
||||
<p class="text-success">
|
||||
{{ 'save_transactions_by_moving'|_ }}
|
||||
</p>
|
||||
|
@ -67,6 +67,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if entries %}
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
|
||||
<p class="small text-center"><a href="{{ route('accounts.show.all',[account.id]) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="{% if entries %}col-lg-10 col-md-10 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
|
||||
@ -96,22 +103,23 @@
|
||||
</div>
|
||||
{% if entries %}
|
||||
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
|
||||
|
||||
{% for entry in entries %}
|
||||
{% if entry[2] != 0 or entry[3] != 0 %}
|
||||
<div class="box">
|
||||
{% if (entry[2] != 0 or entry[3] != 0) or (accountType == 'Asset account') %}
|
||||
<div class="box {% if entry[4] == start %}box-solid box-primary{% endif %}">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><a href="{{ route('accounts.show.date',[account.id,entry[0]]) }}">{{ entry[1] }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
{% if entry[2] != 0 %}
|
||||
{% if entry[2] != 0 or (accountType == 'Asset account') %}
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'spent'|_ }}</td>
|
||||
<td style="text-align: right;">{{ entry[2]|formatAmount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if entry[3] != 0 %}
|
||||
{% if entry[3] != 0 or (accountType == 'Asset account') %}
|
||||
<tr>
|
||||
<td style="width: 33%;">{{ 'earned'|_ }}</td>
|
||||
<td style="text-align: right;">{{ entry[3]|formatAmount }}</td>
|
||||
@ -121,8 +129,8 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
<p class="small text-center"><a href="{{ route('accounts.show.all',[account.id]) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -24,8 +24,8 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if bill.transactionjournals|length > 0 %}
|
||||
{{ Lang.choice('form.bill_keep_transactions', bill.transactionjournals|length,{count: bill.transactionjournals|length}) }}
|
||||
{% if bill.transactionjournals.count > 0 %}
|
||||
{{ Lang.choice('form.bill_keep_transactions', bill.transactionjournals.count,{count: bill.transactionjournals.count}) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -25,8 +25,8 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if budget.transactionjournals|length > 0 %}
|
||||
{{ Lang.choice('form.budget_keep_transactions', budget.transactionjournals|length, {count: budget.transactionjournals|length}) }}
|
||||
{% if budget.transactionjournals.count > 0 %}
|
||||
{{ Lang.choice('form.budget_keep_transactions', budget.transactionjournals.count, {count: budget.transactionjournals.count }) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-md-9 col-sm-7">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'overview'|_ }}</h3>
|
||||
@ -26,6 +26,17 @@
|
||||
<canvas id="budgetOverview" style="width:100%;" height="400"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-9 col-lg-3 col-md-offset-9 col-md-3 col-sm-12 col-xs-12">
|
||||
<p class="small text-center"><a href="{{ route('budgets.show',budget.id) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
@ -36,13 +47,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-5">
|
||||
{% if limits|length == 1 %}
|
||||
<p class="small text-center"><a href="{{ route('budgets.show',budget.id) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
|
||||
{% for limit in limits %}
|
||||
<div class="box">
|
||||
<div class="box {% if limit.start_date == budgetLimit.start_date %}box-primary box-solid{% endif %}">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><a
|
||||
href="{{ route('budgets.show.limit',[budget.id,limit.id]) }}">
|
||||
@ -51,44 +58,42 @@
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
{{ 'amount'|_ }}: {{ limit.amount|formatAmount }}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
{{ 'spent'|_ }}: {{ limit.spent|formatAmount }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
{% set overspent = limit.amount + limit.spent < 0 %}
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'amount'|_ }}</td>
|
||||
<td>{{ limit.amount|formatAmount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'spent'|_ }}</td>
|
||||
<td>{{ limit.spent|formatAmount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{% set overspent = limit.amount + limit.spent < 0 %}
|
||||
|
||||
{% if overspent %}
|
||||
{% set pct = (limit.spent != 0 ? (limit.amount / (limit.spent*-1))*100 : 0) %} <!-- must have -1 here -->
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
||||
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="{{ (100-pct)|round }}"
|
||||
aria-valuemin="0" aria-valuemax="100" style="width: {{ (100-pct)|round }}%;"></div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% set pct = (limit.amount != 0 ? (((limit.spent*-1) / limit.amount)*100) : 0) %} <!-- must have -1 here -->
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
||||
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if overspent %}
|
||||
{% set pct = (limit.spent != 0 ? (limit.amount / (limit.spent*-1))*100 : 0) %} <!-- must have -1 here -->
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
||||
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="{{ (100-pct)|round }}"
|
||||
aria-valuemin="0" aria-valuemax="100" style="width: {{ (100-pct)|round }}%;"></div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% set pct = (limit.amount != 0 ? (((limit.spent*-1) / limit.amount)*100) : 0) %} <!-- must have -1 here -->
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
||||
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if limits|length == 1 %}
|
||||
<p class="small text-center"><a href="{{ route('budgets.show',budget.id) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
<p class="small text-center"><a href="{{ route('budgets.show',budget.id) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if category.transactionjournals|length > 0 %}
|
||||
{{ Lang.choice('form.category_keep_transactions', category.transactionjournals|length, {count: category.transactionjournals|length}) }}
|
||||
{% if category.transactionjournals.count > 0 %}
|
||||
{{ Lang.choice('form.category_keep_transactions', category.transactionjournals.count, {count: category.transactionjournals.count }) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% if entries %}
|
||||
{% if method == 'default' %}
|
||||
{# both charts #}
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="box">
|
||||
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not entries and not showAll %}
|
||||
{% if method == 'date' %}
|
||||
{# single chart #}
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
@ -42,7 +42,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not entries and showAll %}
|
||||
{% if method == 'all' %}
|
||||
{# all chart #}
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
@ -56,6 +56,14 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if entries %}
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
|
||||
<p class="small text-center"><a href="{{ route('categories.show.all',[category.id]) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="{% if entries %}col-lg-10 col-md-8 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}">
|
||||
|
||||
@ -87,7 +95,7 @@
|
||||
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
|
||||
{% for entry in entries %}
|
||||
{% if entry[2] != 0 or entry[3] != 0 %}
|
||||
<div class="box">
|
||||
<div class="box {% if entry[4] == start %}box-solid box-primary{% endif %}">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><a href="{{ route('categories.show.date',[category.id,entry[0]]) }}">{{ entry[1] }}</a>
|
||||
</h3>
|
||||
|
@ -118,7 +118,7 @@
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
{% if IS_DEMO_SITE %}
|
||||
<div class="row">
|
||||
<div class="row no-print">
|
||||
<div class="col-lg-12">
|
||||
<p class="well">
|
||||
{% include ['demo.' ~ Route.getCurrentRoute.getName, 'demo.no-demo-text'] %}
|
||||
@ -208,6 +208,7 @@
|
||||
var noDataForChart = '{{ trans('firefly.no_data_for_chart')|escape }}';
|
||||
var showFullList = '{{ trans('firefly.show_full_list') }}';
|
||||
var showOnlyTop = '{{ trans('firefly.show_only_top',{number:listLength}) }}';
|
||||
var accountingConfig = {{ accountingConfig|json_encode|raw }};
|
||||
|
||||
|
||||
</script>
|
||||
|
@ -7,7 +7,7 @@
|
||||
{% block content %}
|
||||
|
||||
<!-- options block -->
|
||||
<div class="row">
|
||||
<div class="row no-print">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
|
@ -20,12 +20,16 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 loading">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'accountBalances'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="accountReport">
|
||||
<div class="box-body table-responsive no-padding" id="accountReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -36,7 +40,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="incomeReport">
|
||||
<div class="box-body table-responsive no-padding" id="incomeReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -45,7 +53,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expenses'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="expenseReport">
|
||||
<div class="box-body table-responsive no-padding" id="expenseReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,14 +68,15 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="incomeVsExpenseReport">
|
||||
<div class="box-body table-responsive no-padding" id="incomeVsExpenseReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
{% include 'reports/partials/tags' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-8 col-sm-12">
|
||||
@ -72,7 +85,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'budgets'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="budgetReport">
|
||||
<div class="box-body table-responsive no-padding" id="budgetReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -84,7 +101,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'categories'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="categoryReport">
|
||||
<div class="box-body table-responsive no-padding" id="categoryReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -100,7 +121,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'budgets'|_ }} ({{ 'splitByAccount'|_|lower }})</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="balanceReport">
|
||||
<div class="box-body table-responsive no-padding" id="balanceReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -31,12 +31,16 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 loading">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'accountBalances'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="accountReport">
|
||||
<div class="box-body table-responsive no-padding" id="accountReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -45,7 +49,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="incomeReport">
|
||||
<div class="box-body table-responsive no-padding" id="incomeReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,7 +62,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expenses'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="expenseReport">
|
||||
<div class="box-body table-responsive no-padding" id="expenseReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -65,7 +77,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="incomeVsExpenseReport">
|
||||
<div class="box-body table-responsive no-padding" id="incomeVsExpenseReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -92,7 +108,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'budgets'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive loading" id="budgetPeriodReport">
|
||||
<div class="box-body no-padding table-responsive" id="budgetPeriodReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -108,7 +128,6 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas height="400" id="budget_chart" style="width:100%;height:400px;"></canvas>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -121,7 +140,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'categories'|_ }} ({{ 'expenses'|_ }})</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive loading" id="categoryExpense">
|
||||
<div class="box-body no-padding table-responsive" id="categoryExpense">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -134,7 +157,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'categories'|_ }} ({{ 'income'|_ }})</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive loading" id="categoryIncome">
|
||||
<div class="box-body no-padding table-responsive" id="categoryIncome">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -149,7 +176,6 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas height="400" id="category_chart" style="width:100%;height:400px;"></canvas>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,14 +35,22 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'accountBalances'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="accountReport">
|
||||
<div class="box-body table-responsive no-padding" id="accountReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="incomeVsExpenseReport">
|
||||
<div class="box-body table-responsive no-padding" id="incomeVsExpenseReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -51,7 +59,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="incomeReport">
|
||||
<div class="box-body table-responsive no-padding" id="incomeReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -60,17 +72,15 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expenses'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding loading" id="expenseReport">
|
||||
<div class="box-body table-responsive no-padding" id="expenseReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
{% include 'reports/partials/tags' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
@ -91,7 +101,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'budgets'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive loading" id="budgetPeriodReport">
|
||||
<div class="box-body no-padding table-responsive" id="budgetPeriodReport">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -107,7 +121,6 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas height="400" id="budget_chart" style="width:100%;height:400px;"></canvas>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -120,7 +133,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'categories'|_ }} ({{ 'expenses'|_ }})</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive loading" id="categoryExpense">
|
||||
<div class="box-body no-padding table-responsive" id="categoryExpense">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -133,7 +150,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'categories'|_ }} ({{ 'income'|_ }})</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive loading" id="categoryIncome">
|
||||
<div class="box-body no-padding table-responsive" id="categoryIncome">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -148,7 +169,6 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas height="400" id="category_chart" style="width:100%;height:400px;"></canvas>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,11 +84,15 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box" id="extra-options-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'reports_extra_options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body loading" id="extra-options">
|
||||
<div class="box-body" id="extra-options">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if tag.transactionjournals|length == 0 %}
|
||||
{{ Lang.choice('form.tag_keep_transactions', tag.transactionjournals|length, {count: tag.transactionjournals|length}) }}
|
||||
{% if tag.transactionjournals.count > 0 %}
|
||||
{{ Lang.choice('form.tag_keep_transactions', tag.transactionjournals.count, {count: tag.transactionjournals.count}) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -76,7 +76,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-612 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
|
||||
<p class="small text-center"><a href="{{ route('tags.show',[tag.id,'all']) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-10 col-md-10 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
|
||||
@ -99,11 +104,42 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
|
||||
{% for period in periods %}
|
||||
{% if period.spent != 0 or period.earned != 0 %}
|
||||
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><a href="{{ route('tags.show',[tag.id, period.date_string]) }}">{{ period.date_name }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
{% if period.spent != 0 %}
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'spent'|_ }}</td>
|
||||
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if period.earned != 0 %}
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'earned'|_ }}</td>
|
||||
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
|
||||
<p class="small text-center"><a href="{{ route('tags.show',[tag.id,'all']) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
var tagID = {{ tag.id }};
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -586,7 +586,9 @@ Route::group(
|
||||
|
||||
Route::get('', ['uses' => 'TagController@index', 'as' => 'index']);
|
||||
Route::get('create', ['uses' => 'TagController@create', 'as' => 'create']);
|
||||
Route::get('show/{tag}', ['uses' => 'TagController@show', 'as' => 'show']);
|
||||
|
||||
Route::get('show/{tag}/{date?}', ['uses' => 'TagController@show', 'as' => 'show']);
|
||||
|
||||
Route::get('edit/{tag}', ['uses' => 'TagController@edit', 'as' => 'edit']);
|
||||
Route::get('delete/{tag}', ['uses' => 'TagController@delete', 'as' => 'delete']);
|
||||
|
||||
|
@ -124,11 +124,11 @@ class BillControllerTest extends TestCase
|
||||
$data = [
|
||||
'name' => 'New Bill ' . rand(1000, 9999),
|
||||
'match' => 'some words',
|
||||
'amount_min' => 100,
|
||||
'amount_min' => '100',
|
||||
'amount_currency_id_amount_min' => 1,
|
||||
'amount_currency_id_amount_max' => 1,
|
||||
'skip' => 0,
|
||||
'amount_max' => 100,
|
||||
'amount_max' => '100',
|
||||
'date' => '2016-01-01',
|
||||
'repeat_freq' => 'monthly',
|
||||
];
|
||||
@ -154,11 +154,11 @@ class BillControllerTest extends TestCase
|
||||
$data = [
|
||||
'name' => 'Updated Bill ' . rand(1000, 9999),
|
||||
'match' => 'some more words',
|
||||
'amount_min' => 100,
|
||||
'amount_min' => '100',
|
||||
'amount_currency_id_amount_min' => 1,
|
||||
'amount_currency_id_amount_max' => 1,
|
||||
'skip' => 0,
|
||||
'amount_max' => 100,
|
||||
'amount_max' => '100',
|
||||
'date' => '2016-01-01',
|
||||
'repeat_freq' => 'monthly',
|
||||
];
|
||||
|
@ -215,6 +215,7 @@ class BudgetControllerTest extends TestCase
|
||||
// mock budget repository
|
||||
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$budgetRepository->shouldReceive('spentInPeriod')->andReturn('1');
|
||||
$budgetRepository->shouldReceive('getBudgetLimits')->andReturn(new Collection);
|
||||
|
||||
// mock journal collector:
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
|
@ -193,6 +193,12 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('setCategory')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10))->once();
|
||||
|
||||
// mock category repository
|
||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||
$repository->shouldReceive('firstUseDate')->once()->andReturn(new Carbon);
|
||||
$repository->shouldReceive('spentInPeriod')->andReturn('-1');
|
||||
$repository->shouldReceive('earnedInPeriod')->andReturn('1');
|
||||
|
||||
|
||||
$this->be($this->user());
|
||||
$this->changeDateRange($this->user(), $range);
|
||||
|
@ -94,7 +94,7 @@ class SingleControllerTest extends TestCase
|
||||
|
||||
$data = [
|
||||
'what' => 'withdrawal',
|
||||
'amount' => 10,
|
||||
'amount' => '10',
|
||||
'amount_currency_id_amount' => 1,
|
||||
'source_account_id' => 1,
|
||||
'destination_account_name' => 'Some destination',
|
||||
@ -119,7 +119,7 @@ class SingleControllerTest extends TestCase
|
||||
'description' => 'Updated groceries',
|
||||
'source_account_id' => 1,
|
||||
'destination_account_name' => 'PLUS',
|
||||
'amount' => 123,
|
||||
'amount' => '123',
|
||||
'amount_currency_id_amount' => 1,
|
||||
'budget_id' => 1,
|
||||
'category' => 'Daily groceries',
|
||||
|
Loading…
Reference in New Issue
Block a user