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>
|
||||
@@ -0,0 +1,76 @@
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-start income-type">{{ __('Income Types') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Date') }}</th>
|
||||
<th class="text-start">{{ __('Sale') }}</th>
|
||||
<th class="text-end d-print-none">{{ __('Income') }}</th>
|
||||
<th class="text-start expense-type">{{ __('Expenses Types') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Date') }}</th>
|
||||
<th class="text-end">{{ __('Expense') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@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 d-print-none">
|
||||
{{ $incomeSaleRow && isset($incomeSaleRow->total_sales) ? currency_format($incomeSaleRow->total_sales, 'icon', 2, business_currency()) : '' }}
|
||||
</td>
|
||||
<td class="text-end loss-profit-tbody d-print-none">
|
||||
{{ $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 d-print-none">
|
||||
<td class="text-start bottom-profit-expense" colspan="2">{{ __('Gross Profit') }}</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" colspan="2">{{ __('Total Expenses') }}</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>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,131 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Profit & Loss') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="row p-2 d-print-none">
|
||||
<div class="col-lg-2 col-md-12">
|
||||
<div class="loss-card p-3 m-2 text-white">
|
||||
<p class="stat-value">{{ currency_format($cardGrossProfit, currency: business_currency()) }}</p>
|
||||
<p class="stat-title">{{ __('Gross Profit') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-6">
|
||||
<div class="profit-card p-3 m-2 text-white">
|
||||
<p class="stat-value">{{ currency_format($totalCardExpenses, currency: business_currency()) }}</p>
|
||||
<p class="stat-title">{{ __('Expenses') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-6">
|
||||
<div class="sales-card p-3 m-2 text-white">
|
||||
<p class="stat-value">{{ currency_format($cardNetProfit, currency: business_currency()) }}</p>
|
||||
<p class="stat-title">{{ __('Net Profit') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Profit & Loss') }}</h4>
|
||||
</div>
|
||||
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
|
||||
@include('business::print.header')
|
||||
<h4 class="mt-2 mb-2">{{ __('Loss & Profit List') }}</h4>
|
||||
</div>
|
||||
{{-- search bar --}}
|
||||
<div class="loss-profit-container d-print-none">
|
||||
<div class="">
|
||||
<div class="loss-profit-form-container d-print-none table-top-form">
|
||||
<form action="{{ route('business.loss-profit-history.index') }}" method="GET" class="ajax-filter-form" table="#loss-profit-history-data">
|
||||
|
||||
<div class="d-flex align-items-center gap-3 flex-wrap table-top-left">
|
||||
<div class="m-0 p-0 d-print-none">
|
||||
<div class="date-filters-container">
|
||||
<div class="input-wrapper align-items-center date-filters d-none">
|
||||
<label class="header-label">{{ __('From Date') }}</label>
|
||||
<input type="date" name="from_date" value="{{ now()->format('Y-m-d') }}" class="form-control filter-field filter-from-date">
|
||||
</div>
|
||||
<div class="input-wrapper align-items-center date-filters d-none">
|
||||
<label class="header-label">{{ __('To Date') }}</label>
|
||||
<input type="date" name="to_date" value="{{ now()->format('Y-m-d') }}" class="form-control filter-field filter-to-date">
|
||||
</div>
|
||||
<div class="gpt-up-down-arrow position-relative d-print-none custom-date-filter">
|
||||
<select name="custom_days" class="form-control custom-days">
|
||||
<option value="today">{{__('Today')}}</option>
|
||||
<option value="yesterday">{{__('Yesterday')}}</option>
|
||||
<option value="last_seven_days">{{__('Last 7 Days')}}</option>
|
||||
<option value="last_thirty_days">{{__('Last 30 Days')}}</option>
|
||||
<option value="current_month">{{__('Current Month')}}</option>
|
||||
<option value="last_month">{{__('Last Month')}}</option>
|
||||
<option value="current_year">{{__('Current Year')}}</option>
|
||||
<option value="custom_date">{{__('Custom Date')}}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
<div class="calendar-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.6667 2.67188H3.33333C2.59695 2.67188 2 3.26883 2 4.00521V13.3385C2 14.0749 2.59695 14.6719 3.33333 14.6719H12.6667C13.403 14.6719 14 14.0749 14 13.3385V4.00521C14 3.26883 13.403 2.67188 12.6667 2.67188Z" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.6641 1.32812V3.99479" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5.33594 1.32812V3.99479" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M2 6.67188H14" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="table-top-btn-group d-print-none p-2">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.loss-profit-history.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.loss-profit-history.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.loss-profit-history.pdf') }}">
|
||||
<img src="{{ asset('assets/images/logo/pdf.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="window.print()" class="print-window">
|
||||
<img src="{{ asset('assets/images/logo/printer.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-start income-type">{{ __('Income Types') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Date') }}</th>
|
||||
<th class="text-start">{{ __('Sale') }}</th>
|
||||
<th class="text-end">{{ __('Income') }}</th>
|
||||
<th class="text-start expense-type">{{ __('Expenses Types') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Date') }}</th>
|
||||
<th class="text-end">{{ __('Expense') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="loss-profit-history-data">
|
||||
@include('business::loss-profit-histories.datas')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
@extends('layouts.business.pdf.pdf_layout')
|
||||
|
||||
@section('pdf_title')
|
||||
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
|
||||
@include('business::print.header')
|
||||
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;">{{ __('Loss Profit History List') }}</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" class="text-start">{{ __('Income Types') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Date') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Sale') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Income') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Expenses Types') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Date') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Expense') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@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 style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $incomeSaleRow ? $incomeSaleRow->type : '' }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $incomeSaleRow ? formatted_date($incomeSaleRow->date) : '' }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $incomeSaleRow && isset($incomeSaleRow->total_sales) ? currency_format($incomeSaleRow->total_sales, 'icon', 2, business_currency()) : '' }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $incomeSaleRow && isset($incomeSaleRow->total_incomes) ? currency_format($incomeSaleRow->total_incomes, 'icon', 2, business_currency()) : '' }}
|
||||
</td>
|
||||
|
||||
{{-- Expense Column --}}
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $expenseRow ? $expenseRow->type : '' }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $expenseRow ? formatted_date($expenseRow->date) : '' }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $expenseRow ? currency_format($expenseRow->total_expenses ?? 0, 'icon', 2, business_currency()) : '' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
{{-- Summary Rows --}}
|
||||
<tr style="background-color:#C52127; color:#FFFFFF; font-weight:bold;">
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;" colspan="2">{{ __('Gross Profit') }}</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($grossSaleProfit, 'icon', 2, business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($grossIncomeProfit, 'icon', 2, business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;" colspan="2">{{ __('Total Expenses') }}</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($totalExpenses, 'icon', 2, business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="background-color:#C52127; color:#FFFFFF; font-weight:bold;">
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;" colspan="7">
|
||||
{{ __('Net Profit (Income - Expense) =') }}
|
||||
<span class="{{ $netProfit >= 0 ? 'profit-ammount' : 'expense-ammount' }}">
|
||||
{{ currency_format($netProfit, 'icon', 2, business_currency()) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user