Fixes on prices & add ArticlePriceGeneric
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('article_price_generics.title'),
|
||||
'subtitle' => __('article_price_generics.create.title'),
|
||||
'breadcrumb' => [__('article_price_generics.title'), __('article_price_generics.create.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.ArticlePriceGenerics.store', 'id' => 'article-price-generic-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Shop.Admin.ArticlePriceGenerics.index") }}" class="btn btn-default">
|
||||
{{ __('article_price_generics.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Admin.ArticlePriceGenerics.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('article_price_generics.title'),
|
||||
'subtitle' => __('article_price_generics.edit.title'),
|
||||
'breadcrumb' => [__('article_price_generics.title'), __('article_price_generics.edit.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.ArticlePriceGenerics.update', 'id' => 'article-price-generic-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
<input type="hidden" name="id" value="{{ $generic['id'] }}">
|
||||
@include('Shop.Admin.ArticlePriceGenerics.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.input', ['name' => 'name', 'value' => $generic['name'] ?? null, 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ Form::label('tax_id', 'TVA') }}
|
||||
@include('components.select', ['name' => 'tax_id', 'value' => $generic['tax_id'] ?? null, 'list' => $taxes ?? null, 'class' => 'tva', 'required' => true])
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.input', ['name' => 'price', 'value' => $generic['price'] ?? null, 'class' => 'price', 'required' => true])
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.input', ['name' => 'price_taxed', 'value' => $generic['price_taxed'] ?? null, 'class' => 'price_taxed', 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="float-right mt-3">
|
||||
@include('components.button-save')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
function set_price(item) {
|
||||
$row = $(item).parent();
|
||||
tva = $row.find('.tva').val();
|
||||
price_taxed = $row.find('.price_taxed').val();
|
||||
console.log(tva);
|
||||
console.log(price_taxed);
|
||||
}
|
||||
|
||||
function set_price_taxed(item) {
|
||||
$row = $(item).parent();
|
||||
tva = $row.find('.tva').val();
|
||||
price = $row.find('.price').val();
|
||||
console.log(tva);
|
||||
console.log(price);
|
||||
}
|
||||
|
||||
$('.price_taxed').change(function() {
|
||||
set_price(this);
|
||||
});
|
||||
|
||||
$('.price').change(function() {
|
||||
set_price_taxed(this);
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,8 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('article_price_generics.title'),
|
||||
'subtitle' => __('article_price_generics.list.title'),
|
||||
'breadcrumb' => [__('article_price_generics.title')]
|
||||
])
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticlePriceGenerics.index'), 'model' => 'article-price-generics'])
|
||||
@endsection
|
||||
@@ -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
|
||||
@@ -27,7 +27,7 @@
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#stock" class="nav-link" data-toggle="tab" aria-expanded="true">
|
||||
Quantités
|
||||
Stock
|
||||
@if(isset($stock_count))<span class="badge">{{ $stock_count }}</span>@endif
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
'value' => $attribute['attribute_value']['article_attribute_family_id'] ?? null,
|
||||
'list' => $attribute_families_options,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control form-control-sm attributes-family'
|
||||
'class' => 'select2 form-control-sm attributes-family'
|
||||
])
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
'value' => $attribute['article_attribute_value_id'] ?? null,
|
||||
'list' => $attribute_values ?? null,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control form-control-sm attributes-value',
|
||||
'class' => 'select2 form-control-sm attributes-value',
|
||||
'meta' => (isset($attribute['article_attribute_value_id'])) ? 'data-id="' . $attribute['article_attribute_value_id'] . '"' : ''
|
||||
])
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
'value' => $attribute_value['article_attribute_family_id'] ?? null,
|
||||
'list' => $attribute_families_options,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control form-control-sm attributes-family'
|
||||
'class' => 'select2 form-control-sm attributes-family'
|
||||
])
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
'value' => $attribute_value['id'] ?? null,
|
||||
'list' => $attribute_values ?? null,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control form-control-sm attributes-value'
|
||||
'class' => 'select2 form-control-sm attributes-value'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('quantity', 'Qté.') }}<br/>
|
||||
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => (isset($price['quantity'])) ? $price['quantity'] : 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
@@ -18,24 +18,24 @@
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="col-2">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => (isset($price['tax_id'])) ? $price['tax_id'] : null, 'list' => isset($taxes_options) ? $taxes_options : null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="col-4">
|
||||
{{ Form::label('generic_price_id', 'Générique') }}<br/>
|
||||
@include('components.select', ['name' => "prices[$key][generic_price_id]", 'value' => (isset($price['generic_price_id'])) ? $price['generic_price_id'] : null, 'list' => ['Tarif barquette','Tarif semences'], 'required' => false, 'class' => 'form-control-sm'])
|
||||
@include('components.select', ['name' => "prices[$key][article_generic_price_id]", 'value' => $price['article_generic_price_id'] ?? null, 'list' => ['Tarif barquette','Tarif semences'], 'required' => false, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => "prices[$key][price]", 'value' => (isset($price['price'])) ? $price['price'] : 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => (isset($price['price_taxed'])) ? $price['price_taxed'] : 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
@include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,26 +9,34 @@
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('quantity', 'Quantité') }}<br/>
|
||||
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => (isset($quantity)) ? $quantity : 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5">
|
||||
<div class="col-lg-4">
|
||||
@include('Shop.Admin.Articles.partials.prices.block_attribute_new')
|
||||
</div>
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][tax_id]', 'value' => (isset($tax_id)) ? $tax_id : null, 'list' => isset($taxes_options) ? $taxes_options : null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
|
||||
<div class="col-lg-2">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => 'prices[0][price]', 'value' => (isset($price)) ? $price : 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
<div class="col-2">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => 'prices[0][price_taxed]', 'value' => (isset($price_taxed)) ? $price_taxed : 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
<div class="col-4">
|
||||
{{ Form::label('generic_price_id', 'Générique') }}<br/>
|
||||
@include('components.select', ['name' => "prices[0][article_generic_price_id]", 'value' => $price['article_generic_price_id'] ?? null, 'list' => ['Tarif barquette','Tarif semences'], 'required' => false, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-1 text-right">
|
||||
|
||||
Reference in New Issue
Block a user