<?php if (isset($component)) { $__componentOriginale0f1cdd055772eb1d4a99981c240763e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0f1cdd055772eb1d4a99981c240763e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin-layout','data' => ['title' => 'Inventory','subtitle' => 'Pembelian, opname, adjustment, warning stok minimum, dan histori mutasi stok.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Inventory','subtitle' => 'Pembelian, opname, adjustment, warning stok minimum, dan histori mutasi stok.']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

    <div class="grid gap-5 xl:grid-cols-[1fr_420px]">
        <div class="space-y-5">
            <section class="overflow-hidden rounded-lg bg-white shadow-sm">
                <div class="flex items-center justify-between border-b p-5">
                    <div>
                        <h2 class="font-semibold">Stok per Cabang</h2>
                        <p class="text-sm text-slate-500">Produk service tidak mengurangi stok; hanya retail track stock.</p>
                    </div>
                    <form>
                        <select name="branch_id" onchange="this.form.submit()" class="rounded-md border px-3 py-2 text-sm">
                            <option value="">Semua cabang</option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $branches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $branch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                <option value="<?php echo e($branch->id); ?>" <?php if((int) $selectedBranchId === $branch->id): echo 'selected'; endif; ?>><?php echo e($branch->name); ?></option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        </select>
                    </form>
                </div>
                <table class="w-full text-left text-sm">
                    <thead class="bg-slate-100 text-slate-600">
                    <tr><th class="p-3">Produk</th><th>Cabang</th><th>Stok</th><th>Minimum</th><th>Status</th></tr>
                    </thead>
                    <tbody class="divide-y">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $stocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <?php $low = (float) $stock->quantity <= (float) $stock->product->minimum_stock; ?>
                        <tr>
                            <td class="p-3 font-medium"><?php echo e($stock->product->name); ?></td>
                            <td><?php echo e($stock->branch->name); ?></td>
                            <td><?php echo e(rtrim(rtrim(number_format((float) $stock->quantity, 3, ',', '.'), '0'), ',')); ?></td>
                            <td><?php echo e(rtrim(rtrim(number_format((float) $stock->product->minimum_stock, 3, ',', '.'), '0'), ',')); ?></td>
                            <td><span class="rounded-full border px-2 py-0.5 text-xs <?php echo e($low ? 'border-red-200 bg-red-50 text-red-700' : 'border-emerald-200 bg-emerald-50 text-emerald-700'); ?>"><?php echo e($low ? 'Minimum' : 'Aman'); ?></span></td>
                        </tr>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        <tr><td colspan="5" class="p-6 text-center text-slate-500">Belum ada data stok.</td></tr>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </tbody>
                </table>
            </section>

            <section class="rounded-lg bg-white p-5 shadow-sm">
                <h2 class="font-semibold">Histori Mutasi Stok</h2>
                <div class="mt-4 divide-y text-sm">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $mutations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mutation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <div class="grid gap-2 py-3 md:grid-cols-[1fr_auto]">
                            <div>
                                <div class="font-medium"><?php echo e($mutation->product?->name); ?> - <?php echo e($mutation->branch?->name); ?></div>
                                <div class="text-slate-500"><?php echo e($mutation->source_type); ?> <?php echo e($mutation->note ? '- '.$mutation->note : ''); ?></div>
                            </div>
                            <div class="text-right">
                                <div class="font-semibold <?php echo e((float) $mutation->quantity_change < 0 ? 'text-red-700' : 'text-emerald-700'); ?>"><?php echo e((float) $mutation->quantity_change > 0 ? '+' : ''); ?><?php echo e(rtrim(rtrim(number_format((float) $mutation->quantity_change, 3, ',', '.'), '0'), ',')); ?></div>
                                <div class="text-xs text-slate-500">Akhir <?php echo e(rtrim(rtrim(number_format((float) $mutation->quantity_after, 3, ',', '.'), '0'), ',')); ?></div>
                            </div>
                        </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        <div class="py-3 text-slate-500">Belum ada mutasi.</div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </section>
        </div>

        <aside class="space-y-5">
            <form method="post" action="<?php echo e(route('inventory.purchases.store')); ?>" class="rounded-lg bg-white p-5 shadow-sm">
                <?php echo csrf_field(); ?>
                <h2 class="font-semibold">Pembelian Barang</h2>
                <div class="mt-4 grid gap-3 md:grid-cols-2">
                    <?php if (isset($component)) { $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.select','data' => ['name' => 'branch_id','label' => 'Cabang','value' => $selectedBranchId,'options' => $branches->pluck('name', 'id')->all()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'branch_id','label' => 'Cabang','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($selectedBranchId),'options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($branches->pluck('name', 'id')->all())]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $attributes = $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $component = $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.select','data' => ['name' => 'supplier_id','label' => 'Supplier','value' => old('supplier_id'),'options' => $suppliers->pluck('name', 'id')->all(),'empty' => 'Tanpa supplier']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'supplier_id','label' => 'Supplier','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('supplier_id')),'options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($suppliers->pluck('name', 'id')->all()),'empty' => 'Tanpa supplier']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $attributes = $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $component = $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
                </div>
                <div class="mt-3 grid gap-3 md:grid-cols-2">
                    <?php if (isset($component)) { $__componentOriginal01bc97816ba4a46111453acfd18642c9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal01bc97816ba4a46111453acfd18642c9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.input','data' => ['name' => 'purchase_date','label' => 'Tanggal','type' => 'date','value' => old('purchase_date', now()->toDateString()),'required' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'purchase_date','label' => 'Tanggal','type' => 'date','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('purchase_date', now()->toDateString())),'required' => true]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $attributes = $__attributesOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__attributesOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $component = $__componentOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__componentOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal01bc97816ba4a46111453acfd18642c9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal01bc97816ba4a46111453acfd18642c9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.input','data' => ['name' => 'invoice_no','label' => 'No. invoice supplier','value' => old('invoice_no')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'invoice_no','label' => 'No. invoice supplier','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('invoice_no'))]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $attributes = $__attributesOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__attributesOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $component = $__componentOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__componentOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
                </div>
                <div class="mt-4 space-y-2">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $products->take(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <div class="grid grid-cols-[1fr_80px_110px] gap-2">
                            <input type="hidden" name="items[<?php echo e($i); ?>][product_id]" value="<?php echo e($product->id); ?>">
                            <div class="rounded-md border bg-slate-50 px-3 py-2 text-sm"><?php echo e($product->name); ?></div>
                            <input name="items[<?php echo e($i); ?>][quantity]" type="number" step="0.001" min="0" placeholder="Qty" class="rounded-md border px-2 py-2 text-sm">
                            <input name="items[<?php echo e($i); ?>][unit_cost]" type="number" min="0" value="<?php echo e((int) $product->cost_price); ?>" class="rounded-md border px-2 py-2 text-sm">
                        </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </div>
                <textarea name="note" placeholder="Catatan pembelian" class="mt-3 w-full rounded-md border px-3 py-2 text-sm"></textarea>
                <button class="mt-4 w-full rounded-md bg-slate-900 px-4 py-2 font-medium text-white">Simpan Pembelian</button>
            </form>

            <form method="post" action="<?php echo e(route('inventory.opname.store')); ?>" class="rounded-lg bg-white p-5 shadow-sm">
                <?php echo csrf_field(); ?>
                <h2 class="font-semibold">Stock Opname</h2>
                <div class="mt-4 grid gap-3 md:grid-cols-2">
                    <?php if (isset($component)) { $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.select','data' => ['name' => 'branch_id','label' => 'Cabang','value' => $selectedBranchId,'options' => $branches->pluck('name', 'id')->all()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'branch_id','label' => 'Cabang','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($selectedBranchId),'options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($branches->pluck('name', 'id')->all())]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $attributes = $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $component = $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal01bc97816ba4a46111453acfd18642c9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal01bc97816ba4a46111453acfd18642c9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.input','data' => ['name' => 'opname_date','label' => 'Tanggal','type' => 'date','value' => now()->toDateString(),'required' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'opname_date','label' => 'Tanggal','type' => 'date','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(now()->toDateString()),'required' => true]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $attributes = $__attributesOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__attributesOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $component = $__componentOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__componentOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
                </div>
                <div class="mt-4 space-y-2">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $products->take(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <div class="grid grid-cols-[1fr_120px] gap-2">
                            <input type="hidden" name="items[<?php echo e($i); ?>][product_id]" value="<?php echo e($product->id); ?>">
                            <div class="rounded-md border bg-slate-50 px-3 py-2 text-sm"><?php echo e($product->name); ?></div>
                            <input name="items[<?php echo e($i); ?>][actual_quantity]" type="number" step="0.001" min="0" placeholder="Fisik" class="rounded-md border px-2 py-2 text-sm">
                        </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </div>
                <textarea name="note" placeholder="Catatan opname" class="mt-3 w-full rounded-md border px-3 py-2 text-sm"></textarea>
                <button class="mt-4 w-full rounded-md border px-4 py-2 font-medium">Posting Opname</button>
            </form>

            <form method="post" action="<?php echo e(route('inventory.adjustments.store')); ?>" class="rounded-lg bg-white p-5 shadow-sm">
                <?php echo csrf_field(); ?>
                <h2 class="font-semibold">Adjustment Cepat</h2>
                <div class="mt-4 grid gap-3">
                    <?php if (isset($component)) { $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.select','data' => ['name' => 'branch_id','label' => 'Cabang','value' => $selectedBranchId,'options' => $branches->pluck('name', 'id')->all()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'branch_id','label' => 'Cabang','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($selectedBranchId),'options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($branches->pluck('name', 'id')->all())]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $attributes = $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $component = $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.select','data' => ['name' => 'product_id','label' => 'Produk','value' => old('product_id'),'options' => $products->pluck('name', 'id')->all()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'product_id','label' => 'Produk','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('product_id')),'options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($products->pluck('name', 'id')->all())]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $attributes = $__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__attributesOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa)): ?>
<?php $component = $__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa; ?>
<?php unset($__componentOriginal5c4d796b9262c7fe90fe74103bb75dfa); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal01bc97816ba4a46111453acfd18642c9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal01bc97816ba4a46111453acfd18642c9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.master.input','data' => ['name' => 'quantity','label' => 'Stok akhir','type' => 'number','value' => old('quantity', 0),'required' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('master.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'quantity','label' => 'Stok akhir','type' => 'number','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('quantity', 0)),'required' => true]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $attributes = $__attributesOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__attributesOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal01bc97816ba4a46111453acfd18642c9)): ?>
<?php $component = $__componentOriginal01bc97816ba4a46111453acfd18642c9; ?>
<?php unset($__componentOriginal01bc97816ba4a46111453acfd18642c9); ?>
<?php endif; ?>
                </div>
                <textarea name="note" placeholder="Alasan adjustment" class="mt-3 w-full rounded-md border px-3 py-2 text-sm"></textarea>
                <button class="mt-4 w-full rounded-md border px-4 py-2 font-medium">Simpan Adjustment</button>
            </form>
        </aside>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $attributes = $__attributesOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $component = $__componentOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__componentOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php /**PATH /Users/dedehermawan/Dokumen/project/laundry/resources/views/inventory/index.blade.php ENDPATH**/ ?>