Skip to content

Firefly III: a personal finances manager

Remove transactions now works.

James Cole78ab1e200a2a
diff --git a/app/lib/FireflyIII/Database/TransactionJournal.php b/app/lib/FireflyIII/Database/TransactionJournal.php
index 7837e62b4b..55d4c0ac9e 100644
--- a/app/lib/FireflyIII/Database/TransactionJournal.php
+++ b/app/lib/FireflyIII/Database/TransactionJournal.php
@@ -37,8 +37,8 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
*/
public function destroy(Ardent $model)
{
- // TODO: Implement destroy() method.
- throw new NotImplementedException;
+ $model->delete();
+ return true;
}
/**
diff --git a/app/views/transactions/delete.blade.php b/app/views/transactions/delete.blade.php
index 5bda69d486..0b74af5b55 100644
--- a/app/views/transactions/delete.blade.php
+++ b/app/views/transactions/delete.blade.php
@@ -23,13 +23,13 @@
<div class="btn-group">
<input type="submit" name="submit" value="Delete transaction" class="btn btn-danger" />
@if($journal->transactiontype->type == 'Withdrawal')
- <a href="{{route('transactions.expenses')}}" class="btn-default btn">Cancel</a>
+ <a href="{{route('transactions.index','withdrawal')}}" class="btn-default btn">Cancel</a>
@endif
@if($journal->transactiontype->type == 'Deposit')
- <a href="{{route('transactions.revenue')}}" class="btn-default btn">Cancel</a>
+ <a href="{{route('transactions.index','deposit')}}" class="btn-default btn">Cancel</a>
@endif
@if($journal->transactiontype->type == 'Transfer')
- <a href="{{route('transactions.transfers')}}" class="btn-default btn">Cancel</a>
+ <a href="{{route('transactions.index','transfers')}}" class="btn-default btn">Cancel</a>
@endif
</div>
</div>