|
|
@@ -1,797 +1,791 @@
|
|
|
-<div class="col">
|
|
|
- <div class="row h-100">
|
|
|
+<div class="col card--ui" id="card--dashboard">
|
|
|
|
|
|
|
|
|
+ <header id="title--section" style="display:none !important" class="d-flex align-items-center justify-content-between">
|
|
|
+ <div class="title--section_name d-flex align-items-center justify-content-between">
|
|
|
+ <i class="ico--ui title_section entrate me-2"></i>
|
|
|
+ <h2 class="primary">@if(!$add && !$update)Entrate @else Inserimento/modifica entrata @endif</h2>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="col card--ui" id="card--dashboard">
|
|
|
-
|
|
|
-
|
|
|
- <header id="title--section" style="display:none !important" class="d-flex align-items-center justify-content-between">
|
|
|
- <div class="title--section_name d-flex align-items-center justify-content-between">
|
|
|
- <i class="ico--ui title_section entrate me-2"></i>
|
|
|
- <h2 class="primary">@if(!$add && !$update)Entrate @else Inserimento/modifica entrata @endif</h2>
|
|
|
+ @if(!$add && !$update)
|
|
|
+ <div class="title--section_addButton" wire:click="add()" style="cursor: pointer;">
|
|
|
+ <div class="btn--ui entrata d-flex justify-items-between">
|
|
|
+ <a href="#" wire:click="add()" style="color:white">Aggiungi</a>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
|
|
|
- @if(!$add && !$update)
|
|
|
- <div class="title--section_addButton" wire:click="add()" style="cursor: pointer;">
|
|
|
- <div class="btn--ui entrata d-flex justify-items-between">
|
|
|
- <a href="#" wire:click="add()" style="color:white">Aggiungi</a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
+ </header>
|
|
|
|
|
|
- </header>
|
|
|
|
|
|
+ @if(!$add && !$update)
|
|
|
|
|
|
- @if(!$add && !$update)
|
|
|
+ <!--
|
|
|
+ <button id="open-filter" onclick="pcsh1()"></button>
|
|
|
+ <button id="close-filter" onclick="pcsh2()"></button>
|
|
|
+ -->
|
|
|
|
|
|
- <!--
|
|
|
- <button id="open-filter" onclick="pcsh1()"></button>
|
|
|
- <button id="close-filter" onclick="pcsh2()"></button>
|
|
|
- -->
|
|
|
+ <section id="subheader" class="d-flex align-items-center justify-content-between">
|
|
|
+ </section>
|
|
|
|
|
|
- <section id="subheader" class="d-flex align-items-center justify-content-between">
|
|
|
- </section>
|
|
|
+ @if (session()->has('receipt'))
|
|
|
+ <div class="alert alert-success" role="alert">
|
|
|
+ {{ session()->get('receipt') }}
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
|
|
|
- @if (session()->has('receipt'))
|
|
|
- <div class="alert alert-success" role="alert">
|
|
|
- {{ session()->get('receipt') }}
|
|
|
+ <div class="showFilter" style="display:none">
|
|
|
+ <hr size="1">
|
|
|
+ <div class="row g-3">
|
|
|
+ <div class="col-md-2">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
+ <b>Periodo</b>
|
|
|
+ </div>
|
|
|
+ <div class="col-12 mb-2">
|
|
|
+ <input id="dateFrom" type="date" class="form-control filterFrom">
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <input id="dateTo" type="date" class="form-control filterTo" >
|
|
|
+ </div>
|
|
|
+ <div class="col-6 mt-2">
|
|
|
+ <button class="btn--ui lightGrey todayButton" style="width:100%" onclick="setToday('{{date("Y-m-d")}}')">OGGI</button>
|
|
|
+ </div>
|
|
|
+ <div class="col-6 mt-2">
|
|
|
+ <button class="btn--ui lightGrey yesterdayButton" style="width:100%" onclick="setYesterday('{{date("Y-m-d",strtotime("-1 days"))}}')">IERI</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- @endif
|
|
|
-
|
|
|
- <div class="showFilter" style="display:none">
|
|
|
- <hr size="1">
|
|
|
- <div class="row g-3">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
- <b>Periodo</b>
|
|
|
- </div>
|
|
|
- <div class="col-12 mb-2">
|
|
|
- <input id="dateFrom" type="date" class="form-control filterFrom">
|
|
|
- </div>
|
|
|
- <div class="col-12">
|
|
|
- <input id="dateTo" type="date" class="form-control filterTo" >
|
|
|
- </div>
|
|
|
- <div class="col-6 mt-2">
|
|
|
- <button class="btn--ui lightGrey todayButton" style="width:100%" onclick="setToday('{{date("Y-m-d")}}')">OGGI</button>
|
|
|
- </div>
|
|
|
- <div class="col-6 mt-2">
|
|
|
- <button class="btn--ui lightGrey yesterdayButton" style="width:100%" onclick="setYesterday('{{date("Y-m-d",strtotime("-1 days"))}}')">IERI</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-2">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
+ <b>Tipologia</b>
|
|
|
</div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
- <b>Tipologia</b>
|
|
|
- </div>
|
|
|
- <div class="col-12">
|
|
|
- <select name="filterCommercial" class="form-select filterCommercial">
|
|
|
- <option value="">Entrambe
|
|
|
- <option value="1">Commerciale
|
|
|
- <option value="2">Non commerciale
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <select name="filterCommercial" class="form-select filterCommercial">
|
|
|
+ <option value="">Entrambe
|
|
|
+ <option value="1">Commerciale
|
|
|
+ <option value="2">Non commerciale
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
- <b>Utente</b>
|
|
|
- </div>
|
|
|
- <div class="col-12">
|
|
|
- <select name="search_member_id" class="form-select filterMember">
|
|
|
- <option value="">--Seleziona--
|
|
|
- @foreach($members as $member)
|
|
|
- <option value="{{$member->id}}">{{$member->last_name}} {{$member->first_name}}
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-2">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
+ <b>Utente</b>
|
|
|
</div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
- <b>Metodi di pagamento</b>
|
|
|
- </div>
|
|
|
- <div class="col-12">
|
|
|
- <select name="search_payment_method_id" class="form-select filterPaymentMethod" multiple="multiple">
|
|
|
- @foreach($payments as $payment)
|
|
|
- <option value="{{$payment->id}}">{{$payment->name}}
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <select name="search_member_id" class="form-select filterMember">
|
|
|
+ <option value="">--Seleziona--
|
|
|
+ @foreach($members as $member)
|
|
|
+ <option value="{{$member->id}}">{{$member->last_name}} {{$member->first_name}}
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
- <b>Causali</b>
|
|
|
- </div>
|
|
|
- <div class="col-12">
|
|
|
- <select name="search_causal_id" class="form-select filterCausals" multiple="multiple">
|
|
|
- @foreach($causals as $causal)
|
|
|
- <option value="{{$causal["id"]}}">{!!$causal["name"]!!}
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-2">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
+ <b>Metodi di pagamento</b>
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <select name="search_payment_method_id" class="form-select filterPaymentMethod" multiple="multiple">
|
|
|
+ @foreach($payments as $payment)
|
|
|
+ <option value="{{$payment->id}}">{{$payment->name}}
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="row g-3">
|
|
|
- <div class="col-md-12" style="text-align:right">
|
|
|
- <button class="btn--ui lightGrey" onclick="reset()">Reset</button>
|
|
|
- <button class="btn--ui" onclick="loadDataTable()">FILTRA</button>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-2">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12" style="margin-bottom:10px;">
|
|
|
+ <b>Causali</b>
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <select name="search_causal_id" class="form-select filterCausals" multiple="multiple">
|
|
|
+ @foreach($causals as $causal)
|
|
|
+ <option value="{{$causal["id"]}}">{!!$causal["name"]!!}
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <hr size="1">
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <div class="row g-3">
|
|
|
+ <div class="col-md-12" style="text-align:right">
|
|
|
+ <button class="btn--ui lightGrey" onclick="reset()">Reset</button>
|
|
|
+ <button class="btn--ui" onclick="loadDataTable()">FILTRA</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <hr size="1">
|
|
|
+ </div>
|
|
|
|
|
|
- <section id="resume-table">
|
|
|
- <div class="compare--chart_wrapper d-none"></div>
|
|
|
-
|
|
|
- <table class="table tablesaw tablesaw-stack table--lista_entrate tableHead" id="tablesaw-350" width="100%">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <!--<th scope="col"></th>-->
|
|
|
- <th scope="col">Data pagamento</th>
|
|
|
- <th scope="col">Importo</th>
|
|
|
- <th scope="col">Cognome</th>
|
|
|
- <th scope="col">Nome</th>
|
|
|
- <th scope="col">Commerciale</th>
|
|
|
- <th scope="col">Causale</th>
|
|
|
- <th scope="col">Pagamento</th>
|
|
|
- <th scope="col">Stato</th>
|
|
|
- <th scope="col">...</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
-
|
|
|
- <tbody id="checkall-target">
|
|
|
- </tbody>
|
|
|
- <!--<tfoot>
|
|
|
- <tr id="tfooter">
|
|
|
- <td colspan="9"><span class="total"></span></td>
|
|
|
- </tr>
|
|
|
- </tfoot>-->
|
|
|
- </table>
|
|
|
-
|
|
|
- <!--<br><b class="totalDiv"></b>-->
|
|
|
-
|
|
|
- </section>
|
|
|
-
|
|
|
- @else
|
|
|
-
|
|
|
- <a name="top"></a>
|
|
|
- @if (session()->has('error'))
|
|
|
- <div class="alert alert-danger" role="alert">
|
|
|
- {{ session()->get('error') }}
|
|
|
- </div>
|
|
|
- @endif
|
|
|
+ <section id="resume-table">
|
|
|
+ <div class="compare--chart_wrapper d-none"></div>
|
|
|
+
|
|
|
+ <table class="table tablesaw tablesaw-stack table--lista_entrate tableHead" id="tablesaw-350" width="100%">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <!--<th scope="col"></th>-->
|
|
|
+ <th scope="col">Data pagamento</th>
|
|
|
+ <th scope="col">Importo</th>
|
|
|
+ <th scope="col">Cognome</th>
|
|
|
+ <th scope="col">Nome</th>
|
|
|
+ <th scope="col">Commerciale</th>
|
|
|
+ <th scope="col">Causale</th>
|
|
|
+ <th scope="col">Pagamento</th>
|
|
|
+ <th scope="col">Stato</th>
|
|
|
+ <th scope="col">...</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody id="checkall-target">
|
|
|
+ </tbody>
|
|
|
+ <!--<tfoot>
|
|
|
+ <tr id="tfooter">
|
|
|
+ <td colspan="9"><span class="total"></span></td>
|
|
|
+ </tr>
|
|
|
+ </tfoot>-->
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <!--<br><b class="totalDiv"></b>-->
|
|
|
+
|
|
|
+ </section>
|
|
|
+
|
|
|
+ @else
|
|
|
+
|
|
|
+ <a name="top"></a>
|
|
|
+ @if (session()->has('error'))
|
|
|
+ <div class="alert alert-danger" role="alert">
|
|
|
+ {{ session()->get('error') }}
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
|
|
|
|
|
|
- <section id="accountingEntry" class="d-flex">
|
|
|
- <div class="accountingEntry_data" wire:key='reload-{{$selectId}}'>
|
|
|
- <form class="form--accounting" >
|
|
|
+ <section id="accountingEntry" class="d-flex">
|
|
|
+ <div class="accountingEntry_data" wire:key='reload-{{$selectId}}'>
|
|
|
+ <form class="form--accounting" >
|
|
|
|
|
|
- <div class="row gx-2">
|
|
|
+ <div class="row gx-2">
|
|
|
|
|
|
- <div class="col-md-12">
|
|
|
- <span class="title-form d-block w-100">Tipologia</span>
|
|
|
- <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 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
- <label class="form-check-label" for="flexCheckChecked" {!!$this->dataId > 0 && !$isDuplicate ? '' : ' onclick="setCommercialType(1)"'!!}> Commerciale</label>
|
|
|
- </div>
|
|
|
- <div class="form-check">
|
|
|
- <input class="form-check-input" type="radio" value="0" wire:model="commercial" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
- <label class="form-check-label" for="flexCheck" {!!$this->dataId > 0 && !$isDuplicate ? '' : ' onclick="setCommercialType(0)"'!!}> Non Commerciale</label>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <span class="title-form d-block w-100">Tipologia</span>
|
|
|
+ <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 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <label class="form-check-label" for="flexCheckChecked" {!!$this->dataId > 0 && !$isDuplicate ? '' : ' onclick="setCommercialType(1)"'!!}> Commerciale</label>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <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 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <div class="form-check">
|
|
|
+ <input class="form-check-input" type="radio" value="0" wire:model="commercial" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <label class="form-check-label" for="flexCheck" {!!$this->dataId > 0 && !$isDuplicate ? '' : ' onclick="setCommercialType(0)"'!!}> Non Commerciale</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="col-md-6"> </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
+ <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 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6"> </div>
|
|
|
|
|
|
- <div class="col-md-6">
|
|
|
- <span class="title-form d-block w-100">Utente</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 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
- <option value="">--Seleziona--
|
|
|
- @foreach($members as $member)
|
|
|
- <option value="{{$member->id}}">{{$member->last_name}} {{$member->first_name}} ({{$member->fiscal_code}})
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- @error('member_id')
|
|
|
- <div class="invalid-feedback">{{ $message }}</div>
|
|
|
- @enderror
|
|
|
- <br><br>
|
|
|
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- @if($this->dataId == 0 && !$isDuplicate)
|
|
|
- <span class="title-form d-block w-100"> </span>
|
|
|
- <button type="button" class="btn--ui primary" data-bs-toggle="modal" data-bs-target="#userModal" style="width:50px"> <i class="fa-solid fa-plus"></i></button>
|
|
|
- @endif
|
|
|
- @if(false && $this->member)
|
|
|
- <b>{{$this->member->first_name}} {{$this->member->last_name}}</b> {!! !$this->member->isAdult() ? '<span style="color:red;font-weight:bold"> MINORENNE</span>' : '' !!}<br>
|
|
|
- <span class="title-form w-100">Codice fiscale</span> : {{$this->member->fiscal_code}}<br>
|
|
|
- <span class="title-form w-100">Email</span> : {{$this->member->email}}<br>
|
|
|
- <span class="title-form w-100">Borsellino virtuale</span>
|
|
|
- <b>{{number_format($virtual, 2, ".", "")}} €</b><br>
|
|
|
- @if(sizeof($this->member->certificates) > 0)
|
|
|
- @php
|
|
|
- $cert = $this->member->certificates[0]
|
|
|
- @endphp
|
|
|
- @if($cert->expire_date < date("Y-m-d"))
|
|
|
- <span class="title-form w-100">Certificato medico </span><span class="badge tessera-badge suspended">scaduto</span>
|
|
|
- @endif
|
|
|
- @endif
|
|
|
- @php
|
|
|
- $status = $this->member->getStatus()["status"];
|
|
|
- $class = $status > 0 ? ($status == 2 ? 'active' : 'suspended') : 'due';
|
|
|
- $text = $status > 0 ? ($status == 2 ? 'Tesserato' : 'Sospeso') : 'Non tesserato';
|
|
|
- @endphp
|
|
|
- <span class="tablesaw-cell-content"><span class="badge tessera-badge {{$class}}">{{$text}}</span></span>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <span class="title-form d-block w-100">Utente</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 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <option value="">--Seleziona--
|
|
|
+ @foreach($members as $member)
|
|
|
+ <option value="{{$member->id}}">{{$member->last_name}} {{$member->first_name}} ({{$member->fiscal_code}})
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ @error('member_id')
|
|
|
+ <div class="invalid-feedback">{{ $message }}</div>
|
|
|
+ @enderror
|
|
|
+ <br><br>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6">
|
|
|
+ @if($this->dataId == 0 && !$isDuplicate)
|
|
|
+ <span class="title-form d-block w-100"> </span>
|
|
|
+ <button type="button" class="btn--ui primary" data-bs-toggle="modal" data-bs-target="#userModal" style="width:50px"> <i class="fa-solid fa-plus"></i></button>
|
|
|
+ @endif
|
|
|
+ @if(false && $this->member)
|
|
|
+ <b>{{$this->member->first_name}} {{$this->member->last_name}}</b> {!! !$this->member->isAdult() ? '<span style="color:red;font-weight:bold"> MINORENNE</span>' : '' !!}<br>
|
|
|
+ <span class="title-form w-100">Codice fiscale</span> : {{$this->member->fiscal_code}}<br>
|
|
|
+ <span class="title-form w-100">Email</span> : {{$this->member->email}}<br>
|
|
|
+ <span class="title-form w-100">Borsellino virtuale</span>
|
|
|
+ <b>{{number_format($virtual, 2, ".", "")}} €</b><br>
|
|
|
+ @if(sizeof($this->member->certificates) > 0)
|
|
|
+ @php
|
|
|
+ $cert = $this->member->certificates[0]
|
|
|
+ @endphp
|
|
|
+ @if($cert->expire_date < date("Y-m-d"))
|
|
|
+ <span class="title-form w-100">Certificato medico </span><span class="badge tessera-badge suspended">scaduto</span>
|
|
|
@endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ @endif
|
|
|
+ @php
|
|
|
+ $status = $this->member->getStatus()["status"];
|
|
|
+ $class = $status > 0 ? ($status == 2 ? 'active' : 'suspended') : 'due';
|
|
|
+ $text = $status > 0 ? ($status == 2 ? 'Tesserato' : 'Sospeso') : 'Non tesserato';
|
|
|
+ @endphp
|
|
|
+ <span class="tablesaw-cell-content"><span class="badge tessera-badge {{$class}}">{{$text}}</span></span>
|
|
|
+ @endif
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- @if(false)
|
|
|
- <br>
|
|
|
- <div class="col-md-12">
|
|
|
- <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="financial_movement" type="checkbox" wire:model="financial_movement" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
- <label class="form-check-label" for="flexCheckChecked"> Movimento finanziario</label>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ @if(false)
|
|
|
+ <br>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <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="financial_movement" type="checkbox" wire:model="financial_movement" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <label class="form-check-label" for="flexCheckChecked"> Movimento finanziario</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
- @endif
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
|
|
|
- @if($commercial)
|
|
|
+ @if($commercial)
|
|
|
|
|
|
- <br>
|
|
|
- <div class="col-md-12">
|
|
|
+ <br>
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
|
- <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 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>
|
|
|
|
|
|
- @endif
|
|
|
+ @endif
|
|
|
|
|
|
- @if($corrispettivo_fiscale)
|
|
|
+ @if($corrispettivo_fiscale)
|
|
|
|
|
|
- @if ($this->dataId > 0)
|
|
|
+ @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">
|
|
|
- {{$this->getPaymentMethod($payment_method_id)}}
|
|
|
+ {{$payment->name}}
|
|
|
</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
|
|
|
-
|
|
|
- <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>
|
|
|
+ <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
|
|
|
|
|
|
+ <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>
|
|
|
+ @endif
|
|
|
|
|
|
- @else
|
|
|
|
|
|
- <div class="row gx-2 mt-3">
|
|
|
- <span class="title-form d-block w-100">Metodo di pagamento</span>
|
|
|
+ @else
|
|
|
|
|
|
- <div class="col-md-6" >
|
|
|
+ <div class="row gx-2 mt-3">
|
|
|
+ <span class="title-form d-block w-100">Metodo di pagamento</span>
|
|
|
|
|
|
- <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%" {{$this->dataId > 0 && $deleted ? 'disabled' : ''}}>
|
|
|
- <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="col-md-6" >
|
|
|
|
|
|
- @foreach($rows as $idx => $row)
|
|
|
+ <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%" {{$this->dataId > 0 && $deleted ? 'disabled' : ''}}>
|
|
|
+ <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" >
|
|
|
- <span class="title-form d-block w-100">Causale</span>
|
|
|
- <div class="col-md-12">
|
|
|
+ @foreach($rows as $idx => $row)
|
|
|
|
|
|
- @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
|
|
|
+ <div class="row gx-2 mt-3" >
|
|
|
+ <span class="title-form d-block w-100">Causale</span>
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
|
- @error('rows.'. $idx . '.causal_id')
|
|
|
- <span style="argin-top: 0.25rem; font-size: 0.875em; color: var(--bs-form-invalid-color);">{{ $message }}</span>
|
|
|
- @enderror
|
|
|
+ @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
|
|
|
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ @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 gx-2 mt-3">
|
|
|
- <span class="title-form d-block w-100">Dettaglio causale</span>
|
|
|
- <div class="col-md-6">
|
|
|
- <input class="form-control " id="causal_detail_{{$idx}}" type="text" placeholder="Dettaglio causale" wire:model="rows.{{$idx}}.note" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </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" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
- <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">
|
|
|
+ <span class="title-form d-block w-100">Dettaglio causale</span>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <input class="form-control " id="causal_detail_{{$idx}}" type="text" placeholder="Dettaglio causale" wire:model="rows.{{$idx}}.note" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ </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" {{$this->dataId > 0 && !$isDuplicate ? 'disabled' : ''}}>
|
|
|
+ <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 comp">Competenza</span>
|
|
|
- </div>
|
|
|
- <div class="col-md-8">
|
|
|
- <div class="row">
|
|
|
-
|
|
|
- @if($multiP)
|
|
|
- <div class="row">
|
|
|
- <h4>Seleziona inizio e fine multiperiodo</h4>
|
|
|
- <div class="col-lg-6 col-xxl-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 class="col-lg-6 col-xxl-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 class="col-lg-6 col-xxl-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 class="col-lg-6 col-xxl-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-lg-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-lg-6">
|
|
|
- <button type="button" class="btn--ui lightGrey" wire:click.prevent="multiPeriodCancel()" style="margin-top:20px">
|
|
|
- Annulla multi periodo
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
|
|
|
+ <div class="row gx-2 mt-3 align-items-center">
|
|
|
+ <div class="col-md-4">
|
|
|
+ <span class="total primary comp">Competenza</span>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-8">
|
|
|
+ <div class="row">
|
|
|
|
|
|
- @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" onchange="setYear({{$idx}}, {{$xxx}})" {{$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 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 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)
|
|
|
- <div class="d-flex justify-content-between mt-3">
|
|
|
- <button type="button" class="btn--ui lightGrey order-2" wire:click.prevent="addPeriod({{$idx}})">
|
|
|
- Aggiungi periodo
|
|
|
+ @if($multiP)
|
|
|
+ <div class="row">
|
|
|
+ <h4>Seleziona inizio e fine multiperiodo</h4>
|
|
|
+ <div class="col-lg-6 col-xxl-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 class="col-lg-6 col-xxl-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 class="col-lg-6 col-xxl-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 class="col-lg-6 col-xxl-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-lg-6">
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="multiPeriodCreate({{$idx}})" style="margin-top:20px">
|
|
|
+ Crea multi periodo
|
|
|
</button>
|
|
|
-
|
|
|
- <button type="button" class="btn--ui_tertiary primary order-1" wire:click.prevent="multiPeriod()">
|
|
|
- Imposta multi periodo
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-6">
|
|
|
+ <button type="button" class="btn--ui lightGrey" wire:click.prevent="multiPeriodCancel()" style="margin-top:20px">
|
|
|
+ Annulla multi periodo
|
|
|
</button>
|
|
|
</div>
|
|
|
- @endif
|
|
|
@endif
|
|
|
-
|
|
|
</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">
|
|
|
|
|
|
- @endforeach
|
|
|
+ @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" onchange="setYear({{$idx}}, {{$xxx}})" {{$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 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 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)
|
|
|
+ <div class="d-flex justify-content-between mt-3">
|
|
|
+ <button type="button" class="btn--ui lightGrey order-2" wire:click.prevent="addPeriod({{$idx}})">
|
|
|
+ Aggiungi periodo
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button type="button" class="btn--ui_tertiary primary order-1" wire:click.prevent="multiPeriod()">
|
|
|
+ Imposta multi periodo
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
|
|
|
- @if($this->dataId == 0)
|
|
|
- <br>
|
|
|
- <button type="button" class="btn--ui primary" wire:click.prevent="addRow()">
|
|
|
- Aggiungi causale
|
|
|
- </button>
|
|
|
- @endif
|
|
|
+ </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">
|
|
|
|
|
|
+ @endforeach
|
|
|
|
|
|
- <div class="accountingEntry--btn d-flex align-items-center justify-content-between mt-5">
|
|
|
- <button class="btn--ui lightGrey" type="submit" wire:click.prevent="cancel()">annulla</button>
|
|
|
- @if(!$deleted)
|
|
|
- @if($canSave)
|
|
|
- @if($add)
|
|
|
+ @if($this->dataId == 0)
|
|
|
+ <br>
|
|
|
+ <button type="button" class="btn--ui primary" wire:click.prevent="addRow()">
|
|
|
+ Aggiungi causale
|
|
|
+ </button>
|
|
|
+ @endif
|
|
|
|
|
|
- @if($commercial)
|
|
|
+ @endif
|
|
|
|
|
|
- @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)" onclick='window.location.href = "#top";'>inserisci</button>
|
|
|
- @endif
|
|
|
|
|
|
- @else
|
|
|
- @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
- <span style="color:red">Devi selezionare un genitore</span>
|
|
|
- @else
|
|
|
- <button class="btn--ui primary sendInvoice d-flex ms-auto" wire:click.prevent="store(true)" onclick='window.location.href = "#top";'><i class="ico--ui sendingBtn"></i><span>inserisci {{!$commercial ? 'genera ricevuta' : ''}}</span></button>
|
|
|
- @endif
|
|
|
- @endif
|
|
|
+ <div class="accountingEntry--btn d-flex align-items-center justify-content-between mt-5">
|
|
|
+ <button class="btn--ui lightGrey" type="submit" wire:click.prevent="cancel()">annulla</button>
|
|
|
+ @if(!$deleted)
|
|
|
+ @if($canSave)
|
|
|
+ @if($add)
|
|
|
|
|
|
- @endif
|
|
|
- @if($update && !$corrispettivo_fiscale)
|
|
|
- @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
- <span style="color:red">Devi selezionare un genitore</span>
|
|
|
+ @if($commercial)
|
|
|
+
|
|
|
+ @if($corrispettivo_fiscale)
|
|
|
+ @if($corrispettivo_causal_id > 0)
|
|
|
+ <button class="btn--ui primary" type="submit" wire:click.prevent="storeCorrispettivo()">inserisci corrispettivo fiscale</button>
|
|
|
@else
|
|
|
- <button class="btn--ui primary sendInvoice d-flex ms-auto" wire:click.prevent="update({{!$commercial}})"><i class="ico--ui sendingBtn"></i><span>inserisci {{!$commercial ? 'genera ricevuta' : ''}}</span></button>
|
|
|
+ Non hai configurato una causale per il corrispettivo fiscale
|
|
|
@endif
|
|
|
+ @else
|
|
|
+ <button class="btn--ui primary" type="submit" wire:click.prevent="store(false)" onclick='window.location.href = "#top";'>inserisci</button>
|
|
|
@endif
|
|
|
+
|
|
|
@else
|
|
|
- <span style="color:red">Attenzione : non c'è credito sufficiente sul borsellino virtuale</span>
|
|
|
+ @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
+ <span style="color:red">Devi selezionare un genitore</span>
|
|
|
+ @else
|
|
|
+ <button class="btn--ui primary sendInvoice d-flex ms-auto" wire:click.prevent="store(true)" onclick='window.location.href = "#top";'><i class="ico--ui sendingBtn"></i><span>inserisci {{!$commercial ? 'genera ricevuta' : ''}}</span></button>
|
|
|
+ @endif
|
|
|
@endif
|
|
|
- @endif
|
|
|
|
|
|
- </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">{{!$commercial ? 'Ricevuta' : 'Promemoria pagamento'}} {{$currentReceip ? $currentReceip->number . "/" . $currentReceip->year : ''}}</span></div></div>
|
|
|
- </header>
|
|
|
-
|
|
|
- <div class="resume--body d-flex justify-content-between flex-column">
|
|
|
- <header>
|
|
|
- @if($this->member)
|
|
|
-
|
|
|
- <ul class="resume-item mb-4 p-0">
|
|
|
-
|
|
|
- <li>
|
|
|
- <div style="background-color:#ffffff; padding:10px;">
|
|
|
- <b>{{$this->member->first_name}} {{$this->member->last_name}}</b> {!! !$this->member->isAdult() ? '<span style="color:red;font-weight:bold"> MINORENNE</span>' : '' !!}<br>
|
|
|
- <span class="title-form w-100">Codice fiscale</span> : {{$this->member->fiscal_code}}<br>
|
|
|
- <span class="title-form w-100">Email</span> : {{$this->member->email}}<br>
|
|
|
- <span class="title-form w-100">Borsellino virtuale</span>
|
|
|
- <b>{{number_format($virtual, 2, ".", "")}} €</b><br>
|
|
|
- @if(sizeof($this->member->certificates) > 0)
|
|
|
- @php
|
|
|
- $cert = $this->member->certificates[0]
|
|
|
- @endphp
|
|
|
- @if($cert->expire_date < date("Y-m-d"))
|
|
|
- <span class="title-form w-100">Certificato medico </span><span class="badge tessera-badge suspended">scaduto</span>
|
|
|
- @endif
|
|
|
- @endif
|
|
|
- @php
|
|
|
- $status = $this->member->getStatus()["status"];
|
|
|
- $class = $status > 0 ? ($status == 2 ? 'active' : 'suspended') : 'due';
|
|
|
- $text = $status > 0 ? ($status == 2 ? 'Tesserato' : 'Sospeso') : 'Non tesserato';
|
|
|
- @endphp
|
|
|
- <span class="tablesaw-cell-content"><span class="badge tessera-badge {{$class}}">{{$text}}</span></span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
-
|
|
|
- @if(!$this->member->isAdult())
|
|
|
- <li>
|
|
|
- <span class="evidence_name">
|
|
|
- <br>Seleziona un genitore
|
|
|
- <select class="form-control" wire:model="parent">
|
|
|
- <option value="">Seleziona un genitore
|
|
|
- @if($this->member->father_name != '')
|
|
|
- <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}} (C.F. {{$this->member->mother_fiscal_code}})">{{$this->member->mother_name}} (C.F. {{$this->member->mother_fiscal_code}})
|
|
|
- @endif
|
|
|
- </select>
|
|
|
- </span>
|
|
|
- </li>
|
|
|
+ @endif
|
|
|
+ @if($update && !$corrispettivo_fiscale)
|
|
|
+ @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
+ <span style="color:red">Devi selezionare un genitore</span>
|
|
|
+ @else
|
|
|
+ <button class="btn--ui primary sendInvoice d-flex ms-auto" wire:click.prevent="update({{!$commercial}})"><i class="ico--ui sendingBtn"></i><span>inserisci {{!$commercial ? 'genera ricevuta' : ''}}</span></button>
|
|
|
@endif
|
|
|
- </ul>
|
|
|
+ @endif
|
|
|
+ @else
|
|
|
+ <span style="color:red">Attenzione : non c'è credito sufficiente sul borsellino virtuale</span>
|
|
|
@endif
|
|
|
- <ul class="resume-item date p-0">
|
|
|
- <li><strong>Data di Pagamento</strong></li>
|
|
|
- <li>{{ date("d/m/Y", strtotime($date)) }}</li>
|
|
|
- </ul>
|
|
|
-
|
|
|
- @if(sizeof($rows) > 0)
|
|
|
- <table width="100%">
|
|
|
- <tr>
|
|
|
- <td><b>Causale</b></td>
|
|
|
- @if($commercial == 1)
|
|
|
- <td><b>Imponibile</b></td>
|
|
|
- <td><b>% Iva</b></td>
|
|
|
- <td><b>Iva</b></td>
|
|
|
- @endif
|
|
|
- <td style="float:right"><b>Totale</b></td>
|
|
|
- </tr>
|
|
|
- @foreach($rows as $row)
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- {{$this->getCausal($row["causal_id"])}}<br>
|
|
|
- {{$row["note"]}}
|
|
|
- </td>
|
|
|
- @php
|
|
|
- $vat_value = 0;
|
|
|
- @endphp
|
|
|
- @if($commercial == 1)
|
|
|
- <td>{{$row["amount"]}}</td>
|
|
|
- @php
|
|
|
- $vat_name = '';
|
|
|
- if ($row["vat_id"] > 0)
|
|
|
- {
|
|
|
- $v = \App\Models\Vat::findOrFail(intval($row["vat_id"]));
|
|
|
- $vat_name = $v->name;
|
|
|
- $vat_value = $this->currencyToDouble($row["amount"]) / 100 * $v->value;
|
|
|
- }
|
|
|
- @endphp
|
|
|
- <td>{{$vat_name}}</td>
|
|
|
- <td>{{$vat_value > 0 ? formatPrice($vat_value) : ''}}</td>
|
|
|
- @endif
|
|
|
- <td style="float:right">{{formatPrice($this->currencyToDouble($row["amount"]) + $vat_value)}}</td>
|
|
|
- </tr>
|
|
|
- @endforeach
|
|
|
- </table>
|
|
|
+ @endif
|
|
|
|
|
|
- @endif
|
|
|
+ </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">{{!$commercial ? 'Ricevuta' : 'Promemoria pagamento'}} {{$currentReceip ? $currentReceip->number . "/" . $currentReceip->year : ''}}</span></div></div>
|
|
|
+ </header>
|
|
|
|
|
|
- </header>
|
|
|
+ <div class="resume--body d-flex justify-content-between flex-column">
|
|
|
+ <header>
|
|
|
+ @if($this->member)
|
|
|
|
|
|
- <footer>
|
|
|
- <div class="total--wrapper">
|
|
|
- <div class="total--wrapper_amount d-flex align-items-center justify-content-between w-100 mb-3">
|
|
|
- <span class="amount_p"><strong>Importo</strong></span><span class="amount_data"><strong>{{$this->getPrice()}}</strong></span>
|
|
|
+ <ul class="resume-item mb-4 p-0">
|
|
|
+
|
|
|
+ <li>
|
|
|
+ <div style="background-color:#ffffff; padding:10px;">
|
|
|
+ <b>{{$this->member->first_name}} {{$this->member->last_name}}</b> {!! !$this->member->isAdult() ? '<span style="color:red;font-weight:bold"> MINORENNE</span>' : '' !!}<br>
|
|
|
+ <span class="title-form w-100">Codice fiscale</span> : {{$this->member->fiscal_code}}<br>
|
|
|
+ <span class="title-form w-100">Email</span> : {{$this->member->email}}<br>
|
|
|
+ <span class="title-form w-100">Borsellino virtuale</span>
|
|
|
+ <b>{{number_format($virtual, 2, ".", "")}} €</b><br>
|
|
|
+ @if(sizeof($this->member->certificates) > 0)
|
|
|
+ @php
|
|
|
+ $cert = $this->member->certificates[0]
|
|
|
+ @endphp
|
|
|
+ @if($cert->expire_date < date("Y-m-d"))
|
|
|
+ <span class="title-form w-100">Certificato medico </span><span class="badge tessera-badge suspended">scaduto</span>
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
+ @php
|
|
|
+ $status = $this->member->getStatus()["status"];
|
|
|
+ $class = $status > 0 ? ($status == 2 ? 'active' : 'suspended') : 'due';
|
|
|
+ $text = $status > 0 ? ($status == 2 ? 'Tesserato' : 'Sospeso') : 'Non tesserato';
|
|
|
+ @endphp
|
|
|
+ <span class="tablesaw-cell-content"><span class="badge tessera-badge {{$class}}">{{$text}}</span></span>
|
|
|
</div>
|
|
|
- @if(false)
|
|
|
- <div class="total--wrapper_amount d-flex align-items-center justify-content-between w-100 mb-3">
|
|
|
- <span class="amount_p"><strong>Iva</strong></span><span class="amount_data"><strong>{{$this->getVat()}}</strong></span>
|
|
|
- </div>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ @if(!$this->member->isAdult())
|
|
|
+ <li>
|
|
|
+ <span class="evidence_name">
|
|
|
+ <br>Seleziona un genitore
|
|
|
+ <select class="form-control" wire:model="parent">
|
|
|
+ <option value="">Seleziona un genitore
|
|
|
+ @if($this->member->father_name != '')
|
|
|
+ <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}} (C.F. {{$this->member->mother_fiscal_code}})">{{$this->member->mother_name}} (C.F. {{$this->member->mother_fiscal_code}})
|
|
|
+ @endif
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ @endif
|
|
|
+ </ul>
|
|
|
+ @endif
|
|
|
+ <ul class="resume-item date p-0">
|
|
|
+ <li><strong>Data di Pagamento</strong></li>
|
|
|
+ <li>{{ date("d/m/Y", strtotime($date)) }}</li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ @if(sizeof($rows) > 0)
|
|
|
+ <table width="100%">
|
|
|
+ <tr>
|
|
|
+ <td><b>Causale</b></td>
|
|
|
+ @if($commercial == 1)
|
|
|
+ <td><b>Imponibile</b></td>
|
|
|
+ <td><b>% Iva</b></td>
|
|
|
+ <td><b>Iva</b></td>
|
|
|
@endif
|
|
|
- @foreach($this->getVats() as $k => $v)
|
|
|
- <div class="total--wrapper_amount d-flex align-items-center justify-content-between w-100 mb-3">
|
|
|
- <span class="amount_p"><strong>{{$k}}</strong></span><span class="amount_data"><strong>{{formatPrice($v)}}</strong></span>
|
|
|
- </div>
|
|
|
- @endforeach
|
|
|
- <!--<div class="total--wrapper_tax d-flex align-items-center justify-content-between w-100 mb-2 pb-3">
|
|
|
- <span class="taxt_p">Ritenuta d’acconto (20%):</span><span class="tax_data">€ 20,00</span>
|
|
|
- </div>-->
|
|
|
- <div class="total--wrapper_netprice d-flex align-items-center justify-content-between w-100">
|
|
|
- <span class="netprice_p"><strong>Totale</strong></span><span class="netprice_data"><strong>{{$this->getTotal()}}</strong></span>
|
|
|
- </div>
|
|
|
+ <td style="float:right"><b>Totale</b></td>
|
|
|
+ </tr>
|
|
|
+ @foreach($rows as $row)
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ {{$this->getCausal($row["causal_id"])}}<br>
|
|
|
+ {{$row["note"]}}
|
|
|
+ </td>
|
|
|
+ @php
|
|
|
+ $vat_value = 0;
|
|
|
+ @endphp
|
|
|
+ @if($commercial == 1)
|
|
|
+ <td>{{$row["amount"]}}</td>
|
|
|
+ @php
|
|
|
+ $vat_name = '';
|
|
|
+ if ($row["vat_id"] > 0)
|
|
|
+ {
|
|
|
+ $v = \App\Models\Vat::findOrFail(intval($row["vat_id"]));
|
|
|
+ $vat_name = $v->name;
|
|
|
+ $vat_value = $this->currencyToDouble($row["amount"]) / 100 * $v->value;
|
|
|
+ }
|
|
|
+ @endphp
|
|
|
+ <td>{{$vat_name}}</td>
|
|
|
+ <td>{{$vat_value > 0 ? formatPrice($vat_value) : ''}}</td>
|
|
|
+ @endif
|
|
|
+ <td style="float:right">{{formatPrice($this->currencyToDouble($row["amount"]) + $vat_value)}}</td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </table>
|
|
|
+
|
|
|
+ @endif
|
|
|
+
|
|
|
+ </header>
|
|
|
+
|
|
|
+ <footer>
|
|
|
+ <div class="total--wrapper">
|
|
|
+ <div class="total--wrapper_amount d-flex align-items-center justify-content-between w-100 mb-3">
|
|
|
+ <span class="amount_p"><strong>Importo</strong></span><span class="amount_data"><strong>{{$this->getPrice()}}</strong></span>
|
|
|
+ </div>
|
|
|
+ @if(false)
|
|
|
+ <div class="total--wrapper_amount d-flex align-items-center justify-content-between w-100 mb-3">
|
|
|
+ <span class="amount_p"><strong>Iva</strong></span><span class="amount_data"><strong>{{$this->getVat()}}</strong></span>
|
|
|
</div>
|
|
|
+ @endif
|
|
|
+ @foreach($this->getVats() as $k => $v)
|
|
|
+ <div class="total--wrapper_amount d-flex align-items-center justify-content-between w-100 mb-3">
|
|
|
+ <span class="amount_p"><strong>{{$k}}</strong></span><span class="amount_data"><strong>{{formatPrice($v)}}</strong></span>
|
|
|
+ </div>
|
|
|
+ @endforeach
|
|
|
+ <!--<div class="total--wrapper_tax d-flex align-items-center justify-content-between w-100 mb-2 pb-3">
|
|
|
+ <span class="taxt_p">Ritenuta d’acconto (20%):</span><span class="tax_data">€ 20,00</span>
|
|
|
+ </div>-->
|
|
|
+ <div class="total--wrapper_netprice d-flex align-items-center justify-content-between w-100">
|
|
|
+ <span class="netprice_p"><strong>Totale</strong></span><span class="netprice_data"><strong>{{$this->getTotal()}}</strong></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- @if($update && !$isDuplicate && !$deleted)
|
|
|
- @if($currentReceip)
|
|
|
- @if($currentReceip->status == 99)
|
|
|
- <br><b style="float:right">Annullata</b>
|
|
|
- @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
- <span style="color:red">Devi selezionare un genitore</span>
|
|
|
- @else
|
|
|
- <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="update(true)"><i class="ico--ui sendingBtn"></i><span>salva e rigenera ricevuta</span></button>
|
|
|
- @endif
|
|
|
- @else
|
|
|
- <div class="mt-5 buttons--ricevuta d-flex align-items-center">
|
|
|
- <a target="_blank" class="btn--ui me-2 mb-2 mb-xxl-0" href="/receipt/{{$currentReceip->id}}"><i class="fa-regular fa-file-lines"></i><span>stampa ricevuta</span></a>
|
|
|
- <button class="btn--ui " wire:click.prevent="removeReceipt()"><i class="ico--ui annulla_ricevuta light"></i><span>annulla ricevuta</span></button>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
+ @if($update && !$isDuplicate && !$deleted)
|
|
|
+ @if($currentReceip)
|
|
|
+ @if($currentReceip->status == 99)
|
|
|
+ <br><b style="float:right">Annullata</b>
|
|
|
+ @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
+ <span style="color:red">Devi selezionare un genitore</span>
|
|
|
@else
|
|
|
- @if(!$corrispettivo_fiscale)
|
|
|
- @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
- <span style="color:red">Devi selezionare un genitore</span>
|
|
|
- @else
|
|
|
- <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="update(true)"><i class="ico--ui sendingBtn"></i><span>salva {{!$commercial ? ' e genera ricevuta' : ''}}</span></button>
|
|
|
- @endif
|
|
|
- @endif
|
|
|
+ <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="update(true)"><i class="ico--ui sendingBtn"></i><span>salva e rigenera ricevuta</span></button>
|
|
|
@endif
|
|
|
+ @else
|
|
|
+ <div class="mt-5 buttons--ricevuta d-flex align-items-center">
|
|
|
+ <a target="_blank" class="btn--ui me-2 mb-2 mb-xxl-0" href="/receipt/{{$currentReceip->id}}"><i class="fa-regular fa-file-lines"></i><span>stampa ricevuta</span></a>
|
|
|
+ <button class="btn--ui " wire:click.prevent="removeReceipt()"><i class="ico--ui annulla_ricevuta light"></i><span>annulla ricevuta</span></button>
|
|
|
+ </div>
|
|
|
@endif
|
|
|
+ @else
|
|
|
+ @if(!$corrispettivo_fiscale)
|
|
|
+ @if($this->member && !$commercial && !$this->member->isAdult() && $parent == '')
|
|
|
+ <span style="color:red">Devi selezionare un genitore</span>
|
|
|
+ @else
|
|
|
+ <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto" wire:click.prevent="update(true)"><i class="ico--ui sendingBtn"></i><span>salva {{!$commercial ? ' e genera ricevuta' : ''}}</span></button>
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
|
|
|
- </footer>
|
|
|
+ </footer>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <div wire:ignore.self class="modal fade" id="userModal" tabindex="-1" aria-labelledby="userModalLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="userModalLabel">Inserimento nuovo utente</h5>
|
|
|
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-6">
|
|
|
+ <label for="newMemberFirstName" class="form-label">Nome</label>
|
|
|
+ <input class="form-control @error('newMemberFirstName') is-invalid @enderror" type="text" id="newMemberFirstName" placeholder="Nome" wire:model="newMemberFirstName">
|
|
|
</div>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
- </section>
|
|
|
-
|
|
|
- <div wire:ignore.self class="modal fade" id="userModal" tabindex="-1" aria-labelledby="userModalLabel" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title" id="userModalLabel">Inserimento nuovo utente</h5>
|
|
|
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <label for="newMemberLastName" class="form-label">Cognome</label>
|
|
|
+ <input class="form-control @error('newMemberLastName') is-invalid @enderror" type="text" id="newMemberLastName" placeholder="Cognome" wire:model="newMemberLastName">
|
|
|
</div>
|
|
|
- <div class="modal-body">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-6">
|
|
|
- <label for="newMemberFirstName" class="form-label">Nome</label>
|
|
|
- <input class="form-control @error('newMemberFirstName') is-invalid @enderror" type="text" id="newMemberFirstName" placeholder="Nome" wire:model="newMemberFirstName">
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <label for="newMemberLastName" class="form-label">Cognome</label>
|
|
|
- <input class="form-control @error('newMemberLastName') is-invalid @enderror" type="text" id="newMemberLastName" placeholder="Cognome" wire:model="newMemberLastName">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row mt-2">
|
|
|
- <div class="col-md-6">
|
|
|
- <label for="newMemberEmail" class="form-label">Email</label>
|
|
|
- <input class="form-control @error('newMemberEmail') is-invalid @enderror" type="text" id="newMemberEmail" placeholder="Email" wire:model="newMemberEmail">
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <label for="newMemberFiscalCode" class="form-label">Codice fiscale</label>
|
|
|
- <input class="form-control @error('newMemberFiscalCode') is-invalid @enderror" type="text" id="newMemberFiscalCode" placeholder="Codice fiscale" maxlength="16" wire:model="newMemberFiscalCode">
|
|
|
- @if($newMemberFiscalCodeExist)
|
|
|
- <span style="color:red">Il codice fiscale inserito esiste</span>
|
|
|
- @endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row mt-2">
|
|
|
- <div class="col-md-6">
|
|
|
- <input type="checkbox" id="newMemberToComplete" wire:model="newMemberToComplete">
|
|
|
- <label for="newMemberToComplete" class="form-label">Tesserato</label>
|
|
|
- </div>
|
|
|
- <div class="col-md-6"></div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div class="row mt-2">
|
|
|
+ <div class="col-md-6">
|
|
|
+ <label for="newMemberEmail" class="form-label">Email</label>
|
|
|
+ <input class="form-control @error('newMemberEmail') is-invalid @enderror" type="text" id="newMemberEmail" placeholder="Email" wire:model="newMemberEmail">
|
|
|
</div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn--ui lightGrey" data-bs-dismiss="modal">Annulla</button>
|
|
|
- <button type="button" class="btn--ui btn-primary" wire:click.prevent="createMember()">Salva</button>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <label for="newMemberFiscalCode" class="form-label">Codice fiscale</label>
|
|
|
+ <input class="form-control @error('newMemberFiscalCode') is-invalid @enderror" type="text" id="newMemberFiscalCode" placeholder="Codice fiscale" maxlength="16" wire:model="newMemberFiscalCode">
|
|
|
+ @if($newMemberFiscalCodeExist)
|
|
|
+ <span style="color:red">Il codice fiscale inserito esiste</span>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <div class="row mt-2">
|
|
|
+ <div class="col-md-6">
|
|
|
+ <input type="checkbox" id="newMemberToComplete" wire:model="newMemberToComplete">
|
|
|
+ <label for="newMemberToComplete" class="form-label">Tesserato</label>
|
|
|
</div>
|
|
|
+ <div class="col-md-6"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- @endif
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn--ui lightGrey" data-bs-dismiss="modal">Annulla</button>
|
|
|
+ <button type="button" class="btn--ui btn-primary" wire:click.prevent="createMember()">Salva</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+
|
|
|
+ @endif
|
|
|
</div>
|
|
|
+
|
|
|
@push('scripts')
|
|
|
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
|
|
|
<style>
|