migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Product') }}</th>
|
||||
<th class="text-start">{{ __('Cost') }}</th>
|
||||
<th class="text-start">{{ __('Qty') }}</th>
|
||||
<th class="text-start">{{ __('Sale') }}</th>
|
||||
<th class="text-end">{{ __('Stock Value') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($stock_reports as $stock_report)
|
||||
@php
|
||||
$total_stock = $stock_report->stocks->sum('productStock');
|
||||
$firstStock = $stock_report->stocks->first();
|
||||
$total_value = $stock_report->stocks->sum(function ($stock) {
|
||||
return $stock->productPurchasePrice * $stock->productStock;
|
||||
});
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ ($stock_reports->currentPage() - 1) * $stock_reports->perPage() + $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $stock_report->productName }}</td>
|
||||
<td class="text-start">{{ currency_format(optional($firstStock)->productPurchasePrice, currency: business_currency()) }}</td>
|
||||
<td class="{{ $total_stock <= $stock_report->alert_qty ? 'text-danger' : 'text-success' }} text-start">{{ $total_stock }}</td>
|
||||
<td class="text-start">{{ currency_format(optional($firstStock)->productSalePrice, currency: business_currency()) }}</td>
|
||||
<td class="text-end">{{ currency_format($total_value, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($stock_reports->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="text-start">{{ __('Total') }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="text-end">
|
||||
{{ currency_format(
|
||||
$stock_reports->sum(function ($stock_report) {
|
||||
return $stock_report->stocks->sum(function ($stock) {
|
||||
return $stock->productPurchasePrice * $stock->productStock;
|
||||
});
|
||||
}),
|
||||
currency: business_currency()
|
||||
) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ $stock_reports->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Product') }}</th>
|
||||
<th class="text-start">{{ __('Cost') }}</th>
|
||||
<th class="text-start">{{ __('Qty') }}</th>
|
||||
<th class="text-start">{{ __('Sale') }}</th>
|
||||
<th class="text-end">{{ __('Stock Value') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($stock_reports as $stock_report)
|
||||
@php
|
||||
$total_stock = $stock_report->stocks->sum('productStock');
|
||||
$firstStock = $stock_report->stocks->first();
|
||||
$total_value = $stock_report->stocks->sum(function ($stock) {
|
||||
return $stock->productPurchasePrice * $stock->productStock;
|
||||
});
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $stock_report->productName }}</td>
|
||||
<td class="text-start">{{ currency_format(optional($firstStock)->productPurchasePrice, currency: business_currency()) }}</td>
|
||||
<td class="{{ $total_stock <= $stock_report->alert_qty ? 'text-danger' : 'text-success' }} text-start">{{ $total_stock }}</td>
|
||||
<td class="text-start">{{ currency_format(optional($firstStock)->productSalePrice, currency: business_currency()) }}</td>
|
||||
<td class="text-end">{{ currency_format($total_value, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($stock_reports->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="text-start">{{ __('Total') }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="text-end">
|
||||
{{ currency_format(
|
||||
$stock_reports->sum(function ($stock_report) {
|
||||
return $stock_report->stocks->sum(function ($stock) {
|
||||
return $stock->productPurchasePrice * $stock->productStock;
|
||||
});
|
||||
}),
|
||||
currency: business_currency()
|
||||
) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,75 @@
|
||||
@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="">{{ __('Stock Report List') }}</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">{{ __('Product') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Cost') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Quantity') }}</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">{{ __('Stock Value') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($stock_reports as $stock_report)
|
||||
@php
|
||||
$total_stock = $stock_report->stocks->sum('productStock');
|
||||
$firstStock = $stock_report->stocks->first();
|
||||
$total_value = $stock_report->stocks->sum(function ($stock) {
|
||||
return $stock->productPurchasePrice * $stock->productStock;
|
||||
});
|
||||
@endphp
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $stock_report->productName }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format(optional($firstStock)->productPurchasePrice, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="{{ $total_stock <= $stock_report->alert_qty ? 'text-danger' : 'text-success' }}" style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $total_stock }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format(optional($firstStock)->productSalePrice, currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($total_value, currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($stock_reports->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;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;" class="d-print-none"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format(
|
||||
$stock_reports->sum(function ($stock_report) {
|
||||
return $stock_report->stocks->sum(function ($stock) {
|
||||
return $stock->productPurchasePrice * $stock->productStock;
|
||||
});
|
||||
}),
|
||||
currency: business_currency()
|
||||
) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,96 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Stock Reports') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="mb-4 d-flex loss-flex gap-3 loss-profit-container d-print-none">
|
||||
<div class="d-flex align-items-center justify-content-center gap-3">
|
||||
<div class="profit-card p-3 text-white">
|
||||
<p class="stat-title">{{ __('Total Quantity') }}</p>
|
||||
<p class="stat-value">{{ $total_qty }}</p>
|
||||
</div>
|
||||
|
||||
<div class="loss-card p-3 text-white">
|
||||
<p class="stat-title">{{ __('Total Stock Value') }}</p>
|
||||
<p class="stat-value">{{ currency_format($total_stock_value) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Stock Report List') }}</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">{{ __('Stock Report List') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.stock-reports.index') }}" method="GET" class="filter-form" table="#stock-reports-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 ">
|
||||
<div class="gpt-up-down-arrow position-relative d-print-none">
|
||||
<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 d-print-none">
|
||||
<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 class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.stock-reports.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.stock-reports.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.stock-reports.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="stock-reports-data">
|
||||
@include('business::reports.stocks.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user