KSSTM Ticket @php $invoice_date = $invoice->invoice_date; $invoice_month = date('m',strtotime($invoice_date)); $invoice_year = date('Y',strtotime($invoice_date)); $invoice_no = $invoice->invoice_no; $org_code = $invoice->organisation->short_code; if($invoice_month<4) $invoice_year--; $nextyear = $invoice_year+1; $invoice_number = $org_code.'/'.$invoice_no.'/'.$invoice_year.'-'.$nextyear; @endphp @foreach($tickets as $ticket) @php $ticket_number = $org_code.'/'.$ticket->facility->short_code.'/'.$ticket->ticket_no.'/'.$invoice_year.'-'.$nextyear; $secretkey='KSSTM'.$ticket_number.$invoice_date; $secretmd5 = md5($secretkey); $qr_string=$ticket_number.'~'.$invoice_date.'~'.'Adult:'.$ticket->noof_adult.'~'.'Child:'.$ticket->noof_child.'~'.'Secret:'.$secretmd5; @endphp

@php $address=""; $address1=""; $address2=""; $phone_number= ""; @endphp @if(isset($ticket->invoice->organisation->organisation_name)) @php $organisation_name = $ticket->invoice->organisation->organisation_name; @endphp @endif @if(isset($ticket->invoice->organisation->addess1)) @php $address1 = $ticket->invoice->organisation->addess1; @endphp @endif @if(isset($ticket->invoice->organisation->addess2)) @php $address2 = ",".$ticket->invoice->organisation->addess2; @endphp @endif @if(isset($ticket->invoice->organisation->city)) @php $address =$ticket->invoice->organisation->city; @endphp @endif @if(isset($ticket->invoice->organisation->pincode)) @php $address .= ",".$ticket->invoice->organisation->pincode; @endphp @endif @if(isset($ticket->invoice->organisation->phone_number)) @php $phone_number = $ticket->invoice->organisation->phone_number; @endphp @endif {{$organisation_name}}
@if($address1) {{$address1}} @endif @if($address2) {{$address2}}
@endif {{$address}}
PH : {{$phone_number}}


@if($ticket->invoice->visitor_name) @endif
Visitor : {{$ticket->invoice->visitor_name}} @if($ticket->invoice->visitor_phone_number) , {{$ticket->invoice->visitor_phone_number}} @endif
Ticket # : {{$org_code}}/{{$ticket->facility->short_code}}/{{$ticket->ticket_no}}/{{$invoice_year}}-{{$nextyear}}
Date : {{date('d-m-Y', strtotime($ticket->show_date))}}
Center : {{$invoice->organisation->organisation_name}}, {{$invoice->organisation->city}}

{{$ticket->facility->facility_name}}

@if($ticket->facility->timedshowflag)
Time::{{date("h:i A", strtotime($ticket->showtime->from_time))}}
@endif
  Qty Unit Rate Sub Total
Adult @if($ticket->noof_adult) {{$ticket->noof_adult}} @else 0 @endif @if($ticket->noof_adult) {{number_format($ticket->adult_rate,0)}} @else - @endif @if($ticket->noof_adult) @php $subtotal = $ticket->noof_adult * $ticket->adult_rate; @endphp {{number_format($subtotal,0)}} @else - @endif
Child @if($ticket->noof_child) {{$ticket->noof_child}} @else 0 @endif @if($ticket->noof_child) {{number_format($ticket->child_rate,0)}} @else - @endif @if($ticket->noof_child) @php $subtotal = $ticket->noof_child * $ticket->child_rate; @endphp {{number_format($subtotal,0)}} @else - @endif
Total @php echo $total_seats = $ticket->noof_adult+$ticket->noof_child; @endphp Amount ₹{{number_format($ticket->amount,0)}}
Payment:@if($ticket->invoice->payment_type==1) @php echo "Online"; @endphp @else {{$ticket->invoice->paymentmethod->method}} @endif  (₹ {{number_format($ticket->amount,0)}}/-)
@if($ticket->facility->fixedseatflag)
Seats@php $seatarr=[]; for($i=1; $i<=$totalrows; $i++) { $printseatstring=''; $firstseat=''; $prevrowname=''; $colcount=0; @endphp @foreach($seat_name_row[$i] as $rowseatname) @php $colcount++; if(in_array($rowseatname, $seatname_ticket)) { if(!$firstseat) { $firstseat = $rowseatname; $printseatstring = $firstseat; } $prevrowname = $rowseatname; if($colcount==sizeof($seat_name_row[$i]) && $firstseat!=$rowseatname) { $printseatstring .= '-'.$rowseatname; } } else { if($prevrowname) $printseatstring .= '-'.$prevrowname; $prevrowname = ''; $firstseat =''; if($printseatstring) { //echo $printseatstring.", "; $seatarr[] = $printseatstring; } $printseatstring = ''; } @endphp @endforeach @php if($printseatstring) { //echo $printseatstring." ,"; $seatarr[] = $printseatstring; } } //print_r($seatarr); $d=1; $seatarrsize = sizeof($seatarr); for($c=0;$c<$seatarrsize;$c++) { echo $seatarr[$c]; if(!($c==$seatarrsize-1)) echo ", "; if($d%3==0 && $c!=($seatarrsize-1) && $c!=0) { echo "
"; } $d++; } @endphp
@endif @if(!$counter_user_name) @php $counter_user_name = ""; @endphp @endif @php $issuedat = date("d-M-Y h:i A"); @endphp
Issued By   {{$counter_user_name}}  [{{$issuedat}}]
@php $rand = rand(0,(sizeof($trivia)-1)); @endphp
***{{$trivia[$rand]->trivia}}***
@if($ticket->facility->timedshowflag)
Report atleast 15 minutes before show time.
@endif
Thank You! Visit Again..

@endforeach