|
@@ -52,51 +52,62 @@
|
|
|
<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
|
|
|
+ <div class="d-flex align-items-start flex-wrap justify-content-end">
|
|
|
+ @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-left text-warning-dark w-100">
|
|
|
+ <b>Cannot pay from your balance:</b> 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
|
|
|
+ @if(count($customer->paymentMethods))
|
|
|
+ <div moe relative class="mt-3 text-left ml-2">
|
|
|
+ <a href="#" start show class="btn btn-sm btn-primary text-white font-weight-bold py-2">Pay <b>${{$invoice->balance}}</b> from your credit card</a>
|
|
|
+ <form url="/api/financialTransaction/createForInvoice">
|
|
|
+ <p class="mb-2 text-left">Pay Invoice</p>
|
|
|
+ <input type="hidden" name="invoiceUid" value="{{$invoice->uid}}">
|
|
|
+ <input type="hidden" name="amount" value="{{$invoice->balance}}">
|
|
|
+ <input type="hidden" name="paymentLinkSlug" value="{{$invoice->payment_link_slug}}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-sm text-secondary mb-1">Payment Method</label>
|
|
|
+ <select name="paymentMethodUid" class="form-control form-control-sm" required>
|
|
|
+ <option value="">-- select --</option>
|
|
|
+ @foreach($customer->paymentMethods as $paymentMethod)
|
|
|
+ <option value="{{$paymentMethod->uid}}">{{strip_tags($paymentMethod->displayName())}}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </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>
|
|
|
+ @else
|
|
|
+ <div class="mt-3 border rounded border-secondary p-2 text-left text-warning-dark w-100">
|
|
|
+ You have not setup any payment methods yet. <a href="/ic/manageAccount/{{$customer->slug}}">Click here</a> to set one up.
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ </div>
|
|
|
@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>
|
|
|
+ @include('app.invoice-center.ic-rhs')
|
|
|
</div>
|
|
|
</div>
|
|
|
@endsection
|