| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- <div>
- @if(!$add && !$update)
- <header id="title--section" 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 utenti me-2"></i>
- <h2 class="primary">@if(!$add && !$update)Elenco Entrate @else Inserimento/modifica entrata @endif</h2>
- </div>
- @if(!$add && !$update)
- <div class="title--section_addButton">
- <div class="card--ui card--ui_btnAddHeaderUser entrata d-flex justify-items-between">
- <header class="d-flex justify-content-between"><div class="card-title d-flex align-items-start"><h2><small>Registra</small><br>Nuova Entrata</h2></div><a href="#" wire:click="add()"><i class="ico--ui big add primary"></i></a></header>
- </div>
- </div>
- @endif
- </header>
- <section id="subheader" class="d-flex align-items-center justify-content-between">
- <!--
- <form action="" class="group--action d-flex align-items-center">
- <select class="form-select form-select-lg me-1" aria-label=".form-select-lg example">
- <option selected>Open this select menu</option>
- <option value="1">One</option>
- <option value="2">Two</option>
- <option value="3">Three</option>
- </select>
- <button type="submit" class="btn--ui">applica</button>
- </form>
- -->
- <form action="" class="compare--form d-flex align-items-center">
- <select class="form-select form-select-lg me-1" aria-label=".form-select-lg example" wire:model="selectedFilter">
- <option value="0">Oggi</option>
- <option value="1">Questo mese: <span class="date-range">{{date("01/m/Y")}} - {{date("t/m/Y")}}</span></option>
- <option value="2">Questo anno: <span class="date-range">{{date("01/01/Y")}} - {{date("31/12/Y")}}</span></option>
- <option value="3">Tutte</option>
- </select>
- </form>
- </section>
- <section id="resume-table">
- <div class="compare--chart_wrapper d-none"></div>
- <table class="table tablesaw tablesaw-stack" data-tablesaw="" id="tablesaw-350">
- <thead>
- <tr>
- <th scope="col">Data</th>
- <th scope="col">Importo</th>
- <th scope="col">Persona</th>
- <th scope="col">Causale</th>
- <th scope="col">Pagamento</th>
- <th scope="col">...</th>
- </tr>
- </thead>
- <tbody id="checkall-target">
- @foreach($records as $record)
- <tr>
- <td>{{date("d/m/Y", strtotime($record->date))}}</td>
- <td><span class="tablesaw-cell-content primary">€ {{$record->amount}}</span></td>
- <td>{{$record->member->first_name}}</td>
- <td>{{$record->causal->getTree()}}</td>
- <td>{{$record->payment_method->name}}</td>
- <td>
- <button type="button" class="btn btn-outline-primary btn-sm" wire:click="edit({{ $record->id }})">Modifica</button>
- <button type="button" class="btn btn-outline-danger btn-sm" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="delete({{ $record->id }})">Elimina</button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <!--
- <div class="paginator d-flex justify-content-center">
- <nav aria-label="Page navigation example">
- <ul class="pagination">
- <li class="page-item">
- <a class="page-link" href="#" aria-label="Previous">
- <span aria-hidden="true"></span>
- </a>
- </li>
- <li class="page-item"><a class="page-link" href="#">1</a></li>
- <li class="page-item"><a class="page-link" href="#">2</a></li>
- <li class="page-item"><a class="page-link" href="#">3</a></li>
- <li class="page-item"><a class="page-link" href="#">3</a></li>
- <li class="page-item"><span class="more-page">...</span></li>
- <li class="page-item">
- <a class="page-link" href="#" aria-label="Next">
- <span aria-hidden="true"></span>
- </a>
- </li>
- </ul>
- </nav>
- </div>
- -->
- </section>
- @else
- <header id="title--section" 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">{{$add ? 'Nuova' : 'Modifica'}} Entrata</h2>
- </div>
- <div class="title--section_invoice d-flex align-items-center">
- <span class="tipology me-2">Tipologia:</span>
- <div class="check--invoice d-flex align-items-center">
- <div class="form-check me-3">
- <input class="form-check-input" type="radio" value="1" id="commercial" wire:model="commercial">
- <label class="form-check-label" for="flexCheckChecked">
- Commerciale
- </label>
- </div>
- <div class="form-check">
- <input class="form-check-input" type="radio" value="0" id="commercial" wire:model="commercial">
- <label class="form-check-label" for="flexCheck">
- Non Commerciale
- </label>
- </div>
- </div>
- </div>
- </header>
- <section id="accountingEntry" class="d-flex">
- <div class="accountingEntry_data">
- <form class="form--accounting">
- <div class="row gx-2">
- <div class="col-md-6">
- <span class="title-form d-block w-100">Data</span>
- <div class="input-group mb-3">
- <input id="date" type="date" class="form-control" wire:model="date">
- </div>
- </div>
- <div class="col-md-6">
- </div>
- <div class="col-md-6">
- <span class="title-form d-block w-100">Persona</span>
- <select name="member_id" class="form-select @error('member_id') is-invalid @enderror" aria-label="Seleziona una persona" wire:model="member_id">
- <option value="">--Seleziona--
- @foreach($members as $member)
- <option value="{{$member->id}}">{{$member->first_name}} {{$member->last_name}}
- @endforeach
- </select>
- </div>
- <div class="col-md-3"></div>
- <div class="col-md-3">
- @if($this->member)
- <span class="title-form d-block w-100">Borsellino virtuale</span>
- <b>{{number_format($virtual, 2, ".", "")}} €</b>
- @endif
- </div>
- </div>
- <div class="row gx-2 mt-5">
- <span class="title-form d-block w-100">Casuale</span>
- <div class="col-md-12">
- <select name="causal_id" class="form-select @error('causal_id') is-invalid @enderror" aria-label="Seleziona una causale" wire:model="causal_id">
- <option value="">--Seleziona--
- @foreach($causals as $causal)
- <option value="{{$causal["id"]}}">{{$causal["name"]}}
- @endforeach
- </select>
- </div>
- </div>
- <div class="row gx-2 mt-5 align-items-center">
- <div class="col-md-6">
- <span class="total primary">Importo</span>
- </div>
- <div class="col-md-6">
- @if($add)
- <input type="number" class="form-control totalInput text-end @error('amount') is-invalid @enderror" id="amount" placeholder="€ 0,00" wire:model="amount" wire:keydown.enter="save()">
- @endif
- @if($update)
- <input type="number" class="form-control totalInput text-end @error('amount') is-invalid @enderror" id="amount" placeholder="€ 0,00" wire:model="amount" wire:keydown.enter="update()">
- @endif
- @error('amount')
- <div class="invalid-feedback">{{ $message }}</div>
- @enderror
- </div>
- </div>
- <div class="row gx-2 mt-5">
- <span class="title-form d-block w-100">Pagamento</span>
- <div class="col-md-12">
- <label for="payment_method_id" class="form-label">Modalità di Pagamento</label>
- <select name="payment_method_id" class="form-select @error('payment_method_id') is-invalid @enderror" aria-label="Seleziona un metodo di pagamento" wire:model="payment_method_id">
- <option value="">--Seleziona--
- @foreach($payments as $payment)
- <option value="{{$payment->id}}">{{$payment->name}}
- @endforeach
- </select>
- </div>
- </div>
- <div class="accountingEntry--btn d-flex align-items-center justify-content-between">
- <button class="btn--ui lightGrey" type="submit" wire:click.prevent="cancel()">annulla</button>
- @if($canSave)
- @if($add)
- <button class="btn--ui primary" type="submit" wire:click.prevent="store()">inserisci</button>
- @endif
- @if($update)
- <button class="btn--ui primary" type="submit" wire:click.prevent="update()">salva</button>
- @endif
- @else
- <span style="color:red">Attenzione : non c'è credito sufficiente sul borsellino virtuale</span>
- @endif
- </div>
- </form>
- </div>
- <div class="accountingEntry_resume card--ui">
- <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</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><span class="evidence_name">{{$this->member->first_name}}</span></li>
- <li><span>Nato/a il {{$this->member->birth_date ? date("d/m/Y", strtotime($this->member->birth_date)) : ''}}</span></li>
- </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($this->causal)
- <ul class="resume-item date p-0">
- <li><strong>Casuale</strong></li>
- <li>{{$this->causal->getTree()}}</li>
- </ul>
- @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>€ {{$amount}}</strong></span>
- </div>
- <!--<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 Netto</strong></span><span class="netprice_data"><strong>€ {{$amount}}</strong></span>
- </div>
- </div>
- <button class="btn--ui primary sendInvoice mt-5 d-flex ms-auto"><i class="ico--ui sendingBtn"></i>invia ricevuta</button>
- </footer>
- </div>
- </div>
- </section>
- @endif
- </div>
|