77 lines
3.1 KiB
PHP
77 lines
3.1 KiB
PHP
|
|
@extends('layouts.business.pdf.pdf_layout')
|
||
|
|
|
||
|
|
@section('pdf_title')
|
||
|
|
<div class="table-header justify-content-center border-0 d-print-block text-center">
|
||
|
|
@include('business::print.header')
|
||
|
|
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;">
|
||
|
|
{{ __('Balance Sheet Report') }}
|
||
|
|
</h4>
|
||
|
|
</div>
|
||
|
|
@endsection
|
||
|
|
|
||
|
|
@section('pdf_content')
|
||
|
|
|
||
|
|
<table width="100%" cellpadding="6" cellspacing="0"
|
||
|
|
style="border-collapse: collapse; border:1px solid gainsboro; font-size:12px;">
|
||
|
|
|
||
|
|
<thead>
|
||
|
|
<tr style="background-color: #C52127; color:white;">
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white">
|
||
|
|
{{ __('Assets') }}
|
||
|
|
</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white">
|
||
|
|
{{ __('Payment In') }}
|
||
|
|
</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
|
||
|
|
<tbody>
|
||
|
|
@foreach($asset_datas as $data)
|
||
|
|
@php
|
||
|
|
$product_asset_value = 0;
|
||
|
|
if($data->source === 'product') {
|
||
|
|
if($data->product_type == 'single' || $data->product_type == 'variant') {
|
||
|
|
foreach($data->stocks as $stock) {
|
||
|
|
$product_asset_value += $stock->productStock * $stock->productPurchasePrice;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
elseif($data->product_type == 'combo') {
|
||
|
|
foreach($data->combo_products as $combo_product) {
|
||
|
|
if($combo_product->stock) {
|
||
|
|
$product_asset_value += $combo_product->stock->productStock * $combo_product->purchase_price;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
@endphp
|
||
|
|
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $data->source == 'product' ? $data->productName : $data->name }}
|
||
|
|
</td>
|
||
|
|
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
@if($data->source == 'product')
|
||
|
|
{{ currency_format($product_asset_value, currency: business_currency()) }}
|
||
|
|
@else
|
||
|
|
{{ currency_format($data->balance, currency: business_currency()) }}
|
||
|
|
@endif
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
@endforeach
|
||
|
|
</tbody>
|
||
|
|
|
||
|
|
@if ($asset_datas->count() > 0)
|
||
|
|
<tr style="background-color:#C52127; color:white; font-weight:bold;">
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white">
|
||
|
|
{{ __('Total') }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||
|
|
{{ currency_format($total_asset, currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
@endif
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
@endsection
|