partial update products
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
<i class="kt-font-brand flaticon2-list-1"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Tabel Kategori Produk
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="parent_id" class="form-label">Induk Kategori (Opsional)</label>
|
||||
<select class="form-control" id="parent_id" name="parent_id">
|
||||
<select class="form-control" id="parent_id" name="parent_id" data-url="{{ route('product_categories.parents') }}">
|
||||
<option value="">-- Tidak ada (Kategori Utama) --</option>
|
||||
<!-- will be filled by JavaScript -->
|
||||
</select>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
<i class="kt-font-brand flaticon2-plus"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">Tambah Produk</h3>
|
||||
</div>
|
||||
@@ -59,18 +59,7 @@
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{-- Dynamic Dealer Stock Section --}}
|
||||
<div id="dealerData" data-dealers='@json($dealers)'></div>
|
||||
<div class="form-group">
|
||||
<label><strong>Stok per Dealer</strong></label>
|
||||
<div id="dynamicDealerRows"></div>
|
||||
|
||||
<button type="button" id="addDealerRow" class="btn btn-outline-primary mt-2">
|
||||
➕ Tambah Dealer
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Submit --}}
|
||||
<div class="form-group mt-4">
|
||||
<button type="submit" class="btn btn-primary">Simpan</button>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
<i class="kt-font-brand flaticon2-edit"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">Tambah Produk</h3>
|
||||
<h3 class="kt-portlet__head-title">Ubah Produk</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,14 @@
|
||||
<input type="text" name="unit" id="unit" class="form-control" value="{{ old('unit', $product->unit) }}" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="active"><strong>Status Produk</strong></label>
|
||||
<select name="active" class="form-control" required>
|
||||
<option value="1">Aktif</option>
|
||||
<option value="0">Tidak Aktif</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description"><strong>Deskripsi</strong></label>
|
||||
<textarea name="description" id="description" class="form-control" rows="3">{{ old('description', $product->description) }}</textarea>
|
||||
@@ -55,36 +63,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{-- Stok per Dealer --}}
|
||||
<div id="dealerData" data-dealers='@json($dealers)'></div>
|
||||
<div class="form-group">
|
||||
<label><strong>Stok per Dealer</strong></label>
|
||||
<div id="dynamicDealerRows">
|
||||
@foreach($product->dealers as $index => $dealer)
|
||||
<div class="form-group row align-items-center dealer-stock-row">
|
||||
<div class="col-md-6">
|
||||
<select name="dealer_stock[{{ $index }}][dealer_id]" class="form-control">
|
||||
<option value="">-- Pilih Dealer --</option>
|
||||
@foreach ($dealers as $d)
|
||||
<option value="{{ $d->id }}" {{ $d->id == $dealer->id ? 'selected' : '' }}>
|
||||
{{ $d->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="number" name="dealer_stock[{{ $index }}][quantity]" value="{{ $dealer->pivot->quantity }}" class="form-control" placeholder="Jumlah Stok" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-danger btn-sm remove-dealer-row">Hapus</button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="button" id="addDealerRow" class="btn btn-outline-primary mt-2">➕ Tambah Dealer</button>
|
||||
</div>
|
||||
|
||||
{{-- Submit --}}
|
||||
<div class="form-group mt-4">
|
||||
<button type="submit" class="btn btn-primary">Simpan</button>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
<i class="kt-font-brand flaticon2-list-1"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Tabel Produk
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
<i class="kt-font-brand flaticon2-list-1"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Tabel Mutasi Stock Produk
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
@extends('layouts.backapp')
|
||||
|
||||
@section('content')
|
||||
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-plus"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Tambah Opname
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
<form action="{{ route('opnames.store') }}" method="POST" id="opnameForm">
|
||||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
<label for="product"><strong>Produk</strong></label>
|
||||
<input type="text" class="form-control" name="product" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="dealer"><strong>Dealer</strong></label>
|
||||
<input type="text" class="form-control" name="dealer" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="system_quantity"><strong>Total Sistem</strong></label>
|
||||
<input type="number" class="form-control" name="system_quantity" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="phisycal_quantity"><strong>Total Sistem</strong></label>
|
||||
<input type="number" class="form-control" name="phisycal_quantity" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="difference"><strong>Perbedaan</strong></label>
|
||||
<input type="number" class="form-control" name="difference" />
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4">
|
||||
<button type="submit" class="btn btn-primary">Simpan</button>
|
||||
<a href="{{ route('opnames.index') }}" class="btn btn-secondary">Batal</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{mix('js/warehouse_management/stock_opnames/create.js')}}"></script>
|
||||
@endsection
|
||||
@@ -5,13 +5,13 @@
|
||||
<div class="kt-portlet__head kt-portlet__head--lg">
|
||||
<div class="kt-portlet__head-label">
|
||||
<span class="kt-portlet__head-icon">
|
||||
<i class="kt-font-brand flaticon2-line-chart"></i>
|
||||
<i class="kt-font-brand flaticon2-list-1"></i>
|
||||
</span>
|
||||
<h3 class="kt-portlet__head-title">
|
||||
Tabel Mutasi Stock Produk
|
||||
Tabel Stock Opname
|
||||
</h3>
|
||||
</div>
|
||||
@can('create', $menus['mutations.index'])
|
||||
@can('create', $menus['opnames.index'])
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions">
|
||||
|
||||
Reference in New Issue
Block a user