@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 @method('PUT')
  • {{ __('OrderNo') }} : {{ @$main->order?->no }}

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

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

    language == 'th') checked @endif>
    language == 'en') checked @endif>
  • {{ __('Headoffice / Branch') }}

    is_headoffice == 1) checked @endif>
    is_headoffice == 0) checked @endif>
  • @php $total = @$main->total + @$main->shipping_price + @$main->urgent_price; $total_after_discount = $total - @$main->discount_price; $total_excluded_vat = $total_after_discount - $main->vat_price; @endphp

    {{ __('Total Price') }}

    {{ number_format(@$main->total, 2) }}

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

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

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

    {{ number_format($main->urgent_price, 2) }}

    {{ __('Total') }}:

    {{ number_format($total, 2) }}


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

    - {{ number_format(@$main->discount_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(@$main->vat_price ?? 0, 2) }}


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

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

{{ __('back') }}
@foreach (@$main->order->getDetails as $key => $item) @endforeach @for ($i = count(@$main->order->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