migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -0,0 +1,103 @@
@foreach ($transactions as $transaction)
<tr>
<td>{{ ($transactions->currentPage() - 1) * $transactions->perPage() + $loop->iteration }}</td>
<td>{{ formatted_date($transaction->date) }}</td>
<td>{{ ucwords(str_replace('_', ' ', $transaction->platform)) }}</td>
<td>{{ ucwords(str_replace('_', ' ', $transaction->transaction_type)) }}</td>
<td>{{ $transaction->user->name ?? '' }}</td>
<td>{{ currency_format($transaction->amount, currency: business_currency()) }}</td>
<td>
<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="javascript:void(0)" class="transaction-view-btn" data-bs-toggle="modal"
data-bs-target="#view-transaction"
data-img="{{ asset($transaction->image ?? 'assets/img/icon/no-image.svg') }}"
data-user="{{ $transaction->user->name ?? '' }}"
data-transaction-type="{{ ucwords(str_replace('_', ' ', $transaction->transaction_type)) }}"
data-amount="{{ currency_format($transaction->amount, currency: business_currency()) }}"
data-date="{{ formatted_date($transaction->date) }}"
data-note="{{ $transaction->note }}">
<i class="fal fa-eye"></i>
{{ __('View') }}
</a>
</li>
@php
$editConfig = null;
if ($transaction->platform === 'bank') {
$editConfig = [
'url' => 'javascript:void(0)',
'is_bank' => true,
'attrs' => [
'class' => 'edit-transaction',
'data-route' => route('business.bank-transactions.update', $transaction->id),
'data-id' => $transaction->id,
'data-transaction_type' => $transaction->transaction_type,
'data-from' => $transaction->from_bank,
'data-to' => $transaction->to_bank,
'data-type' => $transaction->type,
'data-amount' => $transaction->amount,
'data-date' => $transaction->date,
'data-note' => $transaction->note,
'data-image' => $transaction->image ? asset($transaction->image) : asset('assets/images/products/box.svg'),
],
];
} elseif ($transaction->platform === 'cash') {
$editConfig = ['url' => route('business.cashes.index')];
} elseif ($transaction->platform === 'cheque') {
$editConfig = ['url' => route('business.cheques.index')];
} elseif ($transaction->platform === 'sale') {
$editConfig = ['url' => route('business.sales.index')];
} elseif ($transaction->platform === 'purchase') {
$editConfig = ['url' => route('business.purchases.index')];
} elseif ($transaction->platform === 'income' && $transaction->reference_id) {
$editConfig = ['url' => route('business.incomes.edit', $transaction->reference_id)];
}elseif ($transaction->platform === 'expense' && $transaction->reference_id) {
$editConfig = ['url' => route('business.expenses.edit', $transaction->reference_id)];
}elseif ($transaction->platform === 'sale_return') {
$editConfig = ['url' => route('business.sale-returns.index')];
}elseif ($transaction->platform === 'purchase_return') {
$editConfig = ['url' => route('business.purchase-returns.index')];
}elseif ($transaction->platform === 'due_collect') {
$editConfig = ['url' => route('business.dues.index')];
}elseif ($transaction->platform === 'due_pay') {
$editConfig = ['url' => route('business.dues.index')];
}
@endphp
{{-- Edit will be available only for bankplatform --}}
@if($editConfig)
<li>
@if(!empty($editConfig['is_bank']))
{{-- Bank transactions (open edit modal via JS) --}}
<a href="{{ $editConfig['url'] }}"
@foreach($editConfig['attrs'] as $key => $value)
{{ $key }}="{{ $value }}"
@endforeach>
<i class="fal fa-edit"></i> {{ __('Edit') }}
</a>
@else
{{-- Other types (open edit page) --}}
<a href="{{ $editConfig['url'] }}">
<i class="fal fa-edit"></i> {{ __('Edit') }}
</a>
@endif
</li>
@endif
<li>
<a href="{{ route('business.bank-transactions.destroy', $transaction->id) }}"
class="confirm-action" data-method="DELETE">
<i class="fal fa-trash-alt"></i>
{{ __('Delete') }}
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach

View File

@@ -0,0 +1,132 @@
@extends('layouts.business.master')
@section('title')
{{ __('Bank List') }}
@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">
<div class="d-flex align-items-center gap-5 flex-wrap">
<div class="balance-card p-3">
<h4>
{{ currency_format($payment_type->balance, currency: business_currency()) }}
</h4>
<p>{{ __('Balance') }}</p>
</div>
<div class="bank-details">
<h4>{{ $payment_type->meta['bank_name'] ?? '' }}</h4>
<div class="d-flex align-items-center gap-5 mt-3">
<div>
<p>{{ __('Account Name') }}</p>
<h6>{{ $payment_type->name ?? 'N/A' }}</h6>
</div>
<div>
<p>{{ __('Account Number') }}</p>
<h6>{{ $payment_type->meta['account_number'] ?? 'N/A' }}</h6>
</div>
</div>
</div>
</div>
</div>
<div class="table-top-form p-16-0">
<form action="{{ route('business.bank-transactions.filter', ['payment_type_id' => $payment_type->id]) }}"
method="post" class="filter-form" table="#transactions-data">
@csrf
<div class="table-top-left d-flex gap-3 margin-l-16">
<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...') }}">
<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 class="custom-from-to 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">
</div>
<div class="custom-from-to 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">
</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>
</form>
</div>
</div>
<div class="responsive-table m-0">
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th>{{ __('Date') }}</th>
<th>{{ __('Type') }}</th>
<th>{{ __('Payment') }}</th>
<th>{{ __('Name') }}</th>
<th>{{ __('Amount') }}</th>
<th>{{ __('Action') }}</th>
</tr>
</thead>
<tbody id="transactions-data">
@include('business::banks.transactions.datas')
</tbody>
</table>
</div>
<div class="mt-3">
{{ $transactions->links('vendor.pagination.bootstrap-5') }}
</div>
</div>
</div>
</div>
<input type="hidden" id="get_banks" value="{{ route('business.banks.get') }}">
@endsection
@push('modal')
@include('business::component.transaction')
@include('business::banks.transactions.view')
@endpush
@push('js')
<script src="{{ asset('assets/js/custom/account.js') }}"></script>
@endpush

View File

@@ -0,0 +1,60 @@
<div class="modal fade p-0" id="view-transaction">
<div class="modal-dialog modal-dialog-centered modal-md">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5">{{ __('View Details') }}</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body order-form-section">
<table class="info-table">
<tbody>
<tr>
<td>{{ __('Transaction Image') }}</td>
<td>:</td>
<td>
<img class="table-img" id="view_img" src="">
</td>
</tr>
<tr>
<td>{{ __('Transaction By') }}</td>
<td>:</td>
<td id="view_user"></td>
</tr>
<tr>
<td>{{ __('Transaction Type') }}</td>
<td>:</td>
<td id="view_transaction_type"></td>
</tr>
<tr>
<td>{{ __('Platform') }}</td>
<td>:</td>
<td id="view_platform"></td>
</tr>
<tr>
<td>{{ __('Amount') }}</td>
<td>:</td>
<td id="view_amount"></td>
</tr>
<tr>
<td>{{ __('Date') }}</td>
<td>:</td>
<td id="view_date"></td>
</tr>
<tr>
<td>{{ __('Note') }}</td>
<td>:</td>
<td id="view_note"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>