2021-06-05 09:26:32 +00:00
|
|
|
@extends('layouts.main')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<!-- CONTENT HEADER -->
|
|
|
|
<section class="content-header">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<div class="col-sm-6">
|
2021-12-20 08:20:43 +00:00
|
|
|
<h1>{{ __('Store') }}</h1>
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
2023-01-14 22:34:10 +00:00
|
|
|
<li class="breadcrumb-item"><a class="" href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
|
2021-12-15 14:02:31 +00:00
|
|
|
<li class="breadcrumb-item"><a class="text-muted"
|
2021-12-20 08:20:43 +00:00
|
|
|
href="{{ route('store.index') }}">{{ __('Store') }}</a>
|
2021-12-13 01:48:02 +00:00
|
|
|
</li>
|
2021-06-05 09:26:32 +00:00
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<!-- END CONTENT HEADER -->
|
|
|
|
|
|
|
|
<!-- MAIN CONTENT -->
|
2023-01-14 22:34:10 +00:00
|
|
|
<section class="content">
|
2021-06-05 09:26:32 +00:00
|
|
|
<div class="container-fluid">
|
2023-04-25 07:22:30 +00:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
|
|
|
|
<form x-data="{ payment_method: '', clicked: false }" action="{{ route('payment.pay') }}" method="POST">
|
|
|
|
@csrf
|
|
|
|
@method('post')
|
|
|
|
<!-- Main content -->
|
|
|
|
<div class="invoice p-3 mb-3">
|
|
|
|
<!-- title row -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h4>
|
|
|
|
<i class="fas fa-globe"></i> {{ config('app.name', 'Laravel') }}
|
|
|
|
<small class="float-right">{{ __('Date') }}:
|
|
|
|
{{ Carbon\Carbon::now()->isoFormat('LL') }}</small>
|
2023-01-14 22:34:10 +00:00
|
|
|
</h4>
|
|
|
|
</div>
|
2023-04-25 07:22:30 +00:00
|
|
|
<!-- /.col -->
|
|
|
|
</div>
|
2023-03-28 13:28:26 +00:00
|
|
|
|
2023-04-25 07:22:30 +00:00
|
|
|
<!-- Table row -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 table-responsive">
|
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>{{ __('Quantity') }}</th>
|
|
|
|
<th>{{ __('Product') }}</th>
|
|
|
|
<th>{{ __('Description') }}</th>
|
|
|
|
<th>{{ __('Subtotal') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>1</td>
|
|
|
|
<td><i class="fa fa-coins mr-2"></i>{{ $product->quantity }}
|
|
|
|
{{ strtolower($product->type) == 'credits' ? CREDITS_DISPLAY_NAME : $product->type }}
|
|
|
|
</td>
|
|
|
|
<td>{{ $product->description }}</td>
|
|
|
|
<td>{{ $product->formatToCurrency($product->price) }}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<input type="hidden" name="product_id" value="{{ $product->id }}">
|
2023-03-28 00:00:43 +00:00
|
|
|
</div>
|
2023-04-25 07:22:30 +00:00
|
|
|
<!-- /.col -->
|
2023-03-28 13:28:26 +00:00
|
|
|
</div>
|
2023-04-25 07:22:30 +00:00
|
|
|
<!-- /.row -->
|
2023-03-28 13:28:26 +00:00
|
|
|
|
2023-04-25 07:22:30 +00:00
|
|
|
<div class="row">
|
|
|
|
<!-- accepted payments column -->
|
|
|
|
<div class="col-6">
|
|
|
|
@if (!$productIsFree)
|
|
|
|
<p class="lead">{{ __('Payment Methods') }}:</p>
|
2023-03-28 13:28:26 +00:00
|
|
|
|
2023-04-25 07:22:30 +00:00
|
|
|
<div class="d-flex flex-wrap flex-direction-row">
|
2023-03-28 13:28:26 +00:00
|
|
|
|
2023-04-25 07:22:30 +00:00
|
|
|
@foreach ($paymentGateways as $gateway)
|
|
|
|
<div class="ml-2">
|
|
|
|
<label class="text-center" for="{{ $gateway->name }}">
|
|
|
|
<img class="mb-3" height="50"
|
|
|
|
src="{{ $gateway->image }}"></br>
|
|
|
|
<input x-on:click="console.log(payment_method)"
|
|
|
|
x-model="payment_method" type="radio"
|
|
|
|
id="{{ $gateway->name }}" value="{{ $gateway->name }}">
|
|
|
|
</input>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
2023-03-28 13:28:26 +00:00
|
|
|
</div>
|
2023-04-25 07:22:30 +00:00
|
|
|
@endif
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
<div class="col-6">
|
|
|
|
<p class="lead">{{ __('Amount Due') }}
|
|
|
|
{{ Carbon\Carbon::now()->isoFormat('LL') }}</p>
|
2023-01-14 22:34:10 +00:00
|
|
|
|
2023-04-25 07:22:30 +00:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table">
|
2023-01-14 22:34:10 +00:00
|
|
|
@if ($discountpercent && $discountvalue)
|
2023-04-25 07:22:30 +00:00
|
|
|
<tr>
|
|
|
|
<th>{{ __('Discount') }} ({{ $discountpercent }}%):</th>
|
|
|
|
<td>{{ $product->formatToCurrency($discountvalue) }}</td>
|
|
|
|
</tr>
|
2023-01-14 22:34:10 +00:00
|
|
|
@endif
|
2023-04-25 07:22:30 +00:00
|
|
|
<tr>
|
|
|
|
<th style="width:50%">{{ __('Subtotal') }}:</th>
|
|
|
|
<td>{{ $product->formatToCurrency($discountedprice) }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>{{ __('Tax') }} ({{ $taxpercent }}%):</th>
|
|
|
|
<td>{{ $product->formatToCurrency($taxvalue) }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>{{ __('Total') }}:</th>
|
|
|
|
<td>{{ $product->formatToCurrency($total) }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
2023-03-28 13:28:26 +00:00
|
|
|
|
2023-04-25 07:22:30 +00:00
|
|
|
<!-- this row will not appear when printing -->
|
|
|
|
<div class="row no-print">
|
|
|
|
<div class="col-12">
|
|
|
|
<button :disabled="(!payment_method || clicked) && {{ !$productIsFree }}"
|
|
|
|
:class="(!payment_method || clicked) && {{ !$productIsFree }} ? 'disabled' : ''"
|
|
|
|
class="btn btn-success float-right"><i class="far fa-credit-card mr-2"
|
|
|
|
@click="clicked = true"></i>
|
|
|
|
@if ($productIsFree)
|
|
|
|
{{ __('Get for free') }}
|
|
|
|
@else
|
|
|
|
{{ __('Submit Payment') }}
|
|
|
|
@endif
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-25 07:22:30 +00:00
|
|
|
</form>
|
|
|
|
<!-- /.invoice -->
|
|
|
|
</div><!-- /.col -->
|
|
|
|
</div><!-- /.row -->
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<!-- END CONTENT -->
|
2023-01-14 22:34:10 +00:00
|
|
|
@endsection
|