migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Party Name') }}</th>
|
||||
<th class="text-start">{{ __('Sale Amount') }}</th>
|
||||
<th class="text-start">{{ __('Profit') }}</th>
|
||||
<th class="text-start">{{ __('Loss') }}</th>
|
||||
<th class="d-print-none">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($parties as $party)
|
||||
@php
|
||||
$profit = $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0;
|
||||
$loss = $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $parties->firstItem() + $loop->index }}</td>
|
||||
<td class="text-start">{{ $party->name }}</td>
|
||||
<td class="text-start">{{ currency_format($party->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start {{ $profit > 0 ? 'text-success' : '' }}">{{ $profit > 0 ? currency_format($profit, currency: business_currency()) : currency_format(0, currency: business_currency()) }}</td>
|
||||
<td class="text-start {{ $loss < 0 ? 'text-danger' : '' }}">{{ $loss < 0 ? currency_format(abs($loss), currency: business_currency()) : currency_format(0, currency: business_currency()) }}</td>
|
||||
<td class="d-print-none">
|
||||
<div class="dropdown table-action">
|
||||
<button type="button" data-bs-toggle="dropdown">
|
||||
<i class="far fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="#" class="view-party-loss-profit-btn" data-bs-toggle="modal" data-bs-target="#view-party-loss-profit-modal"
|
||||
data-url="{{ route('business.party-loss-profit.view', $party->id) }}">
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.158 8.28375C16.386 8.60348 16.5 8.76338 16.5 9C16.5 9.23662 16.386 9.39652 16.158 9.71625C15.1334 11.1529 12.5169 14.25 9 14.25C5.48309 14.25 2.86657 11.1529 1.84203 9.71625C1.61401 9.39652 1.5 9.23662 1.5 9C1.5 8.76338 1.61401 8.60348 1.84203 8.28375C2.86657 6.84708 5.48309 3.75 9 3.75C12.5169 3.75 15.1334 6.84708 16.158 8.28375Z" stroke="#4B5563" stroke-width="1.2"/>
|
||||
<path d="M11.25 9C11.25 7.75732 10.2427 6.75 9 6.75C7.75732 6.75 6.75 7.75732 6.75 9C6.75 10.2427 7.75732 11.25 9 11.25C10.2427 11.25 11.25 10.2427 11.25 9Z" stroke="#4B5563" stroke-width="1.2"/>
|
||||
</svg>
|
||||
{{ __('View Details') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($parties->count() > 0)
|
||||
<tr>
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td></td>
|
||||
<td class="text-start fw-bold">{{ currency_format($parties->sum(fn($party) => $party->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}</td>
|
||||
<td class="text-start fw-bold">
|
||||
{{ currency_format($parties->sum(fn($party) => $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start fw-bold text-danger">
|
||||
{{ currency_format(abs($parties->sum(fn($party) => $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0)), currency: business_currency()) }}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ $parties->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Party Name') }}</th>
|
||||
<th class="text-start">{{ __('Sale Amount') }}</th>
|
||||
<th class="text-start">{{ __('Profit') }}</th>
|
||||
<th class="text-start">{{ __('Loss') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($parties as $party)
|
||||
@php
|
||||
$profit = $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0;
|
||||
$loss = $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $party->name }}</td>
|
||||
<td class="text-start">{{ currency_format($party->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start text-success">{{ $profit > 0 ? currency_format($profit, currency: business_currency()) : 0 }}</td>
|
||||
<td class="text-start text-danger">{{ $loss < 0 ? currency_format(abs($loss), currency: business_currency()) : 0 }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($parties->count() > 0)
|
||||
<tr>
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td></td>
|
||||
<td class="text-start fw-bold">{{ currency_format($parties->sum(fn($party) => $party->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}</td>
|
||||
<td class="text-start fw-bold">
|
||||
{{ currency_format($parties->sum(fn($party) => $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start fw-bold text-danger">
|
||||
{{ currency_format(abs($parties->sum(fn($party) => $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0)), currency: business_currency()) }}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,108 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Party Wise Loss & Profit') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Party Wise Loss & Profit') }}</h4>
|
||||
</div>
|
||||
<div class="loss-profit-container d-print-none">
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-6">
|
||||
<div class="sales-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Sales Amount') }}</p>
|
||||
<p class="stat-value">{{ currency_format($totalAmount, currency: business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-6">
|
||||
<div class="profit-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Profit') }}</p>
|
||||
<p class="stat-value">{{ currency_format($totalProfit, currency: business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-12 ">
|
||||
<div class="loss-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Loss') }}</p>
|
||||
<p class="stat-value">{{ currency_format(abs($totalLoss), currency: business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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">{{ __('Party Wise Loss & Profit') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<div class="d-flex align-items-center gap-3 flex-wrap">
|
||||
<form action="{{ route('business.party-loss-profit.index') }}" method="GET" class="report-filter-form" table="#party-loss-profit-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 d-print-none">
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="per_page" class="form-control">
|
||||
<option @selected(request('per_page') == 20) value="20">{{ __('Show 20') }}</option>
|
||||
<option @selected(request('per_page') == 50) value="50">{{ __('Show 50') }}</option>
|
||||
<option @selected(request('per_page') == 100) value="100">{{ __('Show 100') }}</option>
|
||||
<option @selected(request('per_page') == 500) value="500">{{ __('Show 500') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="table-search position-relative">
|
||||
<input type="text" name="search" class="form-control" placeholder="{{ __('Search...') }}" value="{{ request('search') }}">
|
||||
<span class="position-absolute">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.582 14.582L18.332 18.332" stroke="#4D4D4D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M16.668 9.16797C16.668 5.02584 13.3101 1.66797 9.16797 1.66797C5.02584 1.66797 1.66797 5.02584 1.66797 9.16797C1.66797 13.3101 5.02584 16.668 9.16797 16.668C13.3101 16.668 16.668 13.3101 16.668 9.16797Z" stroke="#4D4D4D" stroke-width="1.25" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.party-loss-profit.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.party-loss-profit.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.party-loss-profit.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 id="party-loss-profit-data">
|
||||
@include('business::party-reports.loss-profit.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('modal')
|
||||
@include('business::party-reports.loss-profit.view')
|
||||
@endpush
|
||||
@@ -0,0 +1,60 @@
|
||||
@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;" class="">{{ __('Party Loss Profit Report') }}</h4>
|
||||
{{-- <p style="text-align: center; margin: 0; padding: 0; font-weight: 400; font-size: 14px;" class="">{{ __('Duration: 14-12-2025 to 24-12-2025') }}</p> --}}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('pdf_content')
|
||||
<table width="100%" cellpadding="6" cellspacing="0"
|
||||
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;"
|
||||
id="datatable">
|
||||
<thead>
|
||||
<tr style="background-color: #C52127; color: white;">
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Party Name') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Sale Amount') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Profit') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Loss') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($parties as $party)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $party->name }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($party->sales?->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($parties->count() > 0)
|
||||
<tfoot>
|
||||
<tr style="background-color:#C52127; color:#FFFFFF; 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($parties->sum(fn($party) => $party->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($parties->sum(fn($party) => $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format(abs($parties->sum(fn($party) => $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0)), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,31 @@
|
||||
<div class="modal fade" id="view-party-loss-profit-modal" tabindex="-1" aria-labelledby="viewPaymentModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ __('View Details') }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL.') }}</th>
|
||||
<th class="text-start">{{ __('Product Name') }}</th>
|
||||
<th>{{ __('Quantity') }}</th>
|
||||
<th>{{ __('Purchase Price') }}</th>
|
||||
<th>{{ __('Sale Price') }}</th>
|
||||
<th>{{ __('Profit') }}</th>
|
||||
<th>{{ __('Loss') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="view-party-loss-profit-data">
|
||||
<tr>
|
||||
<td colspan="7" class="text-center text-muted">{{ __('Loading...') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user