|
@@ -0,0 +1,96 @@
|
|
|
|
+@extends ('layouts.guest_template')
|
|
|
|
+@section('content')
|
|
|
|
+<div class="container mcp-theme-1">
|
|
|
|
+ <h3 class="font-size-16 font-weight-bold my-3 text-dark">Invoice</h3>
|
|
|
|
+ <hr>
|
|
|
|
+ <div class="row">
|
|
|
|
+ <div class="col-md-8">
|
|
|
|
+ <div class="mb-3">Hi <b class="text-dark">{{$customer->client->displayName()}}</b>, please find your invoice below:</div>
|
|
|
|
+ <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">Company</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Particulars</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Total</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Paid</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary bg-light">Due</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody class="font-weight-normal">
|
|
|
|
+ <tr>
|
|
|
|
+ <td>{{friendly_date($invoice->created_at)}}</td>
|
|
|
|
+ <td>{{$company->name}}</td>
|
|
|
|
+ <td>{{$invoice->description}}</td>
|
|
|
|
+ <td class="font-weight-bold text-dark">${{!is_null($invoice->amount) ? $invoice->amount : 0}}</td>
|
|
|
|
+ <td class="font-weight-bold text-success">${{!is_null($invoice->paid) ? $invoice->paid : 0}}</td>
|
|
|
|
+ <td class="font-weight-bold text-warning-dark">${{!is_null($invoice->balance) ? $invoice->balance : 0}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="p-3 text-right" colspan="6">
|
|
|
|
+ <div class="d-flex justify-content-end align-items-baseline mb-2">
|
|
|
|
+ <span class="text-secondary">Total Amount: </span>
|
|
|
|
+ <span class="width-50px text-left text-secondary font-weight-bold pl-2">${{!is_null($invoice->amount) ? $invoice->amount : 0}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex justify-content-end align-items-baseline mb-2">
|
|
|
|
+ <span class="text-secondary">Total Paid: </span>
|
|
|
|
+ <span class="width-50px text-left text-secondary font-weight-bold pl-2">${{!is_null($invoice->paid) ? $invoice->paid : 0}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex justify-content-end align-items-baseline">
|
|
|
|
+ <span class="font-weight-bold text-secondary">Total Due: </span>
|
|
|
|
+ <span class="width-50px text-left font-weight-bold pl-2 font-size-14">${{!is_null($invoice->balance) ? $invoice->balance : 0}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @if($invoice->balance <= 0)
|
|
|
|
+ <div class="mt-3 border rounded border-success p-2 text-center">
|
|
|
|
+ <i class="fa fa-check text-success"></i>
|
|
|
|
+ <span class="text-success">PAID</span>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ @if($customer->customer_balance >= $invoice->balance)
|
|
|
|
+ <div moe relative class="mt-3">
|
|
|
|
+ <a href="#" start show class="btn btn-sm btn-primary text-white font-weight-bold py-2">Pay <b>${{$invoice->balance}}</b> from your current balance (${{$customer->customer_balance}})</a>
|
|
|
|
+ <form url="/api/invoiceTransaction/createPlusForCustomerTransaction">
|
|
|
|
+ <p class="mb-2 text-left">Confirm Payment?</p>
|
|
|
|
+ <input type="hidden" name="invoiceUid" value="{{$invoice->uid}}">
|
|
|
|
+ <input type="hidden" name="amount" value="{{$invoice->balance}}">
|
|
|
|
+ <input type="hidden" name="customMemo" value="Payment by customer via balance">
|
|
|
|
+ <div class="text-left">
|
|
|
|
+ <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
|
|
|
|
+ <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div class="mt-3 border rounded border-secondary p-2 text-center text-warning-dark">
|
|
|
|
+ Your current balance (${{$customer->customer_balance}}) is less than the due amount (${{$invoice->balance}}). If you have a gift card, use its code on the right hand side to add funds to your balance.
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-md-4 border-left">
|
|
|
|
+ <div class="mb-3">
|
|
|
|
+ <span class="font-weight-bold text-secondary">Current Balance: </span>
|
|
|
|
+ <span class="font-weight-bold text-dark">${{!is_null($customer->customer_balance) ? $customer->customer_balance : 0}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <h3 class="font-weight-bold mb-2 text-secondary">Redeem Gift Card</h3>
|
|
|
|
+ <div moe>
|
|
|
|
+ <form url="/api/giftCard/redeem" show>
|
|
|
|
+ <input type="hidden" name="customerUid" value="{{$customer->uid}}">
|
|
|
|
+ <p class="mb-2">If you have a gift card from {{$company->name}}, please enter its code below:</p>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input type="text" name="code" placeholder="Code" class="form-control form-control-sm">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="text-left">
|
|
|
|
+ <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
|
|
|
|
+ <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+@endsection
|