Remove transactions now works.

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

View File

@ -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;
}
/**

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>