|
@@ -62,7 +62,41 @@
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
@else
|
|
@else
|
|
- <div class="text-secondary">No invoices yet!</div>
|
|
|
|
|
|
+ <div class="text-secondary mb-3">No invoices yet!</div>
|
|
|
|
+ @endif
|
|
|
|
+ <div class="mb-3 font-weight-bold">Transactions</div>
|
|
|
|
+ @if(count($customer->customerTransactions))
|
|
|
|
+ <table class="table table-sm table-bordered">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Date</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Type</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Remarks</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Amount</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Starting Balance</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Ending Balance</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody class="font-weight-normal">
|
|
|
|
+ <?php
|
|
|
|
+ $totalAmount = 0;
|
|
|
|
+ $totalPaid = 0;
|
|
|
|
+ $totalBalance = 0;
|
|
|
|
+ ?>
|
|
|
|
+ @foreach($customer->customerTransactions as $transaction)
|
|
|
|
+ <tr>
|
|
|
|
+ <td>{{friendly_date($transaction->created_at)}}</td>
|
|
|
|
+ <td class="{{$transaction->plus_or_minus === 'PLUS' ? 'text-success' : 'text-warning-dark'}}">{{$transaction->plus_or_minus === 'PLUS' ? 'Credit' : 'Debit'}}</td>
|
|
|
|
+ <td>{{ sanitize_state_name($transaction->reason_type)}}</td>
|
|
|
|
+ <td class="{{$transaction->plus_or_minus === 'PLUS' ? 'text-success' : 'text-warning-dark'}}">${{!is_null($transaction->amount) ? $transaction->amount : 0}}</td>
|
|
|
|
+ <td>${{!is_null($transaction->starting_balance) ? $transaction->starting_balance : 0}}</td>
|
|
|
|
+ <td>${{!is_null($transaction->resulting_balance) ? $transaction->resulting_balance : 0}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-secondary">No transactions yet!</div>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 border-left">
|
|
<div class="col-md-4 border-left">
|