Remove transactions now works.

This commit is contained in:
James Cole committed 2014-11-14 10:39:34 +01:00
1 parent 11280e473d
commit 78ab1e200a
2 files changed
+5 -5

No files matched your search

@@ -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;
}
/**
+3 -3
View File
@@ -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>