RICEVUTA DI PAGAMENTO N. {{$receipt->number . "/" . $receipt->year}} del {{date("d/m/Y", strtotime($receipt->created_at))}}
@if($receipt->status == 99)
ANNULLATA
@endif
{{env('RAGIONE_SOCIALE', '')}}
Indirizzo: {{env('INDIRIZZO', '')}} {{env('LOCALITA', '')}} ({{env('PROVINCIA', '')}})
C.F.: {{env('CODICE_FISCALE', '')}}
P.IVA: {{env('PARTITA_IVA', '')}}
Intestata a
@if(!$receipt->member->isAdult())
Genitore: {{$receipt->parent}}
@endif
@if($receipt->member->last_name != '')
Cognome: {{$receipt->member->last_name}}
@endif
@if($receipt->member->first_name != '')
Nome: {{$receipt->member->first_name}}
@endif
@if(@$receipt->member->birth_city->name != '' || @$receipt->member->birth_province->name != '' || @$receipt->member->birth_date != '')
Nato/a a:
@if(@$receipt->member->birth_city->name != '')
{{@$receipt->member->birth_city->name}}
@endif
@if(@$receipt->member->birth_province->name != '')
({{@$receipt->member->birth_province->name}})
@endif
@if(@$receipt->member->birth_date != '')
il {{$receipt->member->birth_date ? date("d/m/Y", strtotime($receipt->member->birth_date)) : ""}}
@endif
@endif
@if($receipt->member->address != '' || @$receipt->member->city->name != '' || @$receipt->member->province->name != '')
Residente in:
@if($receipt->member->address != '')
{{$receipt->member->address}}
@endif
@if(@$receipt->member->city->name != '')
{{@$receipt->member->city->name}}
@endif
@if(@$receipt->member->province->name != '')
({{@$receipt->member->province->name}})
@endif
@endif
@if($receipt->member->fiscal_code != '')
Codice Fiscale: {{$receipt->member->fiscal_code}}
@endif
@php
$total = 0;
$totalSconto = 0;
$totalPrediscount = 0;
$hasDiscount = false;
@endphp
@foreach($receipt->rows as $row)
Causale: {{@$row->causal->getTree()}}
Dettaglio causale: {{$row->note != '' ? $row->note : ''}}
@if($row->sconto > 0)
@php $hasDiscount = true; @endphp
Importo: {{formatPrice($row->prediscount_amount)}}
Sconto: {{formatPrice($row->sconto)}}
@endif
{{$row->sconto > 0 ? 'Importo finale' : 'Importo'}}: {{formatPrice($row->amount)}}
@php
$totalSconto += $row->sconto;
$totalPrediscount += $row->prediscount_amount;
$total += $row->amount;
@endphp
@endforeach
@if($hasDiscount)
Totale prescontato: {{formatPrice($totalPrediscount)}}
Sconto totale: {{formatPrice($totalSconto)}}
@endif
Totale: {{formatPrice($total)}}