|
|
@@ -14,15 +14,15 @@
|
|
|
|
|
|
<div class="filter--item_formElement">
|
|
|
<div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
- <input class="form-check-input" type="radio" value="0" name="filterCommercial" checked>
|
|
|
+ <input class="form-check-input" type="radio" value="0" name="filterCommercial" onclick="setFilterCommercial(0)">
|
|
|
<label class="form-check-label ms-2" for="inlineCheckbox1">Entrambe</label>
|
|
|
</div>
|
|
|
<div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
- <input class="form-check-input" type="radio" value="1" name="filterCommercial" >
|
|
|
+ <input class="form-check-input" type="radio" value="1" name="filterCommercial" onclick="setFilterCommercial(1)">
|
|
|
<label class="form-check-label ms-2" for="inlineCheckbox1">Commerciale</label>
|
|
|
</div>
|
|
|
<div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
- <input class="form-check-input" type="radio" value="2" name="filterCommercial">
|
|
|
+ <input class="form-check-input" type="radio" value="2" name="filterCommercial" onclick="setFilterCommercial(2)">
|
|
|
<label class="form-check-label ms-2" for="inlineCheckbox1">Non commerciale</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -177,11 +177,11 @@
|
|
|
<div class="input-group mb-12">
|
|
|
<div class="check--invoice d-flex align-items-center">
|
|
|
<div class="form-check me-3">
|
|
|
- <input class="form-check-input" type="radio" value="1" wire:model="commercial" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <input class="form-check-input" type="radio" value="1" wire:model="commercial" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
<label class="form-check-label" for="flexCheckChecked"> Commerciale</label>
|
|
|
</div>
|
|
|
<div class="form-check">
|
|
|
- <input class="form-check-input" type="radio" value="0" wire:model="commercial" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <input class="form-check-input" type="radio" value="0" wire:model="commercial" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
<label class="form-check-label" for="flexCheck"> Non Commerciale</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -191,7 +191,7 @@
|
|
|
<div class="col-md-6 mt-3">
|
|
|
<span class="title-form d-block w-100">Data pagamento</span>
|
|
|
<div class="input-group mb-3">
|
|
|
- <input id="date" type="date" class="form-control" wire:model="date" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <input id="date" type="date" class="form-control" wire:model="date" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-md-6"> </div>
|
|
|
@@ -199,7 +199,7 @@
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
<span class="title-form d-block w-100">Persona</span>
|
|
|
- <select name="member_id" class="form-select memberClass @error('member_id') is-invalid @enderror" aria-label="Seleziona una persona" wire:model="member_id" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <select name="member_id" class="form-select memberClass @error('member_id') is-invalid @enderror" aria-label="Seleziona una persona" wire:model="member_id" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
<option value="">--Seleziona--
|
|
|
@foreach($members as $member)
|
|
|
<option value="{{$member->id}}">{{$member->last_name}} {{$member->first_name}} ({{$member->fiscal_code}})
|
|
|
@@ -209,7 +209,7 @@
|
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
|
@enderror
|
|
|
<br><br>
|
|
|
- @if($this->dataId == 0)
|
|
|
+ @if($this->dataId == 0 && !$isDuplicate)
|
|
|
<button type="button" class="btn--ui primary" data-bs-toggle="modal" data-bs-target="#userModal">
|
|
|
Aggiungi
|
|
|
</button>
|
|
|
@@ -234,226 +234,283 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="row gx-2 mt-3">
|
|
|
- <span class="title-form d-block w-100">Pagamento</span>
|
|
|
+ @if($commercial)
|
|
|
|
|
|
- <div class="col-md-12" >
|
|
|
+ <br>
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
|
- <select name="payment_method_id" class="form-select paymentClass @error('payment_method_id') is-invalid @enderror" aria-label="Seleziona un metodo di pagamento" wire:model="payment_method_id" style="width:100%">
|
|
|
- <option value="">--Seleziona--
|
|
|
- @foreach($payments as $payment)
|
|
|
- <option value="{{$payment->id}}">{{$payment->name}}
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- @error('payment_method_id')
|
|
|
- <div class="invalid-feedback">{{ $message }}</div>
|
|
|
- @enderror
|
|
|
+ <div class="input-group mb-12">
|
|
|
+ <div class="check--invoice d-flex align-items-center">
|
|
|
+ <div class="form-check me-3">
|
|
|
+ <input class="form-check-input" id="corrispettivo_fiscale" type="checkbox" wire:model="corrispettivo_fiscale" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <label class="form-check-label" for="flexCheckChecked"> Corrispettivo fiscale</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- @foreach($rows as $idx => $row)
|
|
|
+ @endif
|
|
|
|
|
|
- <div class="row gx-2 mt-3" >
|
|
|
- <span class="title-form d-block w-100">Causale</span>
|
|
|
- <div class="col-md-12">
|
|
|
+ @if($corrispettivo_fiscale)
|
|
|
|
|
|
- @if($this->dataId > 0)
|
|
|
- {{$this->getCausal($rows[$idx]['causal_id'])}}<br>
|
|
|
- @else
|
|
|
- <livewire:causals :type="$typeIN" :idx="$idx" :causal_id="$rows[$idx]['causal_id']" :wire:key="$idx"/>
|
|
|
+ @if ($this->dataId > 0)
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-9 mt-3">
|
|
|
+ {{$this->getPaymentMethod($payment_method_id)}}
|
|
|
+ </div>
|
|
|
+ <div class="col-md-3 mt-3">
|
|
|
+ {{formatPrice($amount)}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ @else
|
|
|
+ @foreach($payments as $payment)
|
|
|
+ @if($payment->corrispettivo_fiscale)
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-9 mt-3">
|
|
|
+ {{$payment->name}}
|
|
|
+ </div>
|
|
|
+ <div class="col-md-3 mt-3">
|
|
|
+ <input type="text" class="form-control totalInput text-end" id="corrispettivo_{{$payment->id}}" wire:model="corrispettivo.{{$payment->id}}" onkeyup="onlyNumberAmount(this)" placeholder="€ 0,00">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
@endif
|
|
|
+ @endforeach
|
|
|
|
|
|
- @error('rows.'. $idx . '.causal_id')
|
|
|
- <span style="argin-top: 0.25rem; font-size: 0.875em; color: var(--bs-form-invalid-color);">{{ $message }}</span>
|
|
|
- @enderror
|
|
|
-
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-9 mt-3" style="font-size: 18px;font-weight: bold;">
|
|
|
+ <b>Totale</b>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-3 mt-3" style="text-align:right;font-size: 18px;font-weight: bold;">
|
|
|
+ <b>{{$this->getTotalCorrispettivo()}}</b>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ @endif
|
|
|
+
|
|
|
+
|
|
|
+ @else
|
|
|
|
|
|
<div class="row gx-2 mt-3">
|
|
|
- <span class="title-form d-block w-100">Dettaglio causale</span>
|
|
|
- <div class="col-md-12">
|
|
|
- <input class="form-control " id="causal_detail_{{$idx}}" type="text" placeholder="Dettaglio causale" wire:model="rows.{{$idx}}.note" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <span class="title-form d-block w-100">Pagamento</span>
|
|
|
+
|
|
|
+ <div class="col-md-12" >
|
|
|
+
|
|
|
+ <select name="payment_method_id" class="form-select paymentClass @error('payment_method_id') is-invalid @enderror" aria-label="Seleziona un metodo di pagamento" wire:model="payment_method_id" style="width:100%">
|
|
|
+ <option value="">--Seleziona--
|
|
|
+ @foreach($payments as $payment)
|
|
|
+ <option value="{{$payment->id}}">{{$payment->name}}
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ @error('payment_method_id')
|
|
|
+ <div class="invalid-feedback">{{ $message }}</div>
|
|
|
+ @enderror
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="row gx-2 mt-3 align-items-center">
|
|
|
- <div class="col-md-6">
|
|
|
- <span class="total primary">Importo</span>
|
|
|
+ @foreach($rows as $idx => $row)
|
|
|
+
|
|
|
+ <div class="row gx-2 mt-3" >
|
|
|
+ <span class="title-form d-block w-100">Causale</span>
|
|
|
+ <div class="col-md-12">
|
|
|
+
|
|
|
+ @if($this->dataId > 0 && !$isDuplicate)
|
|
|
+ {{$this->getCausal($rows[$idx]['causal_id'])}}<br>
|
|
|
+ @else
|
|
|
+ <livewire:causals :type="$typeIN" :idx="$idx" :causal_id="$rows[$idx]['causal_id']" :wire:key="$idx"/>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ @error('rows.'. $idx . '.causal_id')
|
|
|
+ <span style="argin-top: 0.25rem; font-size: 0.875em; color: var(--bs-form-invalid-color);">{{ $message }}</span>
|
|
|
+ @enderror
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- @if ($commercial)
|
|
|
- <div class="col-md-3">
|
|
|
- <select id="rows.{{$idx}}.vat_id" class="form-select" wire:model="rows.{{$idx}}.vat_id">
|
|
|
- <option value="0">
|
|
|
- @foreach($vats as $vat)
|
|
|
- <option value="{{$vat->id}}">{{$vat->name}}
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
+
|
|
|
+ <div class="row gx-2 mt-3">
|
|
|
+ <span class="title-form d-block w-100">Dettaglio causale</span>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <input class="form-control " id="causal_detail_{{$idx}}" type="text" placeholder="Dettaglio causale" wire:model="rows.{{$idx}}.note" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
</div>
|
|
|
- @else
|
|
|
- <div class="col-md-3"></div>
|
|
|
- @endif
|
|
|
- <div class="col-md-3">
|
|
|
- @if($add)
|
|
|
- <input type="text" class="form-control totalInput text-end @error('amount') is-invalid @enderror" id="rows.{{$idx}}.amount" wire:model="rows.{{$idx}}.amount" wire:keydown.enter="store(false)" onkeyup="onlyNumberAmount(this)" placeholder="€ 0,00" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
- @endif
|
|
|
- @if($update)
|
|
|
- <input type="text" class="form-control totalInput text-end @error('amount') is-invalid @enderror" id="rows.{{$idx}}.amount" placeholder="€ 0,00" wire:model="rows.{{$idx}}.amount" onkeyup="onlyNumberAmount(this)" wire:keydown.enter="update(false)" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
- @endif
|
|
|
- @error('rows.'. $idx . '.amount')
|
|
|
- <span style="argin-top: 0.25rem; font-size: 0.875em; color: var(--bs-form-invalid-color);">{{ $message }}</span>
|
|
|
- @enderror
|
|
|
</div>
|
|
|
|
|
|
- </div>
|
|
|
+ <div class="row gx-2 mt-3 align-items-center">
|
|
|
+ <div class="col-md-6">
|
|
|
+ <span class="total primary">Importo</span>
|
|
|
+ </div>
|
|
|
+ @if ($commercial)
|
|
|
+ <div class="col-md-3">
|
|
|
+ <select id="rows.{{$idx}}.vat_id" class="form-select" wire:model="rows.{{$idx}}.vat_id">
|
|
|
+ <option value="0">
|
|
|
+ @foreach($vats as $vat)
|
|
|
+ <option value="{{$vat->id}}">{{$vat->name}}
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ @else
|
|
|
+ <div class="col-md-3"></div>
|
|
|
+ @endif
|
|
|
+ <div class="col-md-3">
|
|
|
+ @if($add)
|
|
|
+ <input type="text" class="form-control totalInput text-end @error('amount') is-invalid @enderror" id="rows.{{$idx}}.amount" wire:model="rows.{{$idx}}.amount" wire:keydown.enter="store(false)" onkeyup="onlyNumberAmount(this)" onchange="setChangedAmount()" placeholder="€ 0,00" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ @endif
|
|
|
+ @if($update)
|
|
|
+ <input type="text" class="form-control totalInput text-end @error('amount') is-invalid @enderror" id="rows.{{$idx}}.amount" placeholder="€ 0,00" wire:model="rows.{{$idx}}.amount" onkeyup="onlyNumberAmount(this)" onchange="setChangedAmount()" wire:keydown.enter="update(false)" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ @endif
|
|
|
+ @error('rows.'. $idx . '.amount')
|
|
|
+ <span style="argin-top: 0.25rem; font-size: 0.875em; color: var(--bs-form-invalid-color);">{{ $message }}</span>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="row gx-2 mt-3 align-items-center">
|
|
|
- <div class="col-md-4">
|
|
|
- <span class="total primary">Competenza</span>
|
|
|
</div>
|
|
|
- <div class="col-md-8">
|
|
|
- <div class="row">
|
|
|
-
|
|
|
- @if($multiP)
|
|
|
- <div class="row" style="background-color:lightGrey">
|
|
|
- <h4>Seleziona inizio e fine multiperiodo</h4>
|
|
|
- <div class="col-md-3">
|
|
|
- <span class="title-form d-block w-100">Dal mese</span>
|
|
|
- <div class="input-group mb-3">
|
|
|
- <select class="form-select form-select-lg me-1" wire:model="multiMonthFrom" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
- <option value="1">Gennaio</option>
|
|
|
- <option value="2">Febbraio</option>
|
|
|
- <option value="3">Marzo</option>
|
|
|
- <option value="4">Aprile</option>
|
|
|
- <option value="5">Maggio</option>
|
|
|
- <option value="6">Giugno</option>
|
|
|
- <option value="7">Luglio</option>
|
|
|
- <option value="8">Agosto</option>
|
|
|
- <option value="9">Settembre</option>
|
|
|
- <option value="10">Ottobre</option>
|
|
|
- <option value="11">Novembre</option>
|
|
|
- <option value="12">Dicembre</option>
|
|
|
- </select>
|
|
|
+
|
|
|
+ <div class="row gx-2 mt-3 align-items-center">
|
|
|
+ <div class="col-md-4">
|
|
|
+ <span class="total primary">Competenza</span>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-8">
|
|
|
+ <div class="row">
|
|
|
+
|
|
|
+ @if($multiP)
|
|
|
+ <div class="row" style="background-color:lightGrey">
|
|
|
+ <h4>Seleziona inizio e fine multiperiodo</h4>
|
|
|
+ <div class="col-md-3">
|
|
|
+ <span class="title-form d-block w-100">Dal mese</span>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <select class="form-select form-select-lg me-1" wire:model="multiMonthFrom" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <option value="1">Gennaio</option>
|
|
|
+ <option value="2">Febbraio</option>
|
|
|
+ <option value="3">Marzo</option>
|
|
|
+ <option value="4">Aprile</option>
|
|
|
+ <option value="5">Maggio</option>
|
|
|
+ <option value="6">Giugno</option>
|
|
|
+ <option value="7">Luglio</option>
|
|
|
+ <option value="8">Agosto</option>
|
|
|
+ <option value="9">Settembre</option>
|
|
|
+ <option value="10">Ottobre</option>
|
|
|
+ <option value="11">Novembre</option>
|
|
|
+ <option value="12">Dicembre</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-3">
|
|
|
- <span class="title-form d-block w-100">Anno</span>
|
|
|
- <div class="input-group mb-3">
|
|
|
- <input type="number" class="form-control" wire:model="multiYearFrom" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <div class="col-md-3">
|
|
|
+ <span class="title-form d-block w-100">Anno</span>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <input type="number" class="form-control" wire:model="multiYearFrom" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-3">
|
|
|
- <span class="title-form d-block w-100">Dal mese</span>
|
|
|
- <div class="input-group mb-3">
|
|
|
- <select class="form-select form-select-lg me-1" wire:model="multiMonthTo" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
- <option value="1">Gennaio</option>
|
|
|
- <option value="2">Febbraio</option>
|
|
|
- <option value="3">Marzo</option>
|
|
|
- <option value="4">Aprile</option>
|
|
|
- <option value="5">Maggio</option>
|
|
|
- <option value="6">Giugno</option>
|
|
|
- <option value="7">Luglio</option>
|
|
|
- <option value="8">Agosto</option>
|
|
|
- <option value="9">Settembre</option>
|
|
|
- <option value="10">Ottobre</option>
|
|
|
- <option value="11">Novembre</option>
|
|
|
- <option value="12">Dicembre</option>
|
|
|
- </select>
|
|
|
+ <div class="col-md-3">
|
|
|
+ <span class="title-form d-block w-100">Dal mese</span>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <select class="form-select form-select-lg me-1" wire:model="multiMonthTo" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <option value="1">Gennaio</option>
|
|
|
+ <option value="2">Febbraio</option>
|
|
|
+ <option value="3">Marzo</option>
|
|
|
+ <option value="4">Aprile</option>
|
|
|
+ <option value="5">Maggio</option>
|
|
|
+ <option value="6">Giugno</option>
|
|
|
+ <option value="7">Luglio</option>
|
|
|
+ <option value="8">Agosto</option>
|
|
|
+ <option value="9">Settembre</option>
|
|
|
+ <option value="10">Ottobre</option>
|
|
|
+ <option value="11">Novembre</option>
|
|
|
+ <option value="12">Dicembre</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-3">
|
|
|
- <span class="title-form d-block w-100">Anno</span>
|
|
|
- <div class="input-group mb-3">
|
|
|
- <input type="number" class="form-control" wire:model="multiYearTo" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <div class="col-md-3">
|
|
|
+ <span class="title-form d-block w-100">Anno</span>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <input type="number" class="form-control" wire:model="multiYearTo" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ @if($this->dataId == 0 && !$isDuplicate)
|
|
|
+ <div class="col-md-6">
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="multiPeriodCreate({{$idx}})" style="margin-top:20px">
|
|
|
+ Crea multi periodo
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="multiPeriodCancel()" style="margin-top:20px">
|
|
|
+ Annulla multi periodo
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
- @if($this->dataId == 0)
|
|
|
- <div class="col-md-6">
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="multiPeriodCreate({{$idx}})" style="margin-top:20px">
|
|
|
- Crea multi periodo
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="multiPeriodCancel()" style="margin-top:20px">
|
|
|
- Annulla multi periodo
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
- @else
|
|
|
- @foreach($row["when"] as $xxx => $w)
|
|
|
- <div class="col-md-4">
|
|
|
- <span class="title-form d-block w-100">Mese</span>
|
|
|
- <div class="input-group mb-3">
|
|
|
- <select class="form-select form-select-lg me-1" wire:model="rows.{{$idx}}.when.{{$xxx}}.month" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
- <option value="1">Gennaio</option>
|
|
|
- <option value="2">Febbraio</option>
|
|
|
- <option value="3">Marzo</option>
|
|
|
- <option value="4">Aprile</option>
|
|
|
- <option value="5">Maggio</option>
|
|
|
- <option value="6">Giugno</option>
|
|
|
- <option value="7">Luglio</option>
|
|
|
- <option value="8">Agosto</option>
|
|
|
- <option value="9">Settembre</option>
|
|
|
- <option value="10">Ottobre</option>
|
|
|
- <option value="11">Novembre</option>
|
|
|
- <option value="12">Dicembre</option>
|
|
|
- </select>
|
|
|
+ @else
|
|
|
+ @foreach($row["when"] as $xxx => $w)
|
|
|
+ <div class="col-md-4">
|
|
|
+ <span class="title-form d-block w-100">Mese</span>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <select class="form-select form-select-lg me-1" wire:model="rows.{{$idx}}.when.{{$xxx}}.month" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <option value="1">Gennaio</option>
|
|
|
+ <option value="2">Febbraio</option>
|
|
|
+ <option value="3">Marzo</option>
|
|
|
+ <option value="4">Aprile</option>
|
|
|
+ <option value="5">Maggio</option>
|
|
|
+ <option value="6">Giugno</option>
|
|
|
+ <option value="7">Luglio</option>
|
|
|
+ <option value="8">Agosto</option>
|
|
|
+ <option value="9">Settembre</option>
|
|
|
+ <option value="10">Ottobre</option>
|
|
|
+ <option value="11">Novembre</option>
|
|
|
+ <option value="12">Dicembre</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-3">
|
|
|
- <span class="title-form d-block w-100">Anno</span>
|
|
|
- <div class="input-group mb-3">
|
|
|
- <input type="number" class="form-control" wire:model="rows.{{$idx}}.when.{{$xxx}}.year" {{$this->dataId > 0 ? 'disabled' : ''}}>
|
|
|
+ <div class="col-md-3">
|
|
|
+ <span class="title-form d-block w-100">Anno</span>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <input type="number" class="form-control" wire:model="rows.{{$idx}}.when.{{$xxx}}.year" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-3">
|
|
|
- <span class="title-form d-block w-100">Valore</span>
|
|
|
- <span class="netprice_p total--wrapper_netprice"><b>{{$this->currencyToDouble($rows[$idx]["amount"]) > 0 ? formatPrice(($this->currencyToDouble($rows[$idx]["amount"]) + getVatValue($this->currencyToDouble($rows[$idx]["amount"]), $rows[$idx]["vat_id"])) / sizeof($rows[$idx]["when"])) : ""}}</b></span>
|
|
|
- </div>
|
|
|
- <div class="col-md-2"><br>
|
|
|
- @if($this->dataId == 0)
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="delPeriod({{$idx}}, {{$xxx}})" style="float:right">
|
|
|
- -
|
|
|
- </button>
|
|
|
- @endif
|
|
|
- </div>
|
|
|
- @endforeach
|
|
|
- @if($this->dataId == 0)
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="addPeriod({{$idx}})">
|
|
|
- Aggiungi periodo
|
|
|
- </button>
|
|
|
-
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="multiPeriod()" style="margin-top:20px">
|
|
|
- Imposta multi periodo
|
|
|
- </button>
|
|
|
+ <div class="col-md-3">
|
|
|
+ <span class="title-form d-block w-100">Valore</span>
|
|
|
+ <span class="netprice_p total--wrapper_netprice"><b>{{$this->currencyToDouble($rows[$idx]["amount"]) > 0 ? formatPrice(($this->currencyToDouble($rows[$idx]["amount"]) + getVatValue($this->currencyToDouble($rows[$idx]["amount"]), $rows[$idx]["vat_id"])) / sizeof($rows[$idx]["when"])) : ""}}</b></span>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-2"><br>
|
|
|
+ @if($this->dataId == 0)
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="delPeriod({{$idx}}, {{$xxx}})" style="float:right">
|
|
|
+ -
|
|
|
+ </button>
|
|
|
+ @endif
|
|
|
+ </div>
|
|
|
+ @endforeach
|
|
|
+ @if($this->dataId == 0)
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="addPeriod({{$idx}})">
|
|
|
+ Aggiungi periodo
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="multiPeriod()" style="margin-top:20px">
|
|
|
+ Imposta multi periodo
|
|
|
+ </button>
|
|
|
+ @endif
|
|
|
@endif
|
|
|
- @endif
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <br><br>
|
|
|
- @if($this->dataId == 0)
|
|
|
- @if($idx > 0)
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="delRow({{$idx}})" style="float:right">
|
|
|
- Rimuovi causale
|
|
|
- </button>
|
|
|
<br><br>
|
|
|
- @endif
|
|
|
- @endif
|
|
|
- <hr size="1">
|
|
|
+ @if($this->dataId == 0)
|
|
|
+ @if($idx > 0)
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="delRow({{$idx}})" style="float:right">
|
|
|
+ Rimuovi causale
|
|
|
+ </button>
|
|
|
+ <br><br>
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
+ <hr size="1">
|
|
|
|
|
|
- @endforeach
|
|
|
+ @endforeach
|
|
|
+
|
|
|
+ @if($this->dataId == 0)
|
|
|
+ <br>
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="addRow()">
|
|
|
+ Aggiungi causale
|
|
|
+ </button>
|
|
|
+ @endif
|
|
|
|
|
|
- @if($this->dataId == 0)
|
|
|
- <br>
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="addRow()">
|
|
|
- Aggiungi causale
|
|
|
- </button>
|
|
|
@endif
|
|
|
|
|
|
|
|
|
@@ -463,13 +520,23 @@
|
|
|
@if($add)
|
|
|
|
|
|
@if($commercial)
|
|
|
- <button class="btn--ui primary" type="submit" wire:click.prevent="store(false)">inserisci</button>
|
|
|
+
|
|
|
+ @if($corrispettivo_fiscale)
|
|
|
+ @if($corrispettivo_causal_id > 0)
|
|
|
+ <button class="btn--ui primary" type="submit" wire:click.prevent="storeCorrispettivo()">inserisci corrispettivo fiscale</button>
|
|
|
+ @else
|
|
|
+ Non hai configurato una causale per il corrispettivo fiscale
|
|
|
+ @endif
|
|
|
+ @else
|
|
|
+ <button class="btn--ui primary" type="submit" wire:click.prevent="store(false)">inserisci</button>
|
|
|
+ @endif
|
|
|
+
|
|
|
@else
|
|
|
- <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="store(true)"><i class="ico--ui sendingBtn"></i>inserisci e genera ricevuta</button>
|
|
|
+ <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="store(true)"><i class="ico--ui sendingBtn"></i>inserisci {{!$commercial ? 'genera ricevuta' : ''}}</button>
|
|
|
@endif
|
|
|
|
|
|
@endif
|
|
|
- @if($update)
|
|
|
+ @if($update && !$corrispettivo_fiscale)
|
|
|
<button class="btn--ui primary" type="submit" wire:click.prevent="update(false)">salva</button>
|
|
|
@endif
|
|
|
@else
|
|
|
@@ -479,11 +546,12 @@
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
+ @if(!$corrispettivo_fiscale)
|
|
|
<div class="accountingEntry_resume card--ui" style="max-height:800px;">
|
|
|
<header>
|
|
|
<div class="username d-flex align-items-start">
|
|
|
<i class="ico--ui accountingResume me-2"></i>
|
|
|
- <div class="user--resume_name d-flex flex-column"><span class="primary">Ricevuta {{$currentReceip ? $currentReceip->number . "/" . $currentReceip->year : ''}}</span></div></div>
|
|
|
+ <div class="user--resume_name d-flex flex-column"><span class="primary">{{!$commercial ? 'Ricevuta' : 'Promemoria pagamento'}} {{$currentReceip ? $currentReceip->number . "/" . $currentReceip->year : ''}}</span></div></div>
|
|
|
</header>
|
|
|
|
|
|
<div class="resume--body d-flex justify-content-between flex-column">
|
|
|
@@ -504,10 +572,10 @@
|
|
|
<select class="form-control" wire:model="parent">
|
|
|
<option value="">Seleziona un genitore
|
|
|
@if($this->member->father_name != '')
|
|
|
- <option value="{{$this->member->father_name}} {{$this->member->father_fiscal_code}}">{{$this->member->father_name}} {{$this->member->father_fiscal_code}}
|
|
|
+ <option value="{{$this->member->father_name}} (C.F. {{$this->member->father_fiscal_code}})">{{$this->member->father_name}} (C.F. {{$this->member->father_fiscal_code}})
|
|
|
@endif
|
|
|
@if($this->member->mother_name != '')
|
|
|
- <option value="{{$this->member->mother_name}} {{$this->member->mother_fiscal_code}}">{{$this->member->mother_name}} {{$this->member->mother_fiscal_code}}
|
|
|
+ <option value="{{$this->member->mother_name}} (C.F. {{$this->member->mother_fiscal_code}})">{{$this->member->mother_name}} (C.F. {{$this->member->mother_fiscal_code}})
|
|
|
@endif
|
|
|
</select>
|
|
|
</span>
|
|
|
@@ -598,13 +666,16 @@
|
|
|
</div>
|
|
|
@endif
|
|
|
@else
|
|
|
- <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="update(true)"><i class="ico--ui sendingBtn"></i>salva e genera ricevuta</button>
|
|
|
+ @if(!$corrispettivo_fiscale)
|
|
|
+ <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="update(true)"><i class="ico--ui sendingBtn"></i>salva {{!$commercial ? ' e genera ricevuta' : ''}}</button>
|
|
|
+ @endif
|
|
|
@endif
|
|
|
@endif
|
|
|
|
|
|
</footer>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ @endif
|
|
|
</section>
|
|
|
|
|
|
<div wire:ignore.self class="modal fade" id="userModal" tabindex="-1" aria-labelledby="userModalLabel" aria-hidden="true">
|
|
|
@@ -815,6 +886,10 @@
|
|
|
input.value = "€ " + v.replace(/(\d)(\d\d)$/, "$1,$2").replace(/(^\d{1,3}|\d{3})(?=(?:\d{3})+(?:,|$))/g, '$1.');
|
|
|
}
|
|
|
|
|
|
+ function setChangedAmount() {
|
|
|
+ @this.setAmount();
|
|
|
+ }
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<link href="/css/datatables.css" rel="stylesheet" />
|
|
|
@@ -831,7 +906,9 @@
|
|
|
var filterCommercial = localStorage.getItem("filterCommercial");
|
|
|
if (filterCommercial)
|
|
|
{
|
|
|
- $('input[name="filterCommercial"]').val(filterCommercial);
|
|
|
+ //$('input[name="filterCommercial"]').val(filterCommercial);
|
|
|
+ $('input[name="filterCommercial"]').filter('[value="' + filterCommercial + '"]').attr('checked', true);
|
|
|
+ setFilterCommercial(filterCommercial);
|
|
|
}
|
|
|
var filterMember = localStorage.getItem("filterMember");
|
|
|
if (filterMember)
|
|
|
@@ -910,13 +987,20 @@
|
|
|
loadDataTable();
|
|
|
}
|
|
|
|
|
|
+ var filterCommercial = 0;
|
|
|
+
|
|
|
+ function setFilterCommercial(value)
|
|
|
+ {
|
|
|
+ filterCommercial = value;
|
|
|
+ }
|
|
|
+
|
|
|
function loadDataTable(){
|
|
|
|
|
|
if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
|
|
|
$('#tablesaw-350').DataTable().destroy();
|
|
|
}
|
|
|
|
|
|
- var filterCommercial = $('input[name="filterCommercial"]:checked').val();
|
|
|
+ // filterCommercial = $('input[name="filterCommercial"]:checked').val();
|
|
|
var filterMember = $('.filterMember').val();
|
|
|
var filterPaymentMethod = $('.filterPaymentMethod').val();
|
|
|
var filterCausals = $('.filterCausals').val();
|
|
|
@@ -932,7 +1016,8 @@
|
|
|
localStorage.setItem("filterTo", filterTo);
|
|
|
|
|
|
$('#tablesaw-350').DataTable({
|
|
|
- searching: false,
|
|
|
+ //searching: false,
|
|
|
+ //serverSide: true,
|
|
|
ajax: '/get_record_in?filterCommercial=' + filterCommercial + "&filterMember=" + filterMember + "&filterPaymentMethod=" + filterPaymentMethod + "&filterCausals=" + filterCausals + "&filterFrom=" + filterFrom + "&filterTo=" + filterTo,
|
|
|
columns: [
|
|
|
//{ data: 'id' },
|