# |
{{-- Date | --}}
Account Code |
Description |
Amount({{ $currencyCode }}) |
|
@php
$salesTotal = 0;
$costofsalesTotal =0;
$grossprofit = 0;
$expenceTotal = 0;
$otherIncomeTotal = 0;
$profit = 0;
$count = 1;
@endphp
Sales |
@foreach ($sales as $value)
@php
$debit = $value->debit;
$credit = $value->credit;
if($value->trans == 1)
{
//$debit += $value->opening_balance;
}
if($value->trans == 2)
{
//$credit += $value->opening_balance;
}
@endphp
{{ $count++ }} |
{{ $value->acc_code }} |
{{ $value->acc_name }} |
{{ number_format($credit-$debit, 2, '.', ',') }} |
|
@php
$salesTotal+=$credit-$debit;
@endphp
@endforeach
Total Sales : | {{ number_format($salesTotal, 2, '.', ',') }} | |
Cost of Sales |
@foreach ($costofsales as $value)
@php
$debit = $value->debit;
$credit = $value->credit;
if($value->trans == 1)
{
//$debit += $value->opening_balance;
}
if($value->trans == 2)
{
//$credit += $value->opening_balance;
}
@endphp
{{ $count++ }} |
{{ $value->acc_code }} |
{{ $value->acc_name }} |
{{ number_format($debit-$credit, 2, '.', ',') }} |
|
@php
$costofsalesTotal+=$debit-$credit;
@endphp
@endforeach
Total Cost of Sales : | {{ number_format($costofsalesTotal, 2, '.', ',') }} | |
@php
$grossprofit=($salesTotal)-($costofsalesTotal)
@endphp
Gross Profit : |
{{ number_format($grossprofit, 2, '.', ',') }} | |
Expences |
@foreach ($expences as $value)
@php
$debit = $value->debit;
$credit = $value->credit;
if($value->trans == 1)
{
//$debit += $value->opening_balance;
}
if($value->trans == 2)
{
//$credit += $value->opening_balance;
}
@endphp
{{ $count++ }} |
{{ $value->acc_code }} |
{{ $value->acc_name }} |
{{ number_format($debit-$credit, 2, '.', ',') }} |
|
@php
$expenceTotal+=$debit-$credit;
@endphp
@endforeach
Total Expences : | {{ number_format($expenceTotal, 2, '.', ',') }} | |
Other Income |
@foreach ($otherIncome as $value)
@php
$debit = $value->debit;
$credit = $value->credit;
if($value->trans == 1)
{
//$debit += $value->opening_balance;
}
if($value->trans == 2)
{
//$credit += $value->opening_balance;
}
@endphp
{{ $count++ }} |
{{ $value->acc_code }} |
{{ $value->acc_name }} |
{{ number_format($credit-$debit, 2, '.', ',') }} |
|
@php
$otherIncomeTotal+=$credit-$debit;
@endphp
@endforeach
Total Other Income : | {{ number_format($otherIncomeTotal, 2, '.', ',') }} | |
@php
$profit=($otherIncomeTotal+$grossprofit)-($expenceTotal)
@endphp
Net Profit : |
{{ number_format($profit, 2, '.', ',') }} | |