@extends('layouts.pdf')
@push('include-css')
    <link rel="stylesheet" href="{{ asset('asset/css/main-report.css') }}">
@endpush
@section('title')
    {{ config('settings.company_name') }} -> {{ $extra['module_name'] }}
@endsection
@section('content')
    <div class="mid">
        <div class="col-md-12 col-sm-12 col-lg-12 col-xl-12">
            <br>
            <h2 class="text-center">{{ config('settings.company_name') }}</h2>
            <h6 class="text-center">{{ config('settings.address_1') }}</h6>
            <br>
            <h4 class="text-center">{{ $extra['voucher_type'] }}</h4>
            <hr>
        </div>
    </div>
    <div class="mid mb-3">
        <div class="row">
            <div class="col-md-12 col-sm-12 col-lg-12 col-xl-12">
                <table class="table table-bordered table-sm">
                    <thead>
                        <tr>
                            <td class="text-right">Cari Berdasarkan:</td>
                            <td class="text-right">Cabang:</td>
                            <th>{{ $search_by['branch_name'] }}</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
    <div class="mid">
        <div class="row">
            <div class="col-md-12 col-sm-12 col-lg-12 col-xl-12">
                <table class="table table-bordered table-sm table-hover">
                    <thead>
                        <tr>
                            <th class="text-center">
                                <h5>Rincian </h5>
                            </th>
                            <th class="text-center">
                                <h5>Dari {{ $search_by['start_from'] }} Ke {{ $search_by['start_to'] }}</h5>
                            </th>
                            <th class="text-center">
                                <h5>Dari {{ $search_by['end_from'] }} Ke {{ $search_by['end_to'] }}</h5>
                            </th>
                        </tr>
                        <tr>
                            <th class="text-center" scope="col"></th>
                            <th class="text-right" scope="col"> <?php echo config('settings.is_code') == 'code' ? config('settings.currency_code') : config('settings.currency_symbol'); ?>
                            </th>
                            <th class="text-right" scope="col"> <?php echo config('settings.is_code') == 'code' ? config('settings.currency_code') : config('settings.currency_symbol'); ?>
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach ($particulars as $key => $particular)
                            <tr
                                @if ($key == 'Revenue' or $key == 'GrossProfit') class="font-w-b font-s-16"
                            @elseif ($key == 'NetProfitOrLoss')
                            class="font-w-b font-s-20" @endif>
                                <td class="text-left" scope="row">{{ $particular['name'] }}</td>
                                <td scope="row" class=" text-right">
                                    {{ Helper::convertMoneyFormat($particular['balance']['start_balance']) }}
                                </td>
                                <td class="text-right">
                                    {{ Helper::convertMoneyFormat($particular['balance']['end_balance']) }} </td>
                            </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
        <br>
    </div>
@stop
