{{ __('Sales Trend') }}

@error('from_date1') {{ $message }} @enderror
@error('to_date1') {{ $message }} @enderror
@error('from_date2') {{ $message }} @enderror
@error('to_date2') {{ $message }} @enderror
@error('id_pricelist') {{ $message }} @enderror
@if ($id_pricelist != "")
@if ($flagWhs) @else Warehouse is required. @endif
@endif
@error('resume_group') {{ $message }} @enderror
@if ($show_onhand) @endif
@if ($issearch) @else @endif
@if ($level == 1)

{{ __('Sales Trend Report') }}

Period

:

@if ($from_date1 == $to_date1) {{ date('j F Y', strtotime($from_date1)) }} @else {{ date('j F Y', strtotime($from_date1)) }} - {{ date('j F Y', strtotime($to_date1)) }} @endif vs @if ($from_date2 == $to_date2) {{ date('j F Y', strtotime($from_date2)) }} @else {{ date('j F Y', strtotime($from_date2)) }} - {{ date('j F Y', strtotime($to_date2)) }} @endif

Group by

:

@if ($show_onhand) @endif @if ($show_onhand) @endif @php $total_qty1 = 0; $total_gross1 = 0; $total_disc1 = 0; $total_nett1 = 0; $total_qty2 = 0; $total_gross2 = 0; $total_disc2 = 0; $total_nett2 = 0; $total_growth = 0; @endphp @if ($show_onhand) @php $total_onhand1 = 0; $total_onhand2 = 0; @endphp @endif @foreach($data as $item) @if ($show_onhand) @endif @if ($show_onhand) @endif @php $total_qty1 += $item['qty1']; $total_gross1 += $item['gross1']; $total_disc1 += $item['disc1']; $total_nett1 += $item['nett1']; $total_qty2 += $item['qty2']; $total_gross2 += $item['gross2']; $total_disc2 += $item['disc2']; $total_nett2 += $item['nett2']; @endphp @if ($show_onhand) @php $total_onhand1 += $item['onhand1']; $total_onhand2 += $item['onhand2']; @endphp @endif @endforeach @php if ($total_nett1 == 0 && $total_nett2 == 0) { $growth = 0; } elseif ($total_nett1 == 0 && $total_nett2 > 0) { $growth = 100; } elseif ($total_nett1 == 0 && $total_nett2 < 0) { $growth=-100; } else { $growth=($total_nett2 - $total_nett1) / $total_nett1 * 100; } @endphp @if ($show_onhand) @endif @if ($show_onhand) @endif
# {{ __('Warehouse') }} @if ($groupname == '') Group @else {{ $groupname }} @endif {{ __('Qty1') }} {{ __('Gross1') }} {{ __('Disc1') }} {{ __('Nett1') }}{{ __('OnHand1') }}{{ __('Qty2') }} {{ __('Gross2') }} {{ __('Disc2') }} {{ __('Nett2') }}{{ __('OnHand2') }}{{ __('Growth') }} {{ __('Action') }}
{{ $loop->iteration }} {{ $item['whs'] }} {{ $item['group'] }} {{ number_format($item['qty1']) }} {{ number_format($item['gross1']) }} {{ number_format($item['disc1']) }} {{ number_format($item['nett1']) }}{{ number_format($item['onhand1']) }}{{ number_format($item['qty2']) }} {{ number_format($item['gross2']) }} {{ number_format($item['disc2']) }} {{ number_format($item['nett2']) }}{{ number_format($item['onhand2']) }}{{ number_format($item['var'], 2) . '%' }}
Total {{ number_format($total_qty1) }} {{ number_format($total_gross1) }} {{ number_format($total_disc1) }} {{ number_format($total_nett1) }}{{ number_format($total_onhand1) }}{{ number_format($total_qty2) }} {{ number_format($total_gross2) }} {{ number_format($total_disc2) }} {{ number_format($total_nett2) }}{{ number_format($total_onhand2) }}{{ number_format($growth, 2) . '%' }}
@endif @if ($level == 2)

{{ __('Report Sales Trend - Level II') }}

@if ($issearchgroup2)
@endif

Period

:

@if ($from_date1 == $to_date1) {{ date('j F Y', strtotime($from_date1)) }} @else {{ date('j F Y', strtotime($from_date1)) }} - {{ date('j F Y', strtotime($to_date1)) }} @endif vs @if ($from_date2 == $to_date2) {{ date('j F Y', strtotime($from_date2)) }} @else {{ date('j F Y', strtotime($from_date2)) }} - {{ date('j F Y', strtotime($to_date2)) }} @endif

Group by

:

@if ($show_onhand) @endif @if ($show_onhand) @endif @php $total_qty1 = 0; $total_gross1 = 0; $total_disc1 = 0; $total_nett1 = 0; $total_qty2 = 0; $total_gross2 = 0; $total_disc2 = 0; $total_nett2 = 0; @endphp @if ($show_onhand) @php $total_onhand1 = 0; $total_onhand2 = 0; @endphp @endif @foreach($data_group2 as $item) @if ($show_onhand) @endif @if ($show_onhand) @endif @php $total_qty1 += $item['qty1']; $total_gross1 += $item['gross1']; $total_disc1 += $item['disc1']; $total_nett1 += $item['nett1']; $total_qty2 += $item['qty2']; $total_gross2 += $item['gross2']; $total_disc2 += $item['disc2']; $total_nett2 += $item['nett2']; @endphp @if ($show_onhand) @php $total_onhand2 += $item['onhand2']; @endphp @endif @endforeach @php if ($total_nett1 == 0 && $total_nett2 == 0) { $growth = 0; } elseif ($total_nett1 == 0 && $total_nett2 > 0) { $growth = 100; } elseif ($total_nett1 == 0 && $total_nett2 < 0) { $growth=-100; } else { $growth=($total_nett2 - $total_nett1) / $total_nett1 * 100; } @endphp @if ($show_onhand) @endif @if ($show_onhand) @endif
# {{ __('Warehouse') }} {{ $groupname }} {{ $groupname2 }} {{ __('Qty1') }} {{ __('Gross1') }} {{ __('Disc1') }} {{ __('Nett1') }}{{ __('OnHand1') }}{{ __('Qty2') }} {{ __('Gross2') }} {{ __('Disc2') }} {{ __('Nett2') }}{{ __('OnHand2') }}{{ __('Growth') }} {{ __('Action') }}
{{ $loop->iteration }} {{ $item['whs'] }} {{ $item['group'] }} {{ $item['group2'] }} {{ number_format($item['qty1']) }} {{ number_format($item['gross1']) }} {{ number_format($item['disc1']) }} {{ number_format($item['nett1']) }}{{ number_format($item['onhand1']) }}{{ number_format($item['qty2']) }} {{ number_format($item['gross2']) }} {{ number_format($item['disc2']) }} {{ number_format($item['nett2']) }}{{ number_format($item['onhand2']) }}{{ number_format($item['var'], 2) . '%' }}
Total {{ number_format($total_qty1) }} {{ number_format($total_gross1) }} {{ number_format($total_disc1) }} {{ number_format($total_nett1) }}{{ number_format($total_onhand1) }}{{ number_format($total_qty2) }} {{ number_format($total_gross2) }} {{ number_format($total_disc2) }} {{ number_format($total_nett2) }}{{ number_format($total_onhand2) }}{{ number_format($growth, 2) . '%' }}
@endif @if ($level == 3)

{{ __('Report Sales Trend - Level III') }}

@if ($issearchgroup3)
@endif

Period

:

@if ($from_date1 == $to_date) {{ date('j F Y', strtotime($from_date1)) }} @else {{ date('j F Y', strtotime($from_date1)) }} - {{ date('j F Y', strtotime($to_date1)) }} @endif vs @if ($from_date2 == $to_date) {{ date('j F Y', strtotime($from_date2)) }} @else {{ date('j F Y', strtotime($from_date2)) }} - {{ date('j F Y', strtotime($to_date2)) }} @endif

Group by

:

@if ($show_onhand) @endif @if ($show_onhand) @endif @php $total_qty1 = 0; $total_gross1 = 0; $total_disc1 = 0; $total_nett1 = 0; $total_qty2 = 0; $total_gross2 = 0; $total_disc2 = 0; $total_nett2 = 0; @endphp @if ($show_onhand) @php $total_onhand1 = 0; $total_onhand2 = 0; @endphp @endif @foreach($data_group3 as $item) @if ($show_onhand) @endif @if ($show_onhand) @endif @php $total_qty1 += $item['qty1']; $total_gross1 += $item['gross1']; $total_disc1 += $item['disc1']; $total_nett1 += $item['nett1']; $total_qty2 += $item['qty2']; $total_gross2 += $item['gross2']; $total_disc2 += $item['disc2']; $total_nett2 += $item['nett2']; @endphp @if ($show_onhand) @php $total_onhand1 += $item['onhand1']; $total_onhand2 += $item['onhand2']; @endphp @endif @endforeach @php if ($total_nett1 == 0 && $total_nett2 == 0) { $growth = 0; } elseif ($total_nett1 == 0 && $total_nett2 > 0) { $growth = 100; } elseif ($total_nett1 == 0 && $total_nett2 < 0) { $growth=-100; } else { $growth=($total_nett2 - $total_nett1) / $total_nett1 * 100; } @endphp @if ($show_onhand) @endif @if ($show_onhand) @endif
# {{ __('Warehouse') }} {{ $groupname }} {{ $groupname2 }} {{ $groupname3 }} {{ __('Qty1') }} {{ __('Gross1') }} {{ __('Disc1') }} {{ __('Nett1') }}{{ __('OnHand1') }}{{ __('Qty2') }} {{ __('Gross2') }} {{ __('Disc2') }} {{ __('Nett2') }}{{ __('OnHand2') }}{{ __('Growth') }} {{ __('Action') }}
{{ $loop->iteration }} {{ $item['whs'] }} {{ $item['group'] }} {{ $item['group2'] }} {{ $item['group3'] }} {{ number_format($item['qty1']) }} {{ number_format($item['gross1']) }} {{ number_format($item['disc1']) }} {{ number_format($item['nett1']) }}{{ number_format($item['onhand2']) }}{{ number_format($item['qty2']) }} {{ number_format($item['gross2']) }} {{ number_format($item['disc2']) }} {{ number_format($item['nett2']) }}{{ number_format($item['onhand2']) }}{{ number_format($item['var'], 2) . '%' }}
Total {{ number_format($total_qty1) }} {{ number_format($total_gross1) }} {{ number_format($total_disc1) }} {{ number_format($total_nett1) }}{{ number_format($total_onhand1) }}{{ number_format($total_qty2) }} {{ number_format($total_gross2) }} {{ number_format($total_disc2) }} {{ number_format($total_nett2) }}{{ number_format($total_onhand2) }}{{ number_format($growth, 2) . '%' }}
@endif
@foreach($data as $item) @endforeach @foreach($data_group2 as $item) @endforeach @foreach($data_group3 as $item) @endforeach
@livewireScripts @push('scripts') @endpush