update marketing
All checks were successful
All checks were successful
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user