migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
@php
|
||||
$maxRowCount = max($mergedIncomeSaleData->count(), $mergedExpenseData->count());
|
||||
@endphp
|
||||
|
||||
@for ($i = 0; $i < $maxRowCount; $i++)
|
||||
@php
|
||||
$incomeSaleRow = $mergedIncomeSaleData[$i] ?? null;
|
||||
$expenseRow = $mergedExpenseData[$i] ?? null;
|
||||
@endphp
|
||||
<tr>
|
||||
{{-- Sale / Income Column --}}
|
||||
<td class="text-start loss-profit-tbody">
|
||||
{{ $incomeSaleRow ? $incomeSaleRow->type : '' }}
|
||||
</td>
|
||||
<td class="text-start loss-profit-tbody d-print-none">
|
||||
{{ $incomeSaleRow ? formatted_date($incomeSaleRow->date) : '' }}
|
||||
</td>
|
||||
<td class="text-start loss-profit-tbody ">
|
||||
{{ $incomeSaleRow && isset($incomeSaleRow->total_sales) ? currency_format($incomeSaleRow->total_sales, 'icon', 2, business_currency()) : '' }}
|
||||
</td>
|
||||
<td class="text-end loss-profit-tbody ">
|
||||
{{ $incomeSaleRow && isset($incomeSaleRow->total_incomes) ? currency_format($incomeSaleRow->total_incomes, 'icon', 2, business_currency()) : '' }}
|
||||
</td>
|
||||
|
||||
{{-- Expense Column --}}
|
||||
<td class="text-start loss-profit-tbody expense-type">
|
||||
{{ $expenseRow ? $expenseRow->type : '' }}
|
||||
</td>
|
||||
<td class="text-start loss-profit-tbody d-print-none">
|
||||
{{ $expenseRow ? formatted_date($expenseRow->date) : '' }}
|
||||
</td>
|
||||
<td class="text-end loss-profit-tbody">
|
||||
{{ $expenseRow ? currency_format($expenseRow->total_expenses ?? 0, 'icon', 2, business_currency()) : '' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
{{-- Summary Rows --}}
|
||||
<tr class="fw-bold">
|
||||
<td class="text-start bottom-profit-expense">{{ __('Gross Profit') }}</td>
|
||||
<td class="d-print-none bottom-profit-expense"></td>
|
||||
<td class="text-start bottom-profit-expense">
|
||||
{{ currency_format($grossSaleProfit, 'icon', 2, business_currency()) }}
|
||||
</td>
|
||||
<td class="text-end bottom-profit-expense">
|
||||
{{ currency_format($grossIncomeProfit, 'icon', 2, business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start bottom-profit-expense expense-type">{{ __('Total Expenses') }}</td>
|
||||
<td class="d-print-none bottom-profit-expense"></td>
|
||||
<td class="text-end bottom-profit-expense">
|
||||
{{ currency_format($totalExpenses, 'icon', 2, business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="fw-bold text-center bg-light">
|
||||
<td class="bottom-net-profit" colspan="7">
|
||||
{{ __('Net Profit (Income - Expense) =') }}
|
||||
<span class="{{ $netProfit >= 0 ? 'profit-ammount' : 'expense-ammount' }}">
|
||||
{{ currency_format($netProfit, 'icon', 2, business_currency()) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user