update marketing
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-14 11:55:22 +07:00
parent f80fcc4c1b
commit 05fd3230b8
448 changed files with 17545 additions and 5128 deletions

View File

@@ -4,6 +4,10 @@
{{ __('Create Transfer') }}
@endsection
@php
$modules = product_setting()->modules ?? [];
@endphp
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
@@ -14,7 +18,7 @@
</div>
<div class="order-form-section p-16">
<form action="{{ route('business.transfers.store') }}" method="POST"
class="ajaxform_instant_reload">
class="ajaxform_instant_reload">
@csrf
<div class="add-suplier-modal-wrapper d-block">
<div class="row">
@@ -85,17 +89,18 @@ class="ajaxform_instant_reload">
</span>
</div>
<div class="dropdown-search hidden" id="searchContainer">
<input type="text" id="productSearch" placeholder="Search product..."/>
<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 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="var(--clr-primary)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.16602 10H15.8327" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</a>
</div>
</div>
@@ -114,21 +119,24 @@ class="ajaxform_instant_reload">
<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>
<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>
@if (moduleCheck('SerialCodeAddon'))
<th class="border p-2 table-background serial-option">{{ __('Serial') }}</th>
@endif
<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 --}}
{{-- added via jquery --}}
</tbody>
</table>
</div>
@@ -145,23 +153,20 @@ class="payment-container mb-3 amount-info-container inventory-amount-info-contai
<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">
<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">
@@ -193,13 +198,25 @@ class="payment-container mb-3 amount-info-container inventory-amount-info-contai
<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 }}">
<input type="hidden" id="has-serial-code-addon" value="{{ moduleCheck('SerialCodeAddon') }}">
<input type="hidden" id="has-warehouse-addon" value="{{ moduleCheck('WarehouseAddon') }}">
<input type="hidden" id="check-serial-exist" value="{{ route('business.products.check-serial') }}">
<input type="hidden" id="get-product-serials" value="{{ route('business.products.get-serials') }}">
<input type="hidden" id="is-inventory-page" value="1">
@if(moduleCheck('WarehouseAddon'))
<input type="hidden" id="branch_wise_warehouses" value="{{ route('warehouse.warehouses.branch') }}">
@endif
@endsection
@push('js')
<script src="{{ asset('assets/js/custom/transfer.js') }}"></script>
@push('modal')
@if (moduleCheck('SerialCodeAddon'))
@include('serialcodeaddon::select-serial-modal')
@endif
@endpush
@push('js')
<script src="{{ asset('assets/js/custom/transfer.js') . '?v=' . time() }}"></script>
@endpush

View File

@@ -1,125 +1,125 @@
<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
<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>
<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
@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>
<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
@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
<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 class="d-print-none">
{{ ($transfers->currentPage() - 1) * $transfers->perPage() + $loop->iteration }}
</td>
<td>{{ $transfer->transfer_date }}</td>
<td>{{ $transfer->invoice_no }}</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>
@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>{{ $totalQty }}</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
<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
@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>

View File

@@ -18,8 +18,7 @@
@endusercan
</div>
<div class="order-form-section p-16">
<form action="{{ route('business.transfers.update', $transfer->id) }}" method="POST"
class="ajaxform_instant_reload">
<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">
@@ -44,13 +43,15 @@ class="ajaxform_instant_reload">
</div>
@endif
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
<div class="col-lg-4 mb-2">
<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">
<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>
<option
value="{{ $branch->id }}" @selected($transfer->to_branch_id == $branch->id)> {{ ucfirst($branch->name) }}</option>
@endforeach
</select>
<span></span>
@@ -59,49 +60,51 @@ class="ajaxform_instant_reload">
<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 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>
<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 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>
</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-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..."/>
<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">
<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"/>
@@ -141,6 +144,9 @@ class="ajaxform_instant_reload">
<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>
@if (moduleCheck('SerialCodeAddon'))
<th class="border p-2 table-background serial-option">{{ __('Serial') }}</th>
@endif
<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>
@@ -149,6 +155,10 @@ class="ajaxform_instant_reload">
</thead>
<tbody id="product-list">
@foreach($transfer->transferProducts as $tp)
@php
$serials = $tp->serial_numbers ?? [];
$serialQty = !empty($serials) ? count($serials) : $tp->quantity;
@endphp
<tr id="product-row-{{ $tp->stock_id }}">
<td>
<img src="{{ asset($tp->stock->product->productPicture ?? 'assets/images/products/box.svg') }}" width="40">
@@ -157,11 +167,45 @@ class="ajaxform_instant_reload">
<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">
<div class="d-flex align-items-center justify-content-center">
<button type="button" class="incre-decre subtract-btn btn btn-sm btn-outline-secondary {{ !empty($serials) ? 'd-none' : '' }}">
<i class="fas fa-minus"></i>
</button>
<input type="number" name="products[{{ $tp->stock_id }}][quantity]"
value="{{ $serialQty }}"
class="custom-number-input dynamic-qty form-control form-control-sm mx-1 text-center"
min="1" step="1"
style="width: 60px;"
{{ !empty($serials) ? 'readonly' : '' }}>
<button type="button" class="incre-decre adding-btn btn btn-sm btn-outline-secondary {{ !empty($serials) ? 'd-none' : '' }}">
<i class="fas fa-plus"></i>
</button>
</div>
</td>
<td>
<input type="number" name="products[{{ $tp->stock_id }}][unit_price]" value="{{ $tp->unit_price }}" class="unit-price form-control text-center">
</td>
@if(moduleCheck('SerialCodeAddon'))
<td class="text-center">
@if(!empty($serials))
<button type="button" class="serial-cell-button" data-stock_id="{{ $tp->stock_id }}">
<svg width="28" height="28" viewBox="0 0 28 28" fill="none">
<path d="M4 7H18" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round"/>
<path d="M23 7H23.0105" stroke="var(--clr-primary)" stroke-width="2"/>
<path d="M23 14H23.0105" stroke="var(--clr-primary)" stroke-width="2"/>
<path d="M23 21H23.0105" stroke="var(--clr-primary)" stroke-width="2"/>
<path d="M4 14H18" stroke="var(--clr-primary)" stroke-width="2"/>
<path d="M4 21H18" stroke="var(--clr-primary)" stroke-width="2"/>
</svg>
</button>
<input type="hidden" class="serial-hidden-input" name="products[{{ $tp->stock_id }}][serial_numbers]" value='@json($serials)'>
@else
-
@endif
</td>
@endif
<td>
<input type="number" name="products[{{ $tp->stock_id }}][tax]" value="{{ $tp->tax }}" class="tax form-control text-center">
</td>
@@ -174,10 +218,8 @@ class="ajaxform_instant_reload">
<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"/>
<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>
@@ -240,15 +282,26 @@ class="payment-container mb-3 amount-info-container inventory-amount-info-contai
</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 }}">
<input type="hidden" id="has-serial-code-addon" value="{{ moduleCheck('SerialCodeAddon') }}">
<input type="hidden" id="check-serial-exist" value="{{ route('business.products.check-serial') }}">
<input type="hidden" id="get-product-serials" value="{{ route('business.products.get-serials') }}">
<input type="hidden" id="is-inventory-page" value="1">
@endsection
@push('js')
<script src="{{ asset('assets/js/custom/transfer.js') }}"></script>
@push('modal')
@if (moduleCheck('SerialCodeAddon'))
@include('serialcodeaddon::select-serial-modal')
@endif
@endpush
@push('js')
<script src="{{ asset('assets/js/custom/transfer.js') . '?v=' . time() }}"></script>
@endpush

View File

@@ -7,11 +7,15 @@
@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>{{ __('Stock Values') }}</th>
<th>{{ __('Status') }}</th>
@@ -20,14 +24,12 @@
<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>
@@ -35,11 +37,15 @@
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
<td>{{ $transfer->toBranch->name ?? '' }}</td>
@endif
@if (moduleCheck('WarehouseAddon'))
<td>{{ $transfer->fromWarehouse->name ?? ''}}</td>
@endif
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
<td>{{ $transfer->fromBranch->name ?? '' }}</td>
@endif
@if (moduleCheck('WarehouseAddon'))
<td>{{ $transfer->toWarehouse->name ?? '' }}</td>
@endif
<td>{{ $totalQty }}</td>
<td>{{ currency_format($totalStockValue, currency: business_currency()) }}</td>
<td>{{ ucfirst($transfer->status) }}</td>

View File

@@ -22,7 +22,7 @@
</div>
<div class="table-top-form p-16">
<form action="{{ route('business.transfers.index') }}" method="GET" class="filter-form" table="#transfer-data">
<form action="{{ route('business.transfers.index') }}" method="GET" class="report-filter-form" table="#transfer-data">
<div class="table-top-left d-flex gap-3">
@@ -66,18 +66,20 @@
<div class="table-top-btn-group d-print-none">
<ul>
<li>
<a href="{{ route('business.transfers.csv') }}">
<a class="export-btn" href="{{ route('business.transfers.csv') }}">
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
</a>
</li>
<li>
<a href="{{ route('business.transfers.excel') }}">
<a class="export-btn" href="{{ route('business.transfers.excel') }}">
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
</a>
</li>
<li>
<a class="export-btn" target="_blank" href="{{ route('business.transfers.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="">

View File

@@ -0,0 +1,83 @@
@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="">{{ __('Transfer 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;"
id="datatable">
<thead>
<tr style="background-color: #C52127; color: white;">
<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">{{ __('Invoice No') }}</th>
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('From Branch') }}</th>
@endif
@if (moduleCheck('WarehouseAddon'))
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('From Warehouse') }}</th>
@endif
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('To Branch') }}</th>
@endif
@if (moduleCheck('WarehouseAddon'))
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('To Warehouse') }}</th>
@endif
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Qty') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Stock Values') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('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 style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
<td style="border:1px solid gainsboro; text-align:center;">
{{ $transfer->transfer_date }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $transfer->invoice_no }}
</td>
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
<td style="border:1px solid gainsboro; text-align:center;">
{{ $transfer->toBranch->name ?? '' }}
</td>
@endif
@if (moduleCheck('WarehouseAddon'))
<td style="border:1px solid gainsboro; text-align:center;">
{{ $transfer->fromWarehouse->name ?? ''}}
</td>
@endif
@if(moduleCheck('MultiBranchAddon') && multibranch_active())
<td style="border:1px solid gainsboro; text-align:center;" class="d-print-none">
{{ $transfer->fromBranch->name ?? '' }}
</td>
@endif
@if (moduleCheck('WarehouseAddon'))
<td style="border:1px solid gainsboro; text-align:center;">
{{ $transfer->toWarehouse->name ?? '' }}
</td>
@endif
<td style="border:1px solid gainsboro; text-align:center;">
{{ $totalQty }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ currency_format($totalStockValue, currency: business_currency()) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ ucfirst($transfer->status) }}
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection