|
@@ -0,0 +1,144 @@
|
|
|
+@if($pro->pro_type === 'ADMIN')
|
|
|
+<div class="p-3 border-bottom screen-only" data-non-segment-section="Payments">
|
|
|
+ <div>
|
|
|
+ <h2 class="d-inline-block font-weight-bold text-secondary">Payments Received</h2>
|
|
|
+ <div moe class="ml-1 d-inline-block">
|
|
|
+ <a class="text-danger" href="" show start><i class="fa fa-plus"></i> Add payment received</a>
|
|
|
+ <form url="/api/receivedPayment/createForNote">
|
|
|
+ <input type="hidden" name="noteUid" value="{{$note->uid}}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="mb-1 text-secondary">Source</label>
|
|
|
+ <input type="text" name="source" placeholder="Source"
|
|
|
+ class="form-control form-control-sm"></input>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="mb-1 text-secondary">Source memo</label>
|
|
|
+ <textarea type="text" name="sourceMemo" placeholder="Source memo"
|
|
|
+ class="form-control form-control-sm"></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="mb-1 text-secondary">Amount</label>
|
|
|
+ <input type="number" step=".01" name="amount" placeholder="amount"
|
|
|
+ class="form-control form-control-sm"></input>
|
|
|
+ </div>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="d-flex justify-content-center align-items-start">
|
|
|
+ <table class="mr-2 w-75 flex-grow-1 table-bordered table-condensed table-sm table-striped">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Source</th>
|
|
|
+ <th>Source Memo</th>
|
|
|
+ <th>Amount</th>
|
|
|
+ <th></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($note->receivedPayments as $rp)
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">
|
|
|
+ {{$rp->source}}
|
|
|
+ <div moe class="ml-1 d-inline-block">
|
|
|
+ <a class="text-danger" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
+ <form url="/api/receivedPayment/updateSource">
|
|
|
+ <input type="hidden" name="uid" value="{{$rp->uid}}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="mb-1 text-secondary">Source</label>
|
|
|
+ <input type="text" name="source" placeholder="Source" value="{{$rp->source}}"
|
|
|
+ class="form-control form-control-sm"></input>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="mb-1 text-secondary">Source memo</label>
|
|
|
+ <textarea type="text" name="sourceMemo" placeholder="Source memo"
|
|
|
+ class="form-control form-control-sm">{{$rp->source_memo}}</textarea>
|
|
|
+ </div>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>{{$rp->source_memo}}</td>
|
|
|
+ <td>${{friendly_money($rp->amount)}}</td>
|
|
|
+ <td>
|
|
|
+ @if($rp->is_active)
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ <div moe class="ml-1 d-inline-block">
|
|
|
+ <a class="text-danger" href="" show start> Deactivate</a>
|
|
|
+ <form url="/api/receivedPayment/deactivate">
|
|
|
+ <input type="hidden" name="uid" value="{{$rp->uid}}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="mb-1 text-secondary">Memo</label>
|
|
|
+ <textarea type="text" name="memo" placeholder="Source memo"
|
|
|
+ class="form-control form-control-sm"></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ @else
|
|
|
+ <i class="fa fa-cancel"></i>
|
|
|
+ <div moe class="ml-1 d-inline-block">
|
|
|
+ <a class="text-danger" href="" show start> Reactivate</a>
|
|
|
+ <form url="/api/receivedPayment/reactivate">
|
|
|
+ <input type="hidden" name="uid" value="{{$rp->uid}}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="mb-1 text-secondary">Memo</label>
|
|
|
+ <textarea type="text" name="memo" placeholder="Source memo"
|
|
|
+ class="form-control form-control-sm"></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <table class="w-25 flex-grow-1 table-bordered table-condensed table-sm table-striped">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">Bill Total Exp.</td>
|
|
|
+ <td>${{friendly_money($note->bill_total_expected)}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">Is Billing Closed</td>
|
|
|
+ <td>{{$note->is_bill_closed ? 'Yes' : 'No'}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">Bill Summary</td>
|
|
|
+ <td>{{$note->bill_summary ? $note->bill_summary : '-'}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">Bill Total Paid</td>
|
|
|
+ <td>${{friendly_money($note->bill_total_paid)}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">Billing Closed At</td>
|
|
|
+ <td>{{friendlier_date_time($note->bill_closed_at)}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">Payments Received Total</td>
|
|
|
+ <td>{{friendly_money($note->received_payments_total)}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary">Gross margin</td>
|
|
|
+ <td>{{friendly_money($note->gross_margin)}}</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+@endif
|