add payments by invoice

This commit is contained in:
ludo
2023-11-25 16:21:35 +01:00
parent 731c31a58c
commit 34f0b2796f
20 changed files with 579 additions and 215 deletions

View File

@@ -0,0 +1,16 @@
@extends('layout.index', [
'title' => __('invoices.title'),
'subtitle' => __('invoices.create.title'),
'breadcrumb' => [__('invoices.title'), __('invoices.create.title')]
])
@include('boilerplate::load.fileinput')
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Invoices.store', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
@include('Admin.Shop.Invoices.form')
@include('components.save')
</form>
@endsection

View File

@@ -0,0 +1,95 @@
@extends('layout.index', [
'title' => 'Factures',
'subtitle' => 'Edition d\'une facture',
'breadcrumb' => ['Articles'],
])
@include('boilerplate::load.fileinput')
@section('content')
<div class="row">
<div class="col-8">
{{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $invoice['id'] }}">
<x-card>
<div class="row">
<div class="col-6">
<h4> </h4>
</div>
<div class="col-6 text-right">
@include('components.form.buttons.button-save')
</div>
</div>
<div class="row mb-3">
<div class="col-6">
<h3>
{{ $invoice['order']['customer']['last_name'] }}
{{ $invoice['order']['customer']['first_name'] }}
</h3>
<div class="row">
<div class="col-12">
<h6>
@if ($invoice['order']['delivery_address'])
{{ $invoice['order']['delivery_address']['address'] }}<br />
@isset($invoice['order']['delivery_address']['address2'])
{{ $invoice['order']['delivery_address']['address2'] }}<br />
@endisset
{{ $invoice['order']['delivery_address']['zipcode'] }}
{{ $invoice['order']['delivery_address']['city'] }}<br />
@endif
</h6>
</div>
</div>
</div>
<div class="col-6">
<div class="row mb-3">
<div class="col-6" style="font-size: 1.2em; font-weight: 500;">
Facture {{ $invoice['ref'] }}<br />
du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
</div>
<div class="col-6">
</div>
</div>
<div class="row mb-3">
<div class="col-6">
@include('components.form.select', [
'label' => 'Statut',
'name' => 'status',
'list' => $statuses ?? [],
'value' => $invoice['status'],
'class' => 'select2',
])
</div>
<div class="col-6">
@include('components.form.select', [
'label' => 'Règlement',
'name' => 'payment_type',
'list' => $payment_types ?? [],
'value' => $invoice['order']['payment_type'],
'class' => 'select2',
'disabled' => false,
])
</div>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
@include('Admin.Shop.Orders.partials.detail', [
'detail_type' => 'facture',
'order' => $invoice['order'],
])
</div>
</div>
</x-card>
</form>
</div>
<div class="col-4">
<x-card>
<h4>Règlements</h4>
</x-card>
</div>
</div>
@endsection

View File

@@ -0,0 +1,26 @@
<div class="row">
<div class="col-6">
@include('components.form.select', [
'label' => 'Règlement',
'name' => 'payment_type',
'list' => $payment_types ?? [],
'value' => $invoice_payment['payment_type'],
'class' => 'select2',
])
</div>
<div class="col-6">
@include('components.form.input', [
'label' => 'Montant',
'name' => 'amount',
'value' => $invoice_payment['amount'],
])
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="float-right mt-3">
@include('components.form.buttons.button-save')
</div>
</div>
</div>

View File

@@ -0,0 +1,14 @@
@extends('layout.index', [
'title' => __('shop.invoice_payments.title'),
'subtitle' => __('shop.invoice_payments.list'),
'breadcrumb' => [__('shop.invoice_payments.title')],
])
@section('content')
<x-card>
@include('components.datatable', [
'route' => route('Admin.Shop.InvoicePayments.index'),
'model' => 'invoice_payments',
])
</x-card>
@endsection

View File

@@ -0,0 +1,4 @@
@include('components.datatable', [
'route' => route('Admin.Shop.InvoicePayments.index'),
'model' => 'invoice_payments',
])

View File

@@ -0,0 +1,36 @@
@extends('layout.index', [
'title' => __('products.title'),
'subtitle' => __('products.title'),
'breadcrumb' => [__('products.title')]
])
@section('content')
<form action="{{ route('Shop.Products') }}" method="GET">
<div class="row">
<div class="col-md-offset-2 col-md-8">
<div class="box box-info">
<div class="box-body">
<div class="col-md-6">
<h3>{{ name }}</h3>
<h4>
{{ $product.section.name }}<br>
</h4>
</div>
<div class="col-md-6 text-right">
<h2>{{ $prix_total }} </h2>
<h4>{{ $residence['type_produit']['name'] }}</h4>
</div>
<div class="col-md-12">
@include('Hestimmo.modules.Lot.partials.carousel')
</div>
</div>
</div>
</div>
</div>
</form>
@endsection