@extends('layout') @section('h4-page', __('Create Taxinvoice')) @section('contents')
@if (session('success')) @endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf
  • {{ __('OrderNo') }} : {{ @$main->no }}

    {{ date('d-m-Y', strtotime(@$main->date)) }}

  • {{ __('Document Language') }}

  • {{ __('Headoffice / Branch') }}

  • @php $option_shipping = json_decode(@$main->option_shipping); $option_shipping = @$option_shipping ? (float)$option_shipping[0]->price : 0; $total_service = @$main->total_price - @$option_shipping - @$main->shipping_price + @$main->promotion_price ?? 0; $total = $total_service + @$main->shipping_price + @$option_shipping ?? 0; $total_after_discount = $total - @$main->promotion_price ?? 0; $vat = ($total_after_discount * 7) / 107; $total_excluded_vat = $total_after_discount - $vat; @endphp

    {{ __('Total Price') }}

    {{ number_format(@$total_service, 2) }}

    {{ __('Shipping Price') }}:

    {{ number_format(@$main->shipping_price ?? 0, 2) }}

    {{ __('Urgent Cost') }}:

    {{ number_format($option_shipping, 2) }}

    {{ __('Total') }}:

    {{ number_format($total, 2) }}


    {{ __('Discount') }}: @if($main->redeem_code_id) ( {{ $main->redeemCode->detail }} ) @endif

    - {{ number_format(@$main->promotion_price ?? 0, 2) }}

    {{ __('After Discount') }}

    {{ number_format(@$total_after_discount ?? 0, 2) }}


    {{ __('Total Price Not Include VAT') }}

    {{ number_format(@$total_excluded_vat ?? 0, 2) }}

    {{ __('VAT 7%') }}

    {{ number_format(@$vat ?? 0, 2) }}


    {{ __('Grand total') }}:

    {{ number_format(@$total_after_discount ?? 0, 2) }}

{{ __('back') }}
@foreach (@$main->getDetails as $key => $item) @endforeach @for ($i = count(@$main->getDetails); $i <= 24; $i++) @endfor
# {{ __('ProductName') }} {{ __('ServiceName') }} {{ __('qty') }} {{ __('price') }} {{ __('unit') }} {{ __('total') }}
{{ $key + 1 }} {{ $item->product?->name }} {{ $item->service?->name }} {{ $item->qty }} {{ number_format($item->price ?? 0, 2) }} {{ $item->units?->name }} {{ number_format($item->qty * $item->price, 2) }}

{{ __('History') }}

@csrf
  • {{ __('Image') }}

    example placeholder
@foreach ($main->historyOrder ?? [] as $key => $item)

{{ __('HistoryType') }} : {{ $item->type }} & {{ __('Date') }} : {{ $item->created_at }}

{{ $item->comment }}

{{ __('CreateBy') }} :{{ $item->createBy?->account()?->fullname() }}

@foreach ($item->ImageHistory ?? [] as $key => $value) img @endforeach
@endforeach
{{-- --}} {{--
--}}
@endsection @section('scripts') @endsection