@php
$header_discount = 0;
@endphp
@if($eii)
@foreach($eii as $tid)
@php
$header_discount += $tid->item_discount;
@endphp
@endforeach
@endif
@if($eiP)
@foreach($eiP as $prod)
@php
$header_discount += $prod->product_discount;
@endphp
@endforeach
@endif
@if($packagesData)
@foreach( $packagesData as $package )
@php
$header_discount += $package->package_discount;
@endphp
@endforeach
@endif
@if($courseData)
@php
$header_discount += $courseData->discount;
@endphp
@endif
| Description |
Code |
Cost |
@if($header_discount > 0)
Discount |
@endif
GST |
Price |
@php
$total=0;
$maintotal=0;
$totalgst = 0;
$totalgst1 = 0;
$totalgstItem = 0;
$totalgst1Item = 0;
$appPrice=0;
$productPrice=0;
$gst = 0;
$item_discount = 0;
@endphp
@isset($existinvoice)
@if($eiP)
@foreach($eiP as $prod)
@if($prod->product_iteams)
@php
$maintotal += $prod->deduct_quantity * $prod->product_cost;
@endphp
@if($prod->product_iteams->is_gst == 'on')
| * {{$prod->deduct_quantity}} {{"x"}} {{$prod->product_iteams->product_name}} |
@else
{{$prod->deduct_quantity}} {{"x"}} {{$prod->product_iteams->product_name}} |
@endif
{{$prod->product_iteams->product_code}} |
${{number_format($prod->product_cost,2)}} |
@if($prod->product_discount > 0)
${{number_format($prod->product_discount,2)}} |
@else
@if($header_discount > 0)
|
@endif
@endif
@php $grandTotalGst = 0; @endphp
@if($prod->product_iteams->is_gst =='on')
@php
$itemGST = (( $prod->deduct_quantity * $prod->product_cost ) - $prod->product_discount);
$grandTotalGst += $itemGST;
$totalgst += $itemGST;
$item_discount += $prod->product_discount;
$GST_Text = '10%';
@endphp
@else
@php
$itemGST = 0;
$grandTotalGst += $itemGST;
$totalgst += 0;
$item_discount += $prod->product_discount;
$GST_Text = 'FREE';
@endphp
@endif
{{ $GST_Text }} |
{{-- ${{number_format($itemGST,2)}} | --}}
${{number_format($prod->deduct_quantity * $prod->product_cost - $prod->product_discount,2)}} |
@endif
@endforeach
@endif
@if($eii)
@foreach($eii as $tid)
@if($tid->appointment_type)
@php
$discount = (!is_null($tid->item_discount)) ? $tid->item_discount : 0.00;
$total = ($tid->app_cost * $tid->item_qty) - $discount;
@endphp
@if($tid->appointment_type->is_gst == 'on')
| * {{$tid->item_qty ?? ""}} {{"x"}} {{$tid->appointment_type->appointment_type ?? ""}} |
@else
{{$tid->item_qty ?? ""}} {{"x"}} {{$tid->appointment_type->appointment_type ?? ""}} |
@endif
{{$tid->appointment_type->code}} |
${{number_format($tid->app_cost,2)}} |
@if($tid->item_discount > 0)
${{number_format($tid->item_discount,2)}} |
@else
@if($header_discount > 0)
|
@endif
@endif
@php $grandTotalGst = 0; @endphp
@if( $tid->appointment_type->is_gst == "on" )
@php
$itemGST = (( $tid->item_qty * $tid->app_cost ) - $tid->item_discount);
$grandTotalGst += $itemGST;
$totalgst += $itemGST;
$item_discount += $tid->item_discount;
$GST_Text = "10%";
@endphp
@else
@php
$itemGST = 0;
$grandTotalGst += $itemGST;
$totalgst += 0;
$item_discount += $tid->item_discount;
$GST_Text = "FREE";
@endphp
@endif
{{$GST_Text}} |
{{-- ${{number_format($itemGST,2)}} | --}}
${{number_format($tid->app_cost * $tid->item_qty - $tid->item_discount,2)}} |
@endif
@endforeach
@endif
@if($packagesData)
@foreach($packagesData as $tid)
@if($tid->package_id)
@php
$discount = (!is_null($tid->package_discount)) ? $tid->package_discount : 0.00;
$total = ($tid->package_cost * $tid->package_quantity) - $discount;
@endphp
@if($tid->is_gst == 'on')
| * {{$tid->package_quantity ?? ""}} {{"x"}} {{$tid->package->package_name ?? ""}} |
@else
{{$tid->package_quantity ?? ""}} {{"x"}} {{$tid->package->package_name ?? ""}} |
@endif
|
${{number_format($tid->package_cost,2)}} |
@if($tid->package_discount > 0)
${{number_format($tid->package_discount,2)}} |
@else
@if($header_discount > 0)
|
@endif
@endif
@php $grandTotalGst = 0; @endphp
@if( $tid->is_gst == "on" )
@php
$itemGST = (( $tid->package_quantity * $tid->package_cost ) - $tid->package_discount);
$grandTotalGst += $itemGST;
$totalgst += $itemGST;
$item_discount += $tid->package_discount;
$GST_Text = "10%";
@endphp
@else
@php
$itemGST = 0;
$grandTotalGst += $itemGST;
$totalgst += 0;
$item_discount += $tid->package_discount;
$GST_Text = "FREE";
@endphp
@endif
{{$GST_Text}} |
{{-- ${{number_format($itemGST,2)}} | --}}
${{number_format($tid->package_cost * $tid->package_quantity - $tid->package_discount,2)}} |
@endif
@endforeach
@endif
@if($courseData)
@if($courseData->course_id)
@php
$discount = (!is_null($courseData->discount)) ? $courseData->discount : 0.00;
$total = $courseData->course_cost - $discount;
@endphp
@if($courseData->is_new_takings_gst == 1)
| * {{$courseData->course->course_name ?? ""}} |
@else
{{$courseData->course->course_name ?? ""}} |
@endif
|
${{number_format($courseData->course_cost,2)}} |
@if($courseData->discount > 0)
${{number_format($courseData->discount,2)}} |
@else
@if($header_discount > 0)
|
@endif
@endif
@php $grandTotalGst = 0; @endphp
@if( $courseData->is_new_takings_gst == 1 )
@php
$itemGST = $courseData->course_cost - $courseData->discount;
$grandTotalGst += $itemGST;
$totalgst += $itemGST;
$item_discount += $courseData->discount;
$GST_Text = "10%";
@endphp
@else
@php
$itemGST = 0;
$grandTotalGst += $itemGST;
$totalgst += 0;
$item_discount += $courseData->discount;
$GST_Text = "FREE";
@endphp
@endif
{{$GST_Text}} |
{{-- ${{number_format($itemGST,2)}} | --}}
${{number_format($courseData->course_cost - $courseData->discount,2)}} |
@endif
@endif
@else
@if($appointment->appointment_type->is_gst == 'on')
* {{$tid->item_qty ?? ""}} {{"x"}} {{$appointment->appointment_type->appointment_type}} |
@else
{{$tid->item_qty ?? ""}} {{"x"}} {{$appointment->appointment_type->appointment_type}} |
@endif
{{"$".$appointment->appointment_type->fee}} |
@endisset