<report-body v-bind="$props">
    <div class="grid-row">
        <div class="grid-block">
            <div class="columns">
                <div class="size50">
                    <h1 class="title uppercase">{{$t('title')}}</h1>
                    <div class="size75">
                        <table class="row-oriented report-info">
                            <tbody>
                                <tr>
                                    <td class="font gray">{{$t('Client')}}</td>
                                    <th>{{client.id}}</th>
                                </tr>
                                <tr>
                                    <td class="font gray">{{$t('From')}}</td>
                                    <th>{{formatDate(from, '%d-%m-%Y')}}</th>
                                </tr>
                                <tr>
                                    <td class="font gray">{{$t('To')}}</td>
                                    <th>{{formatDate(to, '%d-%m-%Y')}}</th>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="size50">
                    <div class="panel">
                        <div class="header">{{$t('clientData')}}</div>
                        <div class="body">
                            <h3 class="uppercase">{{client.socialName}}</h3>
                            <div>{{client.street}}</div>
                            <div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
                            <div>{{client.country}}</div>
                        </div>
                    </div>
                </div>
            </div>
            <table class="column-oriented">
                <thead>
                    <tr>
                        <th>{{$t('Code')}}</th>
                        <th class="number">{{$t('Quantity')}}</th>
                        <th width="50%">{{$t('Concept')}}</th>
                    </tr>
                </thead>
                <tbody v-for="sale in sales">
                    <tr>
                        <td>{{sale.itemFk}}</td>
                        <td class="number">{{Math.trunc(sale.subtotal)}}</td>
                        <td width="50%">{{sale.concept}}</td>
                    </tr>
                    <tr class="description font light-gray">
                        <td colspan="7">
                            <span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </span>
                            <span v-if="sale.value6"> <strong>{{sale.tag6}}</strong> {{sale.value6}} </span>
                            <span v-if="sale.value7"> <strong>{{sale.tag7}}</strong> {{sale.value7}} </span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <template v-slot:footer>
        <report-footer
            id="pageFooter"
            v-bind:left-text="$t('client', [client.id])"
            v-bind:center-text="client.socialName"
            v-bind="$props"
        >
        </report-footer>
    </template>
</report-body>