diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index d77d48ba34..2247c30fd3 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -26,6 +26,7 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\Journal\JournalTaskerInterface; use Illuminate\Http\Request; +use Log; use Preferences; use Session; use Steam; @@ -264,6 +265,7 @@ class SplitController extends Controller $return = []; $transactions = $request->get('transactions'); foreach ($transactions as $transaction) { + $return[] = [ 'description' => $transaction['description'], 'source_account_id' => $transaction['source_account_id'] ?? 0, @@ -275,6 +277,7 @@ class SplitController extends Controller 'category' => $transaction['category'] ?? '', ]; } + Log::debug(sprintf('Found %d splits in request data.', count($return))); return $return; } diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 4f0f5b3342..6399d98f0d 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -267,6 +267,7 @@ class JournalRepository implements JournalRepositoryInterface $journal->description = $data['journal_description']; $journal->date = $data['date']; $journal->save(); + Log::debug(sprintf('Updated split journal #%d', $journal->id)); // unlink all categories: $journal->categories()->detach(); @@ -282,8 +283,6 @@ class JournalRepository implements JournalRepositoryInterface } Log::debug(sprintf('Could not store meta field "%s" with value "%s" for journal #%d', json_encode($key), json_encode($value), $journal->id)); } - - return $journal; } @@ -297,6 +296,7 @@ class JournalRepository implements JournalRepositoryInterface // store each transaction. $identifier = 0; + Log::debug(sprintf('Count %d transactions in updateSplitJournal()', count($data['transactions']))); foreach ($data['transactions'] as $transaction) { Log::debug(sprintf('Split journal update split transaction %d', $identifier)); $transaction = $this->appendTransactionData($transaction, $data); diff --git a/public/js/ff/rules/index.js b/public/js/ff/rules/index.js index ae0df5a282..133f770a98 100644 --- a/public/js/ff/rules/index.js +++ b/public/js/ff/rules/index.js @@ -58,11 +58,11 @@ function sortStop(event, ui) { }); if (parent.hasClass('rule-triggers')) { - $.post('rules/rules/trigger/reorder/' + ruleId, {_token: token, triggers: entries}).fail(function () { + $.post('rules/trigger/order/' + ruleId, {_token: token, triggers: entries}).fail(function () { alert('Could not re-order rule triggers. Please refresh the page.'); }); } else { - $.post('rules/rules/action/reorder/' + ruleId, {_token: token, actions: entries}).fail(function () { + $.post('rules/action/order/' + ruleId, {_token: token, actions: entries}).fail(function () { alert('Could not re-order rule actions. Please refresh the page.'); }); diff --git a/public/js/ff/split/journal/from-store.js b/public/js/ff/split/journal/from-store.js index 77856a0156..a6f8a1ef35 100644 --- a/public/js/ff/split/journal/from-store.js +++ b/public/js/ff/split/journal/from-store.js @@ -136,13 +136,13 @@ function resetSplits() { // ends with ][description] $.each($('input[name$="][description]"]'), function (i, v) { var input = $(v); - input.attr('name', 'transaction[' + i + '][description]'); + input.attr('name', 'transactions[' + i + '][description]'); console.log('description is now ' + input.attr('name')); }); // ends with ][destination_account_name] $.each($('input[name$="][destination_account_name]"]'), function (i, v) { var input = $(v); - input.attr('name', 'transaction[' + i + '][destination_account_name]'); + input.attr('name', 'transactions[' + i + '][destination_account_name]'); console.log('destination_account_name is now ' + input.attr('name')); }); // ends with ][source_account_name] @@ -154,19 +154,19 @@ function resetSplits() { // ends with ][amount] $.each($('input[name$="][amount]"]'), function (i, v) { var input = $(v); - input.attr('name', 'transaction[' + i + '][amount]'); + input.attr('name', 'transactions[' + i + '][amount]'); console.log('amount is now ' + input.attr('name')); }); // ends with ][budget_id] $.each($('input[name$="][budget_id]"]'), function (i, v) { var input = $(v); - input.attr('name', 'transaction[' + i + '][budget_id]'); + input.attr('name', 'transactions[' + i + '][budget_id]'); console.log('budget_id is now ' + input.attr('name')); }); // ends with ][category] $.each($('input[name$="][category]"]'), function (i, v) { var input = $(v); - input.attr('name', 'transaction[' + i + '][category]'); + input.attr('name', 'transactions[' + i + '][category]'); console.log('category is now ' + input.attr('name')); }); } diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 0240034055..2ebe1b7693 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -425,7 +425,6 @@ return [ 'stored_new_bill' => 'Stored new bill ":name"', 'cannot_scan_inactive_bill' => 'Inactive bills cannot be scanned.', 'rescanned_bill' => 'Rescanned everything.', - 'bill_date_little_relevance' => 'The only part of this date used by Firefly is the day. It is only useful when your bill arrives at exactly the same date every month. If the payment date of your bills varies, simply use the first of the month.', 'average_bill_amount_year' => 'Average bill amount (:year)', 'average_bill_amount_overall' => 'Average bill amount (overall)', diff --git a/resources/views/bills/create.twig b/resources/views/bills/create.twig index 85540186e4..eb1a970b22 100644 --- a/resources/views/bills/create.twig +++ b/resources/views/bills/create.twig @@ -20,7 +20,7 @@ {{ ExpandedForm.tags('match') }} {{ ExpandedForm.amount('amount_min') }} {{ ExpandedForm.amount('amount_max') }} - {{ ExpandedForm.date('date',phpdate('Y-m-d'), {helpText: trans('firefly.bill_date_little_relevance')}) }} + {{ ExpandedForm.date('date',phpdate('Y-m-d')) }} {{ ExpandedForm.select('repeat_freq',periods,'monthly') }} diff --git a/resources/views/bills/edit.twig b/resources/views/bills/edit.twig index f17c54a7f1..ed8d331b82 100644 --- a/resources/views/bills/edit.twig +++ b/resources/views/bills/edit.twig @@ -21,7 +21,7 @@ {{ ExpandedForm.tags('match') }} {{ ExpandedForm.amount('amount_min') }} {{ ExpandedForm.amount('amount_max') }} - {{ ExpandedForm.date('date',bill.date.format('Y-m-d'), {helpText: trans('firefly.bill_date_little_relevance')}) }} + {{ ExpandedForm.date('date',bill.date.format('Y-m-d')) }} {{ ExpandedForm.select('repeat_freq',periods) }}