migrate to gtea from bistbucket
This commit is contained in:
205
Modules/Business/resources/views/transfers/create.blade.php
Normal file
205
Modules/Business/resources/views/transfers/create.blade.php
Normal file
@@ -0,0 +1,205 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Create Transfer') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card border-0">
|
||||
<div class="card-bodys ">
|
||||
<div class="table-header p-16">
|
||||
<h4>{{ __('Add New Transfer') }}</h4>
|
||||
</div>
|
||||
<div class="order-form-section p-16">
|
||||
<form action="{{ route('business.transfers.store') }}" method="POST"
|
||||
class="ajaxform_instant_reload">
|
||||
@csrf
|
||||
<div class="add-suplier-modal-wrapper d-block">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('Date') }}</label>
|
||||
<input type="date" name="transfer_date" value="{{ date('Y-m-d') }}" required class="form-control">
|
||||
</div>
|
||||
@if((moduleCheck('MultiBranchAddon') && multibranch_active()) && !auth()->user()->active_branch_id)
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('From Branch') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="from_branch_id" id="from_branch" class="form-control table-select w-100 role">
|
||||
<option value="">{{ __('Select one') }}</option>
|
||||
@foreach ($branches as $branch)
|
||||
<option value="{{ $branch->id }}">{{ ucfirst($branch->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('To Branch') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="to_branch_id" id="to_branch" class="form-control table-select w-100 role">
|
||||
<option value="">{{ __('Select one') }}</option>
|
||||
@foreach ($branches as $branch)
|
||||
@if (!auth()->user()->active_branch || auth()->user()->active_branch->id != $branch->id)
|
||||
<option value="{{ $branch->id }}">{{ ucfirst($branch->name) }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-2"></div>
|
||||
@endif
|
||||
@if(moduleCheck('warehouseAddon'))
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('From Warehouse') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="from_warehouse_id" id="from_warehouse" class="form-control table-select w-100 role">
|
||||
<option value="">{{ __('Select one') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('To Warehouse') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="to_warehouse_id" id="to_warehouse" class="form-control table-select w-100 role">
|
||||
<option value="">{{ __('Select one') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-lg-8 mb-2"></div>
|
||||
<div class="col-lg-8 mb-2">
|
||||
<label>{{ __('Select Product') }}</label>
|
||||
<div class="d-flex align-items-center w-100">
|
||||
<div class="product-dropdown transfer-product-select w-100" id="productDropdown">
|
||||
<div class="product-selected">
|
||||
<span id="selectedValue">{{ __('Search Product') }}</span><span id="arrow">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="dropdown-search hidden" id="searchContainer">
|
||||
<input type="text" id="productSearch" placeholder="Search product..."/>
|
||||
</div>
|
||||
<div class="product-dropdown-options" id="dropdownList">
|
||||
{{-- fetch dynamically from js --}}
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ route('business.products.create') }}" class="btn btn-danger square-btn trasfer-square-btn d-flex justify-content-center align-items-center">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 4.16797V15.8346" stroke="#C52127" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4.16602 10H15.8327" stroke="#C52127" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('Status') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="status" class="form-control table-select w-100">
|
||||
<option value="pending">{{ __('Pending') }}</option>
|
||||
<option value="completed">{{ __('Completed') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="product-table-container" class="table-responsive mt-4">
|
||||
<table class="table table-bordered text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border p-2 table-background">{{ __('Image') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Items') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Code') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Batch') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Qty') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Unit Price') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Tax') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Discount') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Sub Total') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="product-list">
|
||||
{{-- added via jquery --}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 mb-2">
|
||||
<p class="note-label">{{ __('Transfer Note') }}</p>
|
||||
<textarea cols="10" rows="3" name="note" class="form-control transfer-note" placeholder="{{ __('Type note...') }}"></textarea>
|
||||
</div>
|
||||
|
||||
<div class=" col-lg-4 sub-total-container">
|
||||
<div
|
||||
class="payment-container mb-3 amount-info-container inventory-amount-info-container transfer-amount-info">
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between">
|
||||
<h6>{{ __('Sub Total') }}</h6>
|
||||
<h6 class="fw-bold" id="total_amount">{{ currency_format(0, currency: business_currency()) }}</h6>
|
||||
</div>
|
||||
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between">
|
||||
<h6>{{ __('Discount') }}</h6>
|
||||
<h6 class="fw-bold" id="discount_amount">{{ currency_format(0, currency: business_currency()) }}</h6>
|
||||
</div>
|
||||
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between">
|
||||
<h6>{{ __('Tax') }}</h6>
|
||||
<h6 class="fw-bold" id="tax_amount">{{ currency_format(0, currency: business_currency()) }}</h6>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-6">
|
||||
<h6 class="payment-title">{{ __('Shipping Charge') }}</h6>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="number" step="any" name="shipping_charge"id="shipping_amount" class="form-control right-start-input" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class=" d-flex align-items-center justify-content-between fw-bold">
|
||||
<div class="fw-bold">{{ __('Total Amount') }}</div>
|
||||
<h6 class='fw-bold' id="grand_total_amount">{{ currency_format(0, currency: business_currency()) }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="button-group text-center mt-5">
|
||||
<button type="reset" class="theme-btn border-btn m-2">{{ __('Reset') }}</button>
|
||||
@usercan('transfers.create')
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Save') }}</button>
|
||||
@endusercan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="all-products" value="{{ route('business.products.all-product') }}">
|
||||
<input type="hidden" id="cart-store-url" value="{{ route('business.carts.store') }}">
|
||||
<input type="hidden" id="selectedProductValue" name="selectedProductValue">
|
||||
<input type="hidden" id="asset_base_url" value="{{ asset('') }}">
|
||||
<input type="hidden" id="get_stock_prices" value="{{ route('business.products.stocks-prices') }}">
|
||||
@if(moduleCheck('warehouseAddon'))
|
||||
<input type="hidden" id="branch_wise_warehouses" value="{{ route('warehouse.warehouses.branch') }}">
|
||||
@endif
|
||||
<input type="hidden" id="hasActiveBranch" value="{{ auth()->user()->active_branch ? 1 : 0 }}">
|
||||
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/custom/transfer.js') }}"></script>
|
||||
@endpush
|
||||
129
Modules/Business/resources/views/transfers/datas.blade.php
Normal file
129
Modules/Business/resources/views/transfers/datas.blade.php
Normal file
@@ -0,0 +1,129 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
@usercan('transfers.delete')
|
||||
<th class="w-60 d-print-none">
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<input type="checkbox" class="select-all-delete multi-delete">
|
||||
</div>
|
||||
</th>
|
||||
@endusercan
|
||||
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
<th>{{ __('Date') }}</th>
|
||||
<th>{{ __('Invoice') }}</th>
|
||||
|
||||
@if (moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<th>{{ __('From Branch') }}</th>
|
||||
@endif
|
||||
@if (moduleCheck('WarehouseAddon'))
|
||||
<th>{{ __('From Warehouse') }}</th>
|
||||
@endif
|
||||
@if (moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<th>{{ __('To Branch') }}</th>
|
||||
@endif
|
||||
@if (moduleCheck('WarehouseAddon'))
|
||||
<th>{{ __('To Warehouse') }}</th>
|
||||
@endif
|
||||
|
||||
<th>{{ __('Qty') }}</th>
|
||||
<th class="d-print-none">{{ __('Stock Values') }}</th>
|
||||
<th class="d-print-none">{{ __('Status') }}</th>
|
||||
<th class="d-print-none">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($transfers as $transfer)
|
||||
@php
|
||||
$totalQty = $transfer->transferProducts->sum('quantity');
|
||||
$totalStockValue = $transfer->transferProducts->sum(function ($product) {
|
||||
return $product->quantity * $product->unit_price;
|
||||
});
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
@usercan('transfers.delete')
|
||||
<td class="w-60 checkbox d-print-none">
|
||||
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete"
|
||||
value="{{ $transfer->id }}">
|
||||
</td>
|
||||
@endusercan
|
||||
|
||||
<td class="d-print-none">
|
||||
{{ ($transfers->currentPage() - 1) * $transfers->perPage() + $loop->iteration }}
|
||||
</td>
|
||||
|
||||
<td>{{ $transfer->transfer_date }}</td>
|
||||
<td>{{ $transfer->invoice_no }}</td>
|
||||
|
||||
@if (moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<td>{{ $transfer->fromBranch->name ?? '' }}</td>
|
||||
@endif
|
||||
@if (moduleCheck('WarehouseAddon'))
|
||||
<td>{{ $transfer->fromWarehouse->name ?? '' }}</td>
|
||||
@endif
|
||||
@if (moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<td>{{ $transfer->toBranch->name ?? '' }}</td>
|
||||
@endif
|
||||
@if (moduleCheck('WarehouseAddon'))
|
||||
<td>{{ $transfer->toWarehouse->name ?? '' }}</td>
|
||||
@endif
|
||||
|
||||
<td>{{ $totalQty }}</td>
|
||||
|
||||
<td class="d-print-none">
|
||||
{{ currency_format($totalStockValue, currency: business_currency()) }}
|
||||
</td>
|
||||
|
||||
<td class="d-print-none">
|
||||
@if ($transfer->status === 'pending')
|
||||
<span class="badge bg-warning">{{ ucfirst($transfer->status) }}</span>
|
||||
@elseif ($transfer->status === 'completed')
|
||||
<span class="badge bg-success">{{ ucfirst($transfer->status) }}</span>
|
||||
@elseif ($transfer->status === 'cancelled')
|
||||
<span class="badge bg-danger">{{ ucfirst($transfer->status) }}</span>
|
||||
@else
|
||||
<span class="badge bg-secondary">{{ ucfirst($transfer->status) }}</span>
|
||||
@endif
|
||||
</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">
|
||||
@usercan('transfers.update')
|
||||
@if ($transfer->status === 'pending')
|
||||
<li>
|
||||
<a href="{{ route('business.transfers.edit', $transfer->id) }}">
|
||||
<i class="fal fa-edit"></i>
|
||||
{{ __('Edit') }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endusercan
|
||||
|
||||
@usercan('transfers.delete')
|
||||
<li>
|
||||
<a href="{{ route('business.transfers.destroy', $transfer->id) }}"
|
||||
class="confirm-action" data-method="DELETE">
|
||||
<i class="fal fa-trash-alt"></i>
|
||||
{{ __('Delete') }}
|
||||
</a>
|
||||
</li>
|
||||
@endusercan
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
{{ $transfers->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
254
Modules/Business/resources/views/transfers/edit.blade.php
Normal file
254
Modules/Business/resources/views/transfers/edit.blade.php
Normal file
@@ -0,0 +1,254 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Edit Transfer') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card border-0">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16">
|
||||
<h4>{{ __('Edit Transfer') }}</h4>
|
||||
@usercan('transfers.read')
|
||||
<a href="{{ route('business.transfers.index') }}" class="add-order-btn rounded-2">
|
||||
<i class="far fa-list"></i> {{ __('Transfer List') }}
|
||||
</a>
|
||||
@endusercan
|
||||
</div>
|
||||
<div class="order-form-section p-16">
|
||||
<form action="{{ route('business.transfers.update', $transfer->id) }}" method="POST"
|
||||
class="ajaxform_instant_reload">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<div class="add-suplier-modal-wrapper d-block">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('Date') }}</label>
|
||||
<input type="date" name="transfer_date" value="{{ $transfer->transfer_date }}" required class="form-control">
|
||||
</div>
|
||||
@if((moduleCheck('MultiBranchAddon') && multibranch_active()) && !auth()->user()->active_branch_id)
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('From Branch') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="from_branch_id" id="from_branch" class="form-control table-select w-100 role">
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($branches as $branch)
|
||||
<option value="{{ $branch->id }}" @selected($transfer->from_branch_id == $branch->id)> {{ ucfirst($branch->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('To Branch') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="to_branch_id" class="form-control table-select w-100 role">
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($branches as $branch)
|
||||
<option value="{{ $branch->id }}" @selected($transfer->to_branch_id == $branch->id)> {{ ucfirst($branch->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-2"></div>
|
||||
@endif
|
||||
@if(moduleCheck('warehouseAddon'))
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('From Warehouse') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="from_warehouse_id" id="from_warehouse" class="form-control table-select w-100 role">
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($warehouses as $warehouse)
|
||||
<option value="{{ $warehouse->id }}" @selected($transfer->from_warehouse_id == $warehouse->id)> {{ ucfirst($warehouse->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('To Warehouse') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="to_warehouse_id" class="form-control table-select w-100 role">
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($warehouses as $warehouse)
|
||||
<option value="{{ $warehouse->id }}" @selected($transfer->to_warehouse_id == $warehouse->id)> {{ ucfirst($warehouse->name) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-lg-8 mb-2">
|
||||
<label>{{ __('Select Product') }}</label>
|
||||
<div class="d-flex align-items-center w-100">
|
||||
<div class="product-dropdown transfer-product-select w-100" id="productDropdown">
|
||||
<div class="product-selected">
|
||||
<span id="selectedValue">{{ __('Search Product') }}</span><span id="arrow">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="dropdown-search hidden" id="searchContainer">
|
||||
<input type="text" id="productSearch" placeholder="Search product..."/>
|
||||
</div>
|
||||
<div class="product-dropdown-options" id="dropdownList">
|
||||
{{-- fetch dynamically from js --}}
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ route('business.products.create') }}" class="btn btn-danger square-btn trasfer-square-btn d-flex justify-content-center align-items-center">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 4.16797V15.8346" stroke="#C52127" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4.16602 10H15.8327" stroke="#C52127" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 mb-2">
|
||||
<label>{{ __('Status') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
@if($transfer->status === 'cancelled')
|
||||
<input type="text" class="form-control" value="{{ __('Cancel') }}" disabled>
|
||||
@else
|
||||
<select name="status" class="form-control table-select w-100">
|
||||
@if($transfer->status === 'pending')
|
||||
<option value="pending" @selected($transfer->status == 'pending')>{{ __('Pending') }}</option>
|
||||
<option value="completed" @selected($transfer->status == 'completed')>{{ __('Completed') }}</option>
|
||||
<option value="cancelled" @selected($transfer->status == 'cancelled')>{{ __('Cancel') }}</option>
|
||||
@elseif($transfer->status === 'completed')
|
||||
<option value="completed" selected>{{ __('Completed') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
@endif
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{--Cart list --}}
|
||||
<div id="product-table-container" class="table-responsive mt-4">
|
||||
<table class="table table-bordered text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border p-2 table-background">{{ __('Image') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Items') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Code') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Batch') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Qty') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Unit Price') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Tax') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Discount') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Sub Total') }}</th>
|
||||
<th class="border p-2 table-background">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="product-list">
|
||||
@foreach($transfer->transferProducts as $tp)
|
||||
<tr id="product-row-{{ $tp->stock_id }}">
|
||||
<td>
|
||||
<img src="{{ asset($tp->stock->product->productPicture ?? 'assets/images/products/box.svg') }}" width="40">
|
||||
</td>
|
||||
<td>{{ $tp->stock->product->productName ?? '' }}</td>
|
||||
<td>{{ $tp->stock->product->productCode ?? '' }}</td>
|
||||
<td>{{ $tp->stock->batch_no ?? '' }}</td>
|
||||
<td>
|
||||
<input type="number" name="products[{{ $tp->stock_id }}][quantity]" value="{{ $tp->quantity }}" class="dynamic-qty form-control text-center">
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" name="products[{{ $tp->stock_id }}][unit_price]" value="{{ $tp->unit_price }}" class="unit-price form-control text-center">
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" name="products[{{ $tp->stock_id }}][tax]" value="{{ $tp->tax }}" class="tax form-control text-center">
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" name="products[{{ $tp->stock_id }}][discount]" value="{{ $tp->discount }}" class="discount form-control text-center">
|
||||
</td>
|
||||
<td class="sub-total text-center">
|
||||
{{ number_format(($tp->quantity * $tp->unit_price) + $tp->tax - $tp->discount, 2) }}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="x-btn remove-btn" data-id="{{ $tp->stock_id }}">
|
||||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none">
|
||||
<path d="M18.5 6L6.5 18" stroke="#E13F3D" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6.5 6L18.5 18" stroke="#E13F3D" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-8 mb-2">
|
||||
<p class="note-label">{{ __('Transfer Note') }}</p>
|
||||
<textarea cols="10" rows="3" name="note" class="form-control" placeholder="{{ __('Type note...') }}">{{ $transfer->note }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class=" col-lg-4 sub-total-container">
|
||||
<div
|
||||
class="payment-container mb-3 amount-info-container inventory-amount-info-container transfer-amount-info">
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between">
|
||||
<h6>{{ __('Sub Total') }}</h6>
|
||||
<h6 class="fw-bold" id="total_amount">{{ currency_format($transfer->sub_total) }}</h6>
|
||||
</div>
|
||||
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between">
|
||||
<h6>{{ __('Discount') }}</h6>
|
||||
<h6 class="fw-bold" id="discount_amount">{{ currency_format($transfer->total_discount) }}</h6>
|
||||
</div>
|
||||
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between">
|
||||
<h6>{{ __('Tax') }}</h6>
|
||||
<h6 class="fw-bold" id="tax_amount">{{ currency_format($transfer->total_tax) }}</h6>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-6">
|
||||
<h6 class="payment-title">{{ __('Shipping Charge') }}</h6>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="number" step="any" name="shipping_charge" value="{{ $transfer->shipping_charge }}" id="shipping_amount" class="form-control right-start-input" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class=" d-flex align-items-center justify-content-between fw-bold">
|
||||
<div class="fw-bold">{{ __('Total Amount') }}</div>
|
||||
<h6 class='fw-bold' id="grand_total_amount">{{ currency_format($transfer->grand_total) }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="button-group text-center mt-5">
|
||||
<button type="reset" class="theme-btn border-btn m-2">{{ __('Reset') }}</button>
|
||||
@usercan('transfers.create')
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Save') }}</button>
|
||||
@endusercan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="all-products" value="{{ route('business.products.all-product') }}">
|
||||
<input type="hidden" id="cart-store-url" value="{{ route('business.carts.store') }}">
|
||||
<input type="hidden" id="selectedProductValue" name="selectedProductValue">
|
||||
<input type="hidden" id="asset_base_url" value="{{ url('/') }}">
|
||||
<input type="hidden" id="get_stock_prices" value="{{ route('business.products.stocks-prices') }}">
|
||||
<input type="hidden" id="hasActiveBranch" value="{{ auth()->user()->active_branch ? 1 : 0 }}">
|
||||
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/custom/transfer.js') }}"></script>
|
||||
@endpush
|
||||
@@ -0,0 +1,49 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th>{{ __('Date') }}</th>
|
||||
<th>{{ __('Invoice No') }}</th>
|
||||
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<th>{{ __('From Branch') }}</th>
|
||||
@endif
|
||||
<th>{{ __('From Warehouse') }}</th>
|
||||
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<th>{{ __('To Branch') }}</th>
|
||||
@endif
|
||||
<th>{{ __('To Warehouse') }}</th>
|
||||
<th>{{ __('Qty') }}</th>
|
||||
<th>{{ __('Stock Values') }}</th>
|
||||
<th>{{ __('Status') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($transfers as $transfer)
|
||||
|
||||
@php
|
||||
$totalQty = $transfer->transferProducts->sum('quantity');
|
||||
$totalStockValue = $transfer->transferProducts->sum(function ($product) {
|
||||
return $product->quantity * $product->unit_price;
|
||||
});
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $transfer->transfer_date }}</td>
|
||||
<td>{{ $transfer->invoice_no }}</td>
|
||||
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<td>{{ $transfer->toBranch->name ?? '' }}</td>
|
||||
@endif
|
||||
<td>{{ $transfer->fromWarehouse->name ?? ''}}</td>
|
||||
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
|
||||
<td>{{ $transfer->fromBranch->name ?? '' }}</td>
|
||||
@endif
|
||||
<td>{{ $transfer->toWarehouse->name ?? '' }}</td>
|
||||
<td>{{ $totalQty }}</td>
|
||||
<td>{{ currency_format($totalStockValue, currency: business_currency()) }}</td>
|
||||
<td>{{ ucfirst($transfer->status) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
111
Modules/Business/resources/views/transfers/index.blade.php
Normal file
111
Modules/Business/resources/views/transfers/index.blade.php
Normal file
@@ -0,0 +1,111 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Transfer 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 d-print-none">
|
||||
<h4>{{ __('Transfer List') }}</h4>
|
||||
@usercan('transfers.create')
|
||||
<a type="button" href="{{ route('business.transfers.create') }}" class="add-order-btn rounded-2"><i class="fas fa-plus-circle me-1"></i>{{ __('Add new Transfer') }}</a>
|
||||
@endusercan
|
||||
</div>
|
||||
|
||||
<div class="table-header justify-content-center border-0 text-center d-none d-block d-print-block">
|
||||
@include('business::print.header')
|
||||
<h4 class="mt-2">{{ __('Transfer List') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.transfers.index') }}" method="GET" class="filter-form" table="#transfer-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>
|
||||
|
||||
@if(auth()->user()->accessToMultiBranch())
|
||||
<div class="table-search position-relative d-print-none">
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="branch_id" class="form-control">
|
||||
<option value="">{{ __('Select Branch') }}</option>
|
||||
@foreach ($branches as $branch)
|
||||
<option value="{{ $branch->id }}" @selected(request('branch_id') == $branch->id)>{{ $branch->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="table-search position-relative d-print-none">
|
||||
<input class="form-control searchInput" type="text" name="search" 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.transfers.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.transfers.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.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 class="delete-item delete-show d-none">
|
||||
<div class="delete-item-show">
|
||||
<p class="fw-bold"><span class="selected-count"></span> {{ __('items show') }}</p>
|
||||
<button data-bs-toggle="modal" class="trigger-modal" data-bs-target="#multi-delete-modal" data-url="{{ route('business.transfers.delete-all') }}">{{ __('Delete') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="transfer-data">
|
||||
@include('business::transfers.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('modal')
|
||||
@include('business::component.delete-modal')
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user