Code cleanup.

This commit is contained in:
James Cole 2017-04-09 07:56:46 +02:00
parent 595596d73f
commit 8db96025a3
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
81 changed files with 228 additions and 276 deletions

View File

@ -125,8 +125,10 @@ class UserController extends Controller
} }
/** /**
* @param UserFormRequest $request * @param UserFormRequest $request
* @param User $user * @param User $user
*
* @param UserRepositoryInterface $repository
* *
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/ */

View File

@ -41,7 +41,9 @@ class ForgotPasswordController extends Controller
/** /**
* Send a reset link to the given user. * Send a reset link to the given user.
* *
* @param Request $request * @param Request $request
*
* @param UserRepositoryInterface $repository
* *
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
*/ */

View File

@ -110,7 +110,9 @@ class LoginController extends Controller
/** /**
* Show the application login form. * Show the application login form.
* *
* @param Request $request * @param Request $request
*
* @param CookieJar $cookieJar
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */

View File

@ -191,8 +191,9 @@ class BudgetController extends Controller
} }
/** /**
* @param Request $request * @param Request $request
* @param string $moment * @param JournalRepositoryInterface $repository
* @param string $moment
* *
* @return View * @return View
*/ */

View File

@ -154,6 +154,10 @@ class CategoryController extends Controller
} }
/** /**
* @param Request $request
* @param JournalRepositoryInterface $repository
* @param string $moment
*
* @return View * @return View
*/ */
public function noCategory(Request $request, JournalRepositoryInterface $repository, string $moment = '') public function noCategory(Request $request, JournalRepositoryInterface $repository, string $moment = '')

View File

@ -274,10 +274,10 @@ class ImportController extends Controller
* Step 5. Depending on the importer, this will show the user settings to * Step 5. Depending on the importer, this will show the user settings to
* fill in. * fill in.
* *
* @param ImportJob $job * @param ImportJobRepositoryInterface $repository
* @param ImportJob $job
* *
* @return View * @return View
* @throws FireflyException
*/ */
public function settings(ImportJobRepositoryInterface $repository, ImportJob $job) public function settings(ImportJobRepositoryInterface $repository, ImportJob $job)
{ {

View File

@ -31,7 +31,10 @@ class JavascriptController extends Controller
{ {
/** /**
* @param AccountRepositoryInterface $repository
* @param CurrencyRepositoryInterface $currencyRepository
* *
* @return $this
*/ */
public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository) public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository)
{ {

View File

@ -132,7 +132,9 @@ class PreferencesController extends Controller
} }
/** /**
* @param Request $request * @param Request $request
*
* @param UserRepositoryInterface $repository
* *
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/ */

View File

@ -140,7 +140,9 @@ class TagController extends Controller
} }
/** /**
* @param Tag $tag * @param Tag $tag
*
* @param TagRepositoryInterface $repository
* *
* @return View * @return View
*/ */

View File

@ -60,6 +60,8 @@ class TransactionController extends Controller
* @param JournalRepositoryInterface $repository * @param JournalRepositoryInterface $repository
* @param string $what * @param string $what
* *
* @param string $moment
*
* @return View * @return View
*/ */
public function index(Request $request, JournalRepositoryInterface $repository, string $what, string $moment = '') public function index(Request $request, JournalRepositoryInterface $repository, string $what, string $moment = '')

View File

@ -10,32 +10,32 @@
*/ */
return [ return [
'defaults' => [ 'defaults' => [
'guard' => 'web', 'guard' => 'web',
'passwords' => 'users', 'passwords' => 'users',
], ],
'guards' => [ 'guards' => [
'web' => [ 'web' => [
'driver' => 'session', 'driver' => 'session',
'provider' => 'users', 'provider' => 'users',
], ],
'api' => [ 'api' => [
'driver' => 'token', 'driver' => 'token',
'provider' => 'users', 'provider' => 'users',
], ],
], ],
'providers' => [ 'providers' => [
'users' => [ 'users' => [
'driver' => 'eloquent', 'driver' => 'eloquent',
'model' => FireflyIII\User::class, 'model' => FireflyIII\User::class,
], ],
], ],
'passwords' => [ 'passwords' => [
'users' => [ 'users' => [
'provider' => 'users', 'provider' => 'users',
'table' => 'password_resets', 'table' => 'password_resets',
'expire' => 120, 'expire' => 120,
], ],
], ],

View File

@ -40,17 +40,17 @@ return [
'connections' => [ 'connections' => [
'pusher' => [ 'pusher' => [
'driver' => 'pusher', 'driver' => 'pusher',
'key' => env('PUSHER_KEY'), 'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'), 'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'), 'app_id' => env('PUSHER_APP_ID'),
'options' => [ 'options' => [
// //
], ],
], ],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
], ],

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
/* /*
* DO NOT EDIT THIS FILE. IT IS AUTO GENERATED. * DO NOT EDIT THIS FILE. IT IS AUTO GENERATED.
@ -18,15 +18,15 @@ declare(strict_types = 1);
*/ */
return [ return [
'configuration' => [ 'configuration' => [
'single_user_mode' => true, 'single_user_mode' => true,
'is_demo_site' => false, 'is_demo_site' => false,
], ],
'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true), 'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true),
'version' => '4.3.8', 'version' => '4.3.8',
'maxUploadSize' => 5242880, 'maxUploadSize' => 5242880,
'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'], 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
'list_length' => 10, 'list_length' => 10,
'export_formats' => [ 'export_formats' => [
'csv' => 'FireflyIII\Export\Exporter\CsvExporter', 'csv' => 'FireflyIII\Export\Exporter\CsvExporter',
], ],
@ -205,6 +205,6 @@ return [
'default_currency' => 'EUR', 'default_currency' => 'EUR',
'default_language' => 'en_US', 'default_language' => 'en_US',
'search_modifiers' => ['amount_is', 'amount', 'amount_max', 'amount_min', 'amount_less', 'amount_more', 'source', 'destination', 'category', 'search_modifiers' => ['amount_is', 'amount', 'amount_max', 'amount_min', 'amount_less', 'amount_more', 'source', 'destination', 'category',
'budget', 'bill', 'type', 'date', 'date_before', 'date_after','on','before','after'], 'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after'],
// tag notes has_attachments // tag notes has_attachments
]; ];

View File

@ -44,32 +44,32 @@ return [
], ],
'database' => [ 'database' => [
'driver' => 'database', 'driver' => 'database',
'table' => 'jobs', 'table' => 'jobs',
'queue' => 'default', 'queue' => 'default',
'retry_after' => 90, 'retry_after' => 90,
], ],
'beanstalkd' => [ 'beanstalkd' => [
'driver' => 'beanstalkd', 'driver' => 'beanstalkd',
'host' => 'localhost', 'host' => 'localhost',
'queue' => 'default', 'queue' => 'default',
'retry_after' => 90, 'retry_after' => 90,
], ],
'sqs' => [ 'sqs' => [
'driver' => 'sqs', 'driver' => 'sqs',
'key' => 'your-public-key', 'key' => 'your-public-key',
'secret' => 'your-secret-key', 'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name', 'queue' => 'your-queue-name',
'region' => 'us-east-1', 'region' => 'us-east-1',
], ],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
'queue' => 'default', 'queue' => 'default',
'retry_after' => 90, 'retry_after' => 90,
], ],
@ -88,7 +88,7 @@ return [
'failed' => [ 'failed' => [
'database' => env('DB_CONNECTION', 'mysql'), 'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],
]; ];

View File

@ -29,7 +29,7 @@ return [
], ],
'ses' => [ 'ses' => [
'key' => env('SES_KEY'), 'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'), 'secret' => env('SES_SECRET'),
'region' => 'us-east-1', 'region' => 'us-east-1',
], ],
@ -39,8 +39,8 @@ return [
], ],
'stripe' => [ 'stripe' => [
'model' => FireflyIII\User::class, 'model' => FireflyIII\User::class,
'key' => env('STRIPE_KEY'), 'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'), 'secret' => env('STRIPE_SECRET'),
], ],

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [
'text' => [ 'text' => [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -25,11 +25,6 @@ body.waiting * {
cursor: progress; cursor: progress;
} }
.ui-sortable-placeholder {
display: inline-block;
height: 1px;
}
.preferences-box { .preferences-box {
border: 1px #ddd solid; border: 1px #ddd solid;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
@ -48,12 +43,6 @@ body.waiting * {
margin: 20px auto 0 auto; margin: 20px auto 0 auto;
} }
.ff-error-page > .headline {
float: left;
font-size: 100px;
font-weight: 300;
}
.ff-error-page > .error-content { .ff-error-page > .error-content {
margin-left: 190px; margin-left: 190px;
display: block; display: block;

View File

@ -15,7 +15,7 @@ $(function () {
if (budgetLimitID > 0) { if (budgetLimitID > 0) {
lineChart(budgetChartUri, 'budgetOverview'); lineChart(budgetChartUri, 'budgetOverview');
} }
if (budgetLimitID == 0) { if (budgetLimitID === 0) {
columnChart(budgetChartUri, 'budgetOverview'); columnChart(budgetChartUri, 'budgetOverview');
} }

View File

@ -12,5 +12,5 @@
$(function () { $(function () {
"use strict"; "use strict";
columnChart(specific, 'period-specific-period'); columnChart(specific, 'period-specific-period');
}); });

View File

@ -62,7 +62,7 @@ function updateBar(data) {
function reportErrors(data) { function reportErrors(data) {
"use strict"; "use strict";
if (data.errors.length == 1) { if (data.errors.length === 1) {
$('#import-status-error-intro').text(langImportSingleError); $('#import-status-error-intro').text(langImportSingleError);
//'An error has occured during the import. The import can continue, however.' //'An error has occured during the import. The import can continue, however.'
} }
@ -93,7 +93,7 @@ function kickStartJob() {
function updateTimeout(data) { function updateTimeout(data) {
"use strict"; "use strict";
if (data.stepsDone != stepCount) { if (data.stepsDone !== stepCount) {
stepCount = data.stepsDone; stepCount = data.stepsDone;
currentLimit = 0; currentLimit = 0;
return; return;

View File

@ -14,7 +14,7 @@ $(function () {
"use strict"; "use strict";
// do chart JS stuff. // do chart JS stuff.
drawChart(); drawChart();
if (showTour == true) { if (showTour === true) {
$.getJSON('json/tour').done(function (data) { $.getJSON('json/tour').done(function (data) {
var tour = new Tour( var tour = new Tour(
{ {

View File

@ -99,9 +99,9 @@ function displayAjaxPartial(data, holder) {
function failAjaxPartial(uri, holder) { function failAjaxPartial(uri, holder) {
"use strict"; "use strict";
var holder = $('#' + holder); var holderObject = $('#' + holder);
holder.parent().find('.overlay').remove(); holderObject.parent().find('.overlay').remove();
holder.addClass('general-chart-error'); holderObject.addClass('general-chart-error');
} }

View File

@ -16,7 +16,7 @@ $(function () {
loadAjaxPartial('categoryReport', categoryReportUri); loadAjaxPartial('categoryReport', categoryReportUri);
loadAjaxPartial('budgetReport', budgetReportUri); loadAjaxPartial('budgetReport', budgetReportUri);
loadAjaxPartial('balanceReport',balanceReportUri); loadAjaxPartial('balanceReport', balanceReportUri);
}); });
function drawChart() { function drawChart() {

View File

@ -56,7 +56,7 @@ $(function () {
// set date from cookie // set date from cookie
var startStr = readCookie('report-start'); var startStr = readCookie('report-start');
var endStr = readCookie('report-end'); var endStr = readCookie('report-end');
if (startStr !== null && endStr !== null && startStr.length == 8 && endStr.length == 8) { if (startStr !== null && endStr !== null && startStr.length === 8 && endStr.length === 8) {
var startDate = moment(startStr, "YYYY-MM-DD"); var startDate = moment(startStr, "YYYY-MM-DD");
var endDate = moment(endStr, "YYYY-MM-DD"); var endDate = moment(endStr, "YYYY-MM-DD");
var datePicker = $('#inputDateRange').data('daterangepicker'); var datePicker = $('#inputDateRange').data('daterangepicker');

View File

@ -104,14 +104,14 @@ function addNewAction() {
function removeTrigger(e) { function removeTrigger(e) {
"use strict"; "use strict";
var target = $(e.target); var target = $(e.target);
if (target.prop("tagName") == "I") { if (target.prop("tagName") === "I") {
target = target.parent(); target = target.parent();
} }
// remove grand parent: // remove grand parent:
target.parent().parent().remove(); target.parent().parent().remove();
// if now at zero, immediatly add one again: // if now at zero, immediatly add one again:
if ($('.rule-trigger-tbody tr').length == 0) { if ($('.rule-trigger-tbody tr').length === 0) {
addNewTrigger(); addNewTrigger();
} }
return false; return false;
@ -125,14 +125,14 @@ function removeTrigger(e) {
function removeAction(e) { function removeAction(e) {
"use strict"; "use strict";
var target = $(e.target); var target = $(e.target);
if (target.prop("tagName") == "I") { if (target.prop("tagName") === "I") {
target = target.parent(); target = target.parent();
} }
// remove grand parent: // remove grand parent:
target.parent().parent().remove(); target.parent().parent().remove();
// if now at zero, immediatly add one again: // if now at zero, immediatly add one again:
if ($('.rule-action-tbody tr').length == 0) { if ($('.rule-action-tbody tr').length === 0) {
addNewAction(); addNewAction();
} }
return false; return false;

View File

@ -51,28 +51,28 @@ function clearLocation() {
function initialize() { function initialize() {
"use strict"; "use strict";
/* /*
Create new map: Create new map:
*/ */
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
/* /*
Respond to click event. Respond to click event.
*/ */
google.maps.event.addListener(map, 'rightclick', function (event) { google.maps.event.addListener(map, 'rightclick', function (event) {
placeMarker(event); placeMarker(event);
}); });
/* /*
Respond to zoom event. Respond to zoom event.
*/ */
google.maps.event.addListener(map, 'zoom_changed', function () { google.maps.event.addListener(map, 'zoom_changed', function () {
saveZoomLevel(); saveZoomLevel();
}); });
/* /*
Maybe place marker? Maybe place marker?
*/ */
if(doPlaceMarker == true) { if (doPlaceMarker === true) {
var myLatlng = new google.maps.LatLng(latitude,longitude); var myLatlng = new google.maps.LatLng(latitude, longitude);
var fakeEvent = {}; var fakeEvent = {};
fakeEvent.latLng = myLatlng; fakeEvent.latLng = myLatlng;
placeMarker(fakeEvent); placeMarker(fakeEvent);

View File

@ -72,8 +72,8 @@ function countChecked() {
"use strict"; "use strict";
var checked = $('.select_all_single:checked').length; var checked = $('.select_all_single:checked').length;
if (checked > 0) { if (checked > 0) {
$('.mass_edit span').text(edit_selected_txt + ' (' + checked + ')') $('.mass_edit span').text(edit_selected_txt + ' (' + checked + ')');
$('.mass_delete span').text(delete_selected_txt + ' (' + checked + ')') $('.mass_delete span').text(delete_selected_txt + ' (' + checked + ')');
$('.mass_button_options').show(); $('.mass_button_options').show();
} else { } else {

View File

@ -26,7 +26,7 @@ $(document).ready(function () {
} }
// update currency // update currency
$('select[name="source_account_id"]').on('change', updateCurrency) $('select[name="source_account_id"]').on('change', updateCurrency);
// get JSON things: // get JSON things:
getJSONautocomplete(); getJSONautocomplete();
@ -178,7 +178,7 @@ function updateButtons() {
// new click event: // new click event:
button.bind('click', clickButton); button.bind('click', clickButton);
if (button.data('what') == what) { if (button.data('what') === what) {
button.removeClass('btn-default').addClass('btn-info').html('<i class="fa fa-fw fa-check"></i> ' + txt[button.data('what')]); button.removeClass('btn-default').addClass('btn-info').html('<i class="fa fa-fw fa-check"></i> ' + txt[button.data('what')]);
} else { } else {
button.removeClass('btn-info').addClass('btn-default').text(txt[button.data('what')]); button.removeClass('btn-info').addClass('btn-default').text(txt[button.data('what')]);
@ -190,7 +190,7 @@ function clickButton(e) {
"use strict"; "use strict";
var button = $(e.target); var button = $(e.target);
var newWhat = button.data('what'); var newWhat = button.data('what');
if (newWhat != what) { if (newWhat !== what) {
what = newWhat; what = newWhat;
updateButtons(); updateButtons();
updateForm(); updateForm();

View File

@ -184,12 +184,12 @@ function calculateSum() {
var set = $('input[name$="][amount]"]'); var set = $('input[name$="][amount]"]');
for (var i = 0; i < set.length; i++) { for (var i = 0; i < set.length; i++) {
var current = $(set[i]); var current = $(set[i]);
sum += (current.val() == "" ? 0 : parseFloat(current.val())); sum += (current.val() === "" ? 0 : parseFloat(current.val()));
} }
sum = Math.round(sum * 100) / 100; sum = Math.round(sum * 100) / 100;
$('.amount-warning').remove(); $('.amount-warning').remove();
if (sum != originalSum) { if (sum !== originalSum) {
var holder = $('#journal_amount_holder'); var holder = $('#journal_amount_holder');
var par = holder.find('p.form-control-static'); var par = holder.find('p.form-control-static');
$('<span>').text(' (' + accounting.formatMoney(sum) + ')').addClass('text-danger amount-warning').appendTo(par); $('<span>').text(' (' + accounting.formatMoney(sum) + ')').addClass('text-danger amount-warning').appendTo(par);

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -9,7 +9,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
declare(strict_types = 1); declare(strict_types=1);
return [ return [

View File

@ -144,13 +144,13 @@
// uri's for charts: // uri's for charts:
var chartUri = '{{ chartUri }}'; var chartUri = '{{ chartUri }}';
{% if start and end %} {% if start and end %}
var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
{% else %} {% else %}
var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, 'all', 'all']) }}'; var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, 'all', 'all']) }}';
var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, 'all', 'all']) }}'; var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, 'all', 'all']) }}';
var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, 'all', 'all']) }}'; var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, 'all', 'all']) }}';
{% endif %} {% endif %}
</script> </script>

View File

@ -72,14 +72,14 @@
</div> </div>
</div> </div>
{% if budgets.count > 0 and inactive.count > 0 %} {% if budgets.count > 0 and inactive.count > 0 %}
<div class="box"> <div class="box">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ 'createBudget'|_ }}</h3> <h3 class="box-title">{{ 'createBudget'|_ }}</h3>
</div>
<div class="box-body">
<a href="{{ route('budgets.create') }}" class="btn btn-success pull-right">{{ 'createBudget'|_ }}</a>
</div>
</div> </div>
<div class="box-body">
<a href="{{ route('budgets.create') }}" class="btn btn-success pull-right">{{ 'createBudget'|_ }}</a>
</div>
</div>
{% endif %} {% endif %}
</div> </div>

View File

@ -110,10 +110,10 @@
<td style="text-align: right;">{{ period.earned|formatAmount }}</td> <td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr> </tr>
{% if period.earned != 0 and period.spent != 0 %} {% if period.earned != 0 and period.spent != 0 %}
<tr> <tr>
<td style="width:33%;">{{ 'sum'|_ }}</td> <td style="width:33%;">{{ 'sum'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td> <td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td> <td style="width:33%;">{{ 'transferred'|_ }}</td>

View File

@ -1,3 +1,3 @@
{{ trans('demo.import-configure-security') }} {{ trans('demo.import-configure-security') }}
<br /><br /> <br/><br/>
{{ trans('demo.import-configure-configuration') }} {{ trans('demo.import-configure-configuration') }}

View File

@ -1,6 +1,6 @@
{{ trans('demo.reports-index-start')|raw }} {{ trans('demo.reports-index-start')|raw }}
<br /> <br/>
<br /> <br/>
{{ trans('demo.reports-index-examples', { {{ trans('demo.reports-index-examples', {
one: route('reports.report.default', ['1,2,3','currentMonthStart','currentMonthEnd']), one: route('reports.report.default', ['1,2,3','currentMonthStart','currentMonthEnd']),
two: route('reports.report.default', ['1,2,3','20160101','20161231']), two: route('reports.report.default', ['1,2,3','20160101','20161231']),

View File

@ -8,6 +8,6 @@
</p> </p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;"> <p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
<a href="{{ url }}">{{ url }}</a> <a href="{{ url }}">{{ url }}</a>
</p> </p>
{% include 'emails.footer-html' %} {% include 'emails.footer-html' %}

View File

@ -1,6 +1,6 @@
<html> <html>
<head> <head>
<base href="{{ route('index') }}/" /> <base href="{{ route('index') }}/"/>
<style> <style>
/* latin */ /* latin */

View File

@ -1,6 +1,6 @@
<html> <html>
<head> <head>
<base href="{{ route('index') }}/" /> <base href="{{ route('index') }}/"/>
<title>Firefly III is in maintenance mode.</title> <title>Firefly III is in maintenance mode.</title>
<style> <style>

View File

@ -15,13 +15,13 @@
{{ 'import_finished_intro'|_ }} {{ 'import_finished_intro'|_ }}
</p> </p>
{% if tagId > 0 %} {% if tagId > 0 %}
<p> <p>
{{ trans('firefly.import_finished_text_with_link', {tag: tagId})|raw }} {{ trans('firefly.import_finished_text_with_link', {tag: tagId})|raw }}
</p> </p>
{% else %} {% else %}
<p> <p>
{{ 'import_finished_text_without_link'|_ }} {{ 'import_finished_text_without_link'|_ }}
</p> </p>
{% endif %} {% endif %}
<p> <p>

View File

@ -1,4 +1,4 @@
var accountInfo = []; var accountInfo = [];
{% for id, account in accounts %} {% for id, account in accounts %}
accountInfo[{{ id }}] = {preferredCurrency: {{ account.preferredCurrency}}}; accountInfo[{{ id }}] = {preferredCurrency: {{ account.preferredCurrency }}};
{% endfor %} {% endfor %}

View File

@ -1,20 +1,20 @@
// date range picker configuration: // date range picker configuration:
var dateRangeConfig = { var dateRangeConfig = {
startDate: moment("{{ picker.start }}"), startDate: moment("{{ picker.start }}"),
endDate: moment("{{ picker.end }}"), endDate: moment("{{ picker.end }}"),
linkTitle: "{{ linkTitle }}", linkTitle: "{{ linkTitle }}",
URL: "{{ route('daterange') }}", URL: "{{ route('daterange') }}",
firstDate: moment("{{ firstDate }}"), firstDate: moment("{{ firstDate }}"),
currentPeriod: "{{ picker.current }}", currentPeriod: "{{ picker.current }}",
previousPeriod: "{{ picker.previous }}", previousPeriod: "{{ picker.previous }}",
nextPeriod: "{{ picker.next }}", nextPeriod: "{{ picker.next }}",
everything: '{{ 'everything'|_|escape }}', everything: '{{ 'everything'|_|escape }}',
customRangeLabel: '{{ 'customRange'|_|escape }}', customRangeLabel: '{{ 'customRange'|_|escape }}',
applyLabel: '{{ 'apply'|_|escape }}', applyLabel: '{{ 'apply'|_|escape }}',
cancelLabel: '{{ 'cancel'|_|escape }}', cancelLabel: '{{ 'cancel'|_|escape }}',
fromLabel: '{{ 'from'|_|escape }}', fromLabel: '{{ 'from'|_|escape }}',
toLabel: '{{ 'to'|_|escape }}', toLabel: '{{ 'to'|_|escape }}',
ranges: {{ picker.ranges|json_encode|raw }} ranges: {{ picker.ranges|json_encode|raw }}
}; };
var language = "{{ language|escape }}"; var language = "{{ language|escape }}";

View File

@ -73,11 +73,11 @@
</li> </li>
{% if not SANDSTORM %} {% if not SANDSTORM %}
<li class="dropdown user user-menu"> <li class="dropdown user user-menu">
<span style="cursor:default;color:#fff;padding: 15px;display: block;line-height: 20px;"> <span style="cursor:default;color:#fff;padding: 15px;display: block;line-height: 20px;">
<span class="hidden-xs">{{ Auth.user.email }}</span> <span class="hidden-xs">{{ Auth.user.email }}</span>
</span> </span>
</li> </li>
{% endif %} {% endif %}
<li id="sidebar-toggle"> <li id="sidebar-toggle">
<a href="#" data-toggle="control-sidebar"><i class="fa fa-plus-circle"></i></a> <a href="#" data-toggle="control-sidebar"><i class="fa fa-plus-circle"></i></a>

View File

@ -149,12 +149,14 @@
<ul class="treeview-menu"> <ul class="treeview-menu">
{% if not SANDSTORM %} {% if not SANDSTORM %}
<li class="{{ activeRoutePartial('profile') }}"> <li class="{{ activeRoutePartial('profile') }}">
<a class="{{ activeRouteStrict('profile.index') }}" href="{{ route('profile.index') }}"><i class="fa fa-user fa-fw"></i> {{ 'profile'|_ }}</a> <a class="{{ activeRouteStrict('profile.index') }}" href="{{ route('profile.index') }}"><i class="fa fa-user fa-fw"></i> {{ 'profile'|_ }}
</li> </a>
</li>
{% endif %} {% endif %}
<li class="{{ activeRoutePartial('preferences') }}"> <li class="{{ activeRoutePartial('preferences') }}">
<a class="{{ activeRouteStrict('preferences.index') }}" href="{{ route('preferences.index') }}"><i class="fa fa-gear fa-fw"></i> {{ 'preferences'|_ }}</a> <a class="{{ activeRouteStrict('preferences.index') }}" href="{{ route('preferences.index') }}"><i
class="fa fa-gear fa-fw"></i> {{ 'preferences'|_ }}</a>
</li> </li>
<li class="{{ activeRoutePartial('currency') }}"> <li class="{{ activeRoutePartial('currency') }}">
<a class="{{ activeRoutePartial('currency') }}" href="{{ route('currencies.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currencies'|_ }}</a> <a class="{{ activeRoutePartial('currency') }}" href="{{ route('currencies.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currencies'|_ }}</a>
@ -174,11 +176,11 @@
<!-- other options --> <!-- other options -->
{% if not SANDSTORM %} {% if not SANDSTORM %}
<li> <li>
<a href="{{ route('logout') }}"> <a href="{{ route('logout') }}">
<i class="fa fa-sign-out fa-fw"></i> <i class="fa fa-sign-out fa-fw"></i>
<span>{{ 'logout'|_ }}</span> <span>{{ 'logout'|_ }}</span>
</a> </a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>

View File

@ -71,12 +71,12 @@
</td> </td>
</tr> </tr>
{% if piggyBank.targetdate %} {% if piggyBank.targetdate %}
<tr> <tr>
<td>{{ 'suggested_amount'|_ }}</td> <td>{{ 'suggested_amount'|_ }}</td>
<td> <td>
{{ suggestedMonthlyAmount(piggyBank)|formatAmount }} {{ suggestedMonthlyAmount(piggyBank)|formatAmount }}
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
</table> </table>
</div> </div>
@ -100,7 +100,7 @@
<h3 class="box-title">{{ trans('form.notes') }}</h3> <h3 class="box-title">{{ trans('form.notes') }}</h3>
</div> </div>
<div class="box-body"> <div class="box-body">
{{ note.markdown|raw }} {{ note.markdown|raw }}
</div> </div>
</div> </div>

View File

@ -47,7 +47,7 @@
{% endfor %} {% endfor %}
<p class="text-info"> <p class="text-info">
<br /> <br/>
{{ 'pref_languages_locale'|_ }} {{ 'pref_languages_locale'|_ }}
</p> </p>
</div> </div>
@ -128,11 +128,11 @@
<div class="col-sm-10"> <div class="col-sm-10">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" name="showDepositsFrontpage[]" value="{{ showDepositsFrontpage }}" <input type="checkbox" name="showDepositsFrontpage[]" value="{{ showDepositsFrontpage }}"
{% if showDepositsFrontpage %} {% if showDepositsFrontpage %}
checked checked
{% endif %} {% endif %}
> {{ 'pref_home_do_show_deposits'|_ }} > {{ 'pref_home_do_show_deposits'|_ }}
</label> </label>
</div> </div>
</div> </div>

View File

@ -27,7 +27,8 @@
<a href="{{ route('accounts.show', account.id) }}" title="{{ account.name }}">{{ account.name }}</a> <a href="{{ route('accounts.show', account.id) }}" title="{{ account.name }}">{{ account.name }}</a>
</td> </td>
{% if accountSummary[account.id] %} {% if accountSummary[account.id] %}
<td data-value="{{ accountSummary[account.id] }}" style="text-align: right;">{{ accountSummary[account.id]|formatAmount }}</td> <td data-value="{{ accountSummary[account.id] }}"
style="text-align: right;">{{ accountSummary[account.id]|formatAmount }}</td>
{% else %} {% else %}
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td> <td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
{% endif %} {% endif %}
@ -93,7 +94,7 @@
</div> </div>
<div class="box-body"> <div class="box-body">
<div style="width:75%;margin:0 auto;"> <div style="width:75%;margin:0 auto;">
<canvas id="accounts-out-pie-chart" style="margin:0 auto;"></canvas> <canvas id="accounts-out-pie-chart" style="margin:0 auto;"></canvas>
</div> </div>
<label style="font-weight:normal;"> <label style="font-weight:normal;">
<input type="checkbox" id="accounts-out-pie-chart-checked"> <input type="checkbox" id="accounts-out-pie-chart-checked">

View File

@ -28,12 +28,14 @@
<a href="{{ route('accounts.show', account.id) }}" title="{{ account.name }}">{{ account.name }}</a> <a href="{{ route('accounts.show', account.id) }}" title="{{ account.name }}">{{ account.name }}</a>
</td> </td>
{% if accountSummary[account.id] %} {% if accountSummary[account.id] %}
<td data-value="{{ accountSummary[account.id].earned }}" style="text-align: right;">{{ accountSummary[account.id].earned|formatAmount }}</td> <td data-value="{{ accountSummary[account.id].earned }}"
style="text-align: right;">{{ accountSummary[account.id].earned|formatAmount }}</td>
{% else %} {% else %}
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td> <td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
{% endif %} {% endif %}
{% if accountSummary[account.id] %} {% if accountSummary[account.id] %}
<td data-value="{{ accountSummary[account.id].spent }}" style="text-align: right;">{{ accountSummary[account.id].spent|formatAmount }}</td> <td data-value="{{ accountSummary[account.id].spent }}"
style="text-align: right;">{{ accountSummary[account.id].spent|formatAmount }}</td>
{% else %} {% else %}
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td> <td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
{% endif %} {% endif %}
@ -64,12 +66,14 @@
<a href="{{ route('categories.show', category.id) }}" title="{{ category.name }}">{{ category.name }}</a> <a href="{{ route('categories.show', category.id) }}" title="{{ category.name }}">{{ category.name }}</a>
</td> </td>
{% if categorySummary[category.id] %} {% if categorySummary[category.id] %}
<td data-value="{{ categorySummary[category.id].earned }}" style="text-align: right;">{{ categorySummary[category.id].earned|formatAmount }}</td> <td data-value="{{ categorySummary[category.id].earned }}"
style="text-align: right;">{{ categorySummary[category.id].earned|formatAmount }}</td>
{% else %} {% else %}
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td> <td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
{% endif %} {% endif %}
{% if categorySummary[category.id] %} {% if categorySummary[category.id] %}
<td data-value="{{ categorySummary[category.id].spent }}" style="text-align: right;">{{ categorySummary[category.id].spent|formatAmount }}</td> <td data-value="{{ categorySummary[category.id].spent }}"
style="text-align: right;">{{ categorySummary[category.id].spent|formatAmount }}</td>
{% else %} {% else %}
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td> <td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
{% endif %} {% endif %}

View File

@ -94,7 +94,6 @@
</div> </div>
</div> </div>
<div class="col-lg-4 col-md-4 col-sm-12"> <div class="col-lg-4 col-md-4 col-sm-12">
<div class="box"> <div class="box">

View File

@ -201,9 +201,9 @@
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
// report uri's // report uri's
var opChartUri ='{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var opChartUri = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var sumChartUri='{{ route('chart.report.sum', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var sumChartUri = '{{ route('chart.report.sum', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var netWorthUri ='{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var netWorthUri = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
// data uri's // data uri's
var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';

View File

@ -190,9 +190,9 @@
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
// report uri's // report uri's
var opChartUri ='{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var opChartUri = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var sumChartUri='{{ route('chart.report.sum', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var sumChartUri = '{{ route('chart.report.sum', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var netWorthUri ='{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var netWorthUri = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
// data uri's // data uri's
var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';

View File

@ -15,7 +15,8 @@
</td> </td>
<td class="hidden-xs" data-value="{{ account.start_balance }}" style="text-align: right;">{{ account.start_balance|formatAmount }}</td> <td class="hidden-xs" data-value="{{ account.start_balance }}" style="text-align: right;">{{ account.start_balance|formatAmount }}</td>
<td class="hidden-xs" data-value="{{ account.end_balance }}" style="text-align: right;">{{ account.end_balance|formatAmount }}</td> <td class="hidden-xs" data-value="{{ account.end_balance }}" style="text-align: right;">{{ account.end_balance|formatAmount }}</td>
<td style="text-align: right;" data-value="{{ (account.end_balance - account.start_balance) }}">{{ (account.end_balance - account.start_balance)|formatAmount }}</td> <td style="text-align: right;"
data-value="{{ (account.end_balance - account.start_balance) }}">{{ (account.end_balance - account.start_balance)|formatAmount }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -13,9 +13,9 @@
<tr> <tr>
<td> <td>
{% if id != 0 %} {% if id != 0 %}
<a class="btn btn-default btn-xs" href="{{ route('categories.show', [id]) }}"><i class="fa fa-external-link" aria-hidden="true"></i></a> <a class="btn btn-default btn-xs" href="{{ route('categories.show', [id]) }}"><i class="fa fa-external-link" aria-hidden="true"></i></a>
{% else %} {% else %}
<a class="btn btn-default btn-xs" href="{{ route('categories.no-category') }}"><i class="fa fa-external-link" aria-hidden="true"></i></a> <a class="btn btn-default btn-xs" href="{{ route('categories.no-category') }}"><i class="fa fa-external-link" aria-hidden="true"></i></a>
{% endif %} {% endif %}
</td> </td>
<td data-value="{{ info.name }}"> <td data-value="{{ info.name }}">

View File

@ -107,7 +107,8 @@
<a href="{{ route('tags.show', tag.id) }}" title="{{ tag.tag }}">{{ tag.tag }}</a> <a href="{{ route('tags.show', tag.id) }}" title="{{ tag.tag }}">{{ tag.tag }}</a>
</td> </td>
{% if tagSummary[tag.id] %} {% if tagSummary[tag.id] %}
<td data-value="{{ tagSummary[tag.id].earned }}" style="text-align: right;">{{ tagSummary[tag.id].earned|formatAmount }}</td> <td data-value="{{ tagSummary[tag.id].earned }}"
style="text-align: right;">{{ tagSummary[tag.id].earned|formatAmount }}</td>
{% else %} {% else %}
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td> <td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
{% endif %} {% endif %}

View File

@ -123,7 +123,7 @@
{% endif %} {% endif %}
{% if rule.description != "" %} {% if rule.description != "" %}
<small class="hidden-xs" <small class="hidden-xs"
{% if not rule.active %} {% if not rule.active %}
class="text-muted" class="text-muted"
{% endif %} {% endif %}

View File

@ -33,4 +33,4 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>

View File

@ -5,7 +5,8 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<form method="POST" action="{{ route('transactions.convert.index.post', [destinationType.type|lower, journal.id]) }}" accept-charset="UTF-8" class="form-horizontal" id="store" <form method="POST" action="{{ route('transactions.convert.index.post', [destinationType.type|lower, journal.id]) }}" accept-charset="UTF-8"
class="form-horizontal" id="store"
enctype="multipart/form-data"> enctype="multipart/form-data">
<input name="_token" type="hidden" value="{{ csrf_token() }}"> <input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row"> <div class="row">
@ -47,8 +48,7 @@
sourceName: sourceAccount.name, sourceName: sourceAccount.name,
destinationRoute: route('accounts.show', [destinationAccount.id]), destinationRoute: route('accounts.show', [destinationAccount.id]),
destinationName: destinationAccount.name, destinationName: destinationAccount.name,
})|raw })|raw }}
}}
</em> </em>
</p> </p>
<p><em> <p><em>
@ -69,8 +69,7 @@
sourceName: sourceAccount.name, sourceName: sourceAccount.name,
destinationRoute: route('accounts.show', [destinationAccount.id]), destinationRoute: route('accounts.show', [destinationAccount.id]),
destinationName: destinationAccount.name, destinationName: destinationAccount.name,
})|raw })|raw }}
}}
</em></p> </em></p>
<p> <p>
@ -95,8 +94,7 @@
sourceName: sourceAccount.name, sourceName: sourceAccount.name,
destinationRoute: route('accounts.show', [destinationAccount.id]), destinationRoute: route('accounts.show', [destinationAccount.id]),
destinationName: destinationAccount.name, destinationName: destinationAccount.name,
})|raw })|raw }}
}}
</em> </em>
</p> </p>
<p> <p>
@ -121,8 +119,7 @@
sourceName: sourceAccount.name, sourceName: sourceAccount.name,
destinationRoute: route('accounts.show', [destinationAccount.id]), destinationRoute: route('accounts.show', [destinationAccount.id]),
destinationName: destinationAccount.name, destinationName: destinationAccount.name,
})|raw })|raw }}
}}
</em> </em>
</p> </p>
<p> <p>
@ -147,8 +144,7 @@
sourceName: sourceAccount.name, sourceName: sourceAccount.name,
destinationRoute: route('accounts.show', [destinationAccount.id]), destinationRoute: route('accounts.show', [destinationAccount.id]),
destinationName: destinationAccount.name, destinationName: destinationAccount.name,
})|raw })|raw }}
}}
</em> </em>
</p> </p>
@ -175,8 +171,7 @@
sourceName: sourceAccount.name, sourceName: sourceAccount.name,
destinationRoute: route('accounts.show', [destinationAccount.id]), destinationRoute: route('accounts.show', [destinationAccount.id]),
destinationName: destinationAccount.name, destinationName: destinationAccount.name,
})|raw })|raw }}
}}
</em> </em>
</p> </p>

View File

@ -69,7 +69,8 @@
</select> </select>
{% else %} {% else %}
{# SOURCE ACCOUNT NAME FOR DEPOSIT #} {# SOURCE ACCOUNT NAME FOR DEPOSIT #}
<input class="form-control input-sm" placeholder="{{ journal.source_account_name }}" name="source_account_name[{{ journal.id }}]" type="text" value="{{ journal.source_account_name }}"> <input class="form-control input-sm" placeholder="{{ journal.source_account_name }}"
name="source_account_name[{{ journal.id }}]" type="text" value="{{ journal.source_account_name }}">
{% endif %} {% endif %}
</td> </td>
<td> <td>
@ -83,20 +84,24 @@
</select> </select>
{% else %} {% else %}
{# DESTINATION ACCOUNT NAME FOR EXPENSE #} {# DESTINATION ACCOUNT NAME FOR EXPENSE #}
<input class="form-control input-sm" placeholder="{{ journal.destination_account_name }}" name="destination_account_name[{{ journal.id }}]" type="text" value="{{ journal.destination_account_name }}"> <input class="form-control input-sm" placeholder="{{ journal.destination_account_name }}"
name="destination_account_name[{{ journal.id }}]" type="text"
value="{{ journal.destination_account_name }}">
{% endif %} {% endif %}
</td> </td>
{# category #} {# category #}
<td> <td>
<input class="form-control input-sm" placeholder="{{ journal.categories[0].name }}" name="category[{{ journal.id }}]" type="text" value="{{ journal.categories[0].name }}"> <input class="form-control input-sm" placeholder="{{ journal.categories[0].name }}"
name="category[{{ journal.id }}]" type="text" value="{{ journal.categories[0].name }}">
</td> </td>
{# budget #} {# budget #}
<td> <td>
{% if journal.transaction_type_type == 'Withdrawal' %} {% if journal.transaction_type_type == 'Withdrawal' %}
<select class="form-control input-sm" name="budget_id[{{ journal.id }}]"> <select class="form-control input-sm" name="budget_id[{{ journal.id }}]">
<option value="0" label="(none)" <option value="0" label="(none)"
{% if journal.budgets.count == 0 %}selected="selected"{% endif %} {% if journal.budgets.count == 0 %}selected="selected"{% endif %}
>(none)</option> >(none)
</option>
{% for budget in budgets %} {% for budget in budgets %}
<option value="{{ budget.id }}"{% if budget.id==journal.budgets[0].id %} selected="selected"{% endif %} <option value="{{ budget.id }}"{% if budget.id==journal.budgets[0].id %} selected="selected"{% endif %}
label="{{ budget.name }}">{{ budget.name }}</option> label="{{ budget.name }}">{{ budget.name }}</option>

View File

@ -243,12 +243,12 @@
</p> </p>
{% endif %} {% endif %}
{% if transactions|length == 1 %} {% if transactions|length == 1 %}
<p> <p>
<i class="fa fa-copy" aria-hidden="true"></i> <i class="fa fa-copy" aria-hidden="true"></i>
<a href="{{ route('transactions.clone', [journal.id]) }}"> <a href="{{ route('transactions.clone', [journal.id]) }}">
{{ ('clone_'~journal.transactionType.type|lower)|_ }} {{ ('clone_'~journal.transactionType.type|lower)|_ }}
</a> </a>
</p> </p>
{% endif %} {% endif %}
</div> </div>

View File

@ -139,7 +139,6 @@ class BillControllerTest extends TestCase
{ {
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(BillRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());

View File

@ -81,9 +81,6 @@ class BudgetControllerTest extends TestCase
*/ */
public function testBudgetLimitWrongLimit() public function testBudgetLimitWrongLimit()
{ {
$repository = $this->mock(BudgetRepositoryInterface::class);
$generator = $this->mock(GeneratorInterface::class);
$this->be($this->user()); $this->be($this->user());
$response = $this->get(route('chart.budget.budget-limit', [1, 8])); $response = $this->get(route('chart.budget.budget-limit', [1, 8]));
$response->assertStatus(500); $response->assertStatus(500);

View File

@ -34,8 +34,6 @@ class BudgetReportControllerTest extends TestCase
{ {
$generator = $this->mock(GeneratorInterface::class); $generator = $this->mock(GeneratorInterface::class);
$pieChart = $this->mock(MetaPieChartInterface::class); $pieChart = $this->mock(MetaPieChartInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
$pieChart->shouldReceive('setAccounts')->once()->andReturnSelf(); $pieChart->shouldReceive('setAccounts')->once()->andReturnSelf();
$pieChart->shouldReceive('setBudgets')->once()->andReturnSelf(); $pieChart->shouldReceive('setBudgets')->once()->andReturnSelf();
@ -57,8 +55,6 @@ class BudgetReportControllerTest extends TestCase
{ {
$generator = $this->mock(GeneratorInterface::class); $generator = $this->mock(GeneratorInterface::class);
$pieChart = $this->mock(MetaPieChartInterface::class); $pieChart = $this->mock(MetaPieChartInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
$pieChart->shouldReceive('setAccounts')->once()->andReturnSelf(); $pieChart->shouldReceive('setAccounts')->once()->andReturnSelf();
$pieChart->shouldReceive('setBudgets')->once()->andReturnSelf(); $pieChart->shouldReceive('setBudgets')->once()->andReturnSelf();
@ -82,7 +78,6 @@ class BudgetReportControllerTest extends TestCase
public function testMainChart() public function testMainChart()
{ {
$generator = $this->mock(GeneratorInterface::class); $generator = $this->mock(GeneratorInterface::class);
$pieChart = $this->mock(MetaPieChartInterface::class);
$collector = $this->mock(JournalCollectorInterface::class); $collector = $this->mock(JournalCollectorInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos = $this->mock(BudgetRepositoryInterface::class);

View File

@ -76,7 +76,6 @@ class CurrencyControllerTest extends TestCase
public function testCannotCreate() public function testCannotCreate()
{ {
// mock stuff // mock stuff
$repository = $this->mock(CurrencyRepositoryInterface::class);
$userRepos = $this->mock(UserRepositoryInterface::class); $userRepos = $this->mock(UserRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
@ -95,7 +94,6 @@ class CurrencyControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
// mock stuff // mock stuff
$repository = $this->mock(CurrencyRepositoryInterface::class);
$userRepos = $this->mock(UserRepositoryInterface::class); $userRepos = $this->mock(UserRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
@ -115,8 +113,6 @@ class CurrencyControllerTest extends TestCase
public function testDefaultCurrency() public function testDefaultCurrency()
{ {
// mock stuff // mock stuff
$repository = $this->mock(CurrencyRepositoryInterface::class);
$userRepos = $this->mock(UserRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -177,7 +173,6 @@ class CurrencyControllerTest extends TestCase
public function testEdit() public function testEdit()
{ {
// mock stuff // mock stuff
$repository = $this->mock(CurrencyRepositoryInterface::class);
$userRepos = $this->mock(UserRepositoryInterface::class); $userRepos = $this->mock(UserRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);

View File

@ -40,7 +40,6 @@ class ImportControllerTest extends TestCase
public function testComplete() public function testComplete()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -57,7 +56,6 @@ class ImportControllerTest extends TestCase
public function testCompleteWrongJob() public function testCompleteWrongJob()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -75,7 +73,6 @@ class ImportControllerTest extends TestCase
{ {
$setup = $this->mock(CsvSetup::class); $setup = $this->mock(CsvSetup::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$setup->shouldReceive('setJob')->once(); $setup->shouldReceive('setJob')->once();
@ -97,7 +94,6 @@ class ImportControllerTest extends TestCase
public function testConfigureWrongJob() public function testConfigureWrongJob()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -112,7 +108,6 @@ class ImportControllerTest extends TestCase
public function testDownload() public function testDownload()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -135,7 +130,6 @@ class ImportControllerTest extends TestCase
public function testFinished() public function testFinished()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -152,7 +146,6 @@ class ImportControllerTest extends TestCase
public function testFinishedWrongJob() public function testFinishedWrongJob()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -168,7 +161,6 @@ class ImportControllerTest extends TestCase
public function testIndex() public function testIndex()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -182,7 +174,6 @@ class ImportControllerTest extends TestCase
public function testJson() public function testJson()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -197,7 +188,6 @@ class ImportControllerTest extends TestCase
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$tagRepos = $this->mock(TagRepositoryInterface::class); $tagRepos = $this->mock(TagRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$tag = factory(Tag::class)->make(); $tag = factory(Tag::class)->make();
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -214,7 +204,6 @@ class ImportControllerTest extends TestCase
public function testJsonRunning() public function testJsonRunning()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -253,7 +242,6 @@ class ImportControllerTest extends TestCase
public function testPostConfigureWrongJob() public function testPostConfigureWrongJob()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$data = []; $data = [];
@ -271,7 +259,6 @@ class ImportControllerTest extends TestCase
public function testPostSettings() public function testPostSettings()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$importer = $this->mock(CsvSetup::class); $importer = $this->mock(CsvSetup::class);
@ -293,7 +280,6 @@ class ImportControllerTest extends TestCase
public function testPostSettingsWrongJob() public function testPostSettingsWrongJob()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$data = []; $data = [];
@ -333,7 +319,6 @@ class ImportControllerTest extends TestCase
public function testSettingsUserSettings() public function testSettingsUserSettings()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$importer = $this->mock(CsvSetup::class); $importer = $this->mock(CsvSetup::class);
@ -356,7 +341,6 @@ class ImportControllerTest extends TestCase
public function testSettingsWrongJob() public function testSettingsWrongJob()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -373,7 +357,6 @@ class ImportControllerTest extends TestCase
public function testSettingsWrongJobAgain() public function testSettingsWrongJobAgain()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -388,7 +371,6 @@ class ImportControllerTest extends TestCase
public function testStart() public function testStart()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
/** @var ImportProcedureInterface $procedure */ /** @var ImportProcedureInterface $procedure */
@ -409,7 +391,6 @@ class ImportControllerTest extends TestCase
public function testStatus() public function testStatus()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
// complete // complete
@ -426,7 +407,6 @@ class ImportControllerTest extends TestCase
public function testStatusWrongJob() public function testStatusWrongJob()
{ {
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(ImportJobRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
// complete // complete

View File

@ -91,7 +91,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testBalanceAmountDefaultNoBudget() public function testBalanceAmountDefaultNoBudget()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos = $this->mock(BudgetRepositoryInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class); $popupHelper = $this->mock(PopupReportInterface::class);
@ -126,7 +125,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testBalanceAmountDefaultRole() public function testBalanceAmountDefaultRole()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos = $this->mock(BudgetRepositoryInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class); $popupHelper = $this->mock(PopupReportInterface::class);
@ -162,7 +160,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testBalanceAmountDiffRole() public function testBalanceAmountDiffRole()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos = $this->mock(BudgetRepositoryInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class); $popupHelper = $this->mock(PopupReportInterface::class);
@ -170,11 +167,6 @@ class ReportControllerTest extends TestCase
$budget = factory(Budget::class)->make(); $budget = factory(Budget::class)->make();
$account = factory(Account::class)->make(); $account = factory(Account::class)->make();
$one = factory(Transaction::class)->make();
$two = factory(Transaction::class)->make();
$tag = factory(Tag::class)->make();
$tag->tagMode = 'balancingAct';
$two->transactionJournal->tags()->save($tag);
$budgetRepos->shouldReceive('find')->andReturn($budget)->once()->withArgs([1]); $budgetRepos->shouldReceive('find')->andReturn($budget)->once()->withArgs([1]);
$accountRepos->shouldReceive('find')->andReturn($account)->once()->withArgs([1]); $accountRepos->shouldReceive('find')->andReturn($account)->once()->withArgs([1]);
@ -206,10 +198,8 @@ class ReportControllerTest extends TestCase
*/ */
public function testBalanceAmountTagRole() public function testBalanceAmountTagRole()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos = $this->mock(BudgetRepositoryInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class);
$budget = factory(Budget::class)->make(); $budget = factory(Budget::class)->make();
$account = factory(Account::class)->make(); $account = factory(Account::class)->make();
@ -243,7 +233,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testBudgetSpentAmount() public function testBudgetSpentAmount()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos = $this->mock(BudgetRepositoryInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class); $popupHelper = $this->mock(PopupReportInterface::class);
$budget = factory(Budget::class)->make(); $budget = factory(Budget::class)->make();
@ -275,7 +264,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testCategoryEntry() public function testCategoryEntry()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$categoryRepos = $this->mock(CategoryRepositoryInterface::class); $categoryRepos = $this->mock(CategoryRepositoryInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class); $popupHelper = $this->mock(PopupReportInterface::class);
$category = factory(Category::class)->make(); $category = factory(Category::class)->make();
@ -307,7 +295,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testExpenseEntry() public function testExpenseEntry()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class); $popupHelper = $this->mock(PopupReportInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$account = factory(Account::class)->make(); $account = factory(Account::class)->make();
@ -339,7 +326,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testIncomeEntry() public function testIncomeEntry()
{ {
$collector = $this->mock(JournalCollectorInterface::class);
$popupHelper = $this->mock(PopupReportInterface::class); $popupHelper = $this->mock(PopupReportInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$account = factory(Account::class)->make(); $account = factory(Account::class)->make();
@ -371,7 +357,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testWrongLocation() public function testWrongLocation()
{ {
$popupHelper = $this->mock(PopupReportInterface::class);
$this->be($this->user()); $this->be($this->user());
$arguments = [ $arguments = [
'attributes' => [ 'attributes' => [

View File

@ -166,7 +166,6 @@ class ProfileControllerTest extends TestCase
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$repository = $this->mock(UserRepositoryInterface::class);
$data = [ $data = [
'password' => 'james2', 'password' => 'james2',
]; ];

View File

@ -120,7 +120,6 @@ class ReportControllerTest extends TestCase
*/ */
public function testDefaultReportBadDate() public function testDefaultReportBadDate()
{ {
$generator = $this->mock(SYRG::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);

View File

@ -37,8 +37,6 @@ class RuleGroupControllerTest extends TestCase
{ {
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->be($this->user()); $this->be($this->user());
@ -55,7 +53,6 @@ class RuleGroupControllerTest extends TestCase
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class); $repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('get')->andReturn(new Collection); $repository->shouldReceive('get')->andReturn(new Collection);
@ -73,7 +70,6 @@ class RuleGroupControllerTest extends TestCase
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class); $repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('destroy'); $repository->shouldReceive('destroy');
@ -93,7 +89,6 @@ class RuleGroupControllerTest extends TestCase
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class); $repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('moveDown'); $repository->shouldReceive('moveDown');
@ -110,8 +105,6 @@ class RuleGroupControllerTest extends TestCase
{ {
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -128,7 +121,6 @@ class RuleGroupControllerTest extends TestCase
{ {
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->andReturn(new TransactionJournal);
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection);
@ -156,7 +148,6 @@ class RuleGroupControllerTest extends TestCase
{ {
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class); $accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection); $accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
@ -175,7 +166,6 @@ class RuleGroupControllerTest extends TestCase
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class); $repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$this->session(['rule-groups.create.uri' => 'http://localhost']); $this->session(['rule-groups.create.uri' => 'http://localhost']);
@ -202,7 +192,6 @@ class RuleGroupControllerTest extends TestCase
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class); $repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('moveUp'); $repository->shouldReceive('moveUp');
@ -220,7 +209,6 @@ class RuleGroupControllerTest extends TestCase
// mock stuff // mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(RuleGroupRepositoryInterface::class); $repository = $this->mock(RuleGroupRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$data = [ $data = [

View File

@ -36,7 +36,6 @@ class TagControllerTest extends TestCase
public function testCreate() public function testCreate()
{ {
// mock stuff // mock stuff
$repository = $this->mock(TagRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -52,7 +51,6 @@ class TagControllerTest extends TestCase
public function testDelete() public function testDelete()
{ {
// mock stuff // mock stuff
$repository = $this->mock(TagRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);