@extends('layouts.app') @section('title', 'Terima Barang - MCU Klinik Mustika') @section('breadcrumb')

Terima Barang

@endsection @section('content')
Sumber Penerimaan
Penerimaan langsung dapat digunakan untuk mencatat barang dari supplier aktif tanpa membuat purchase order lebih dahulu.
@if ($source === 'purchase_order')
Pilih Purchase Order
@if ($purchaseOrder) @php($remainingItems = $purchaseOrder->items->filter( fn($item) => $item->received_quantity < $item->quantity ))
Penerimaan {{ $purchaseOrder->po_number }}
Supplier
{{ $purchaseOrder->supplier->name }}
Profil Perusahaan
{{ $purchaseOrder->location->name }}
Tanggal PO
{{ \App\Helpers\DateHelper::formatDate( $purchaseOrder->po_date, ) }}
@csrf
Gunakan tanggal barang diterima secara fisik, dari {{ \App\Helpers\DateHelper::formatDate($purchaseOrder->po_date) }} sampai hari ini.
@error ('receipt_date')
{{ $message }}
@enderror
@error ('notes')
{{ $message }}
@enderror
@error ('items')
{{ $message }}
@enderror
@foreach ($remainingItems as $index => $item) @php($oldItem = old("items.{$index}", [])) @endforeach
Terima Barang Sisa PO Nomor Batch Kedaluwarsa Jumlah Harga Beli Keterangan
{{ $item->drug->name }}
{{ $item->drug->unit?->abbreviation ?: $item->drug->unit?->name }}
Harga terakhir: {{ $item->drug->last_purchase_price !== null ? 'Rp ' . number_format((float) $item->drug->last_purchase_price, 0, ',', '.') : 'Belum ada' }}
{{ number_format( $item->quantity - $item->received_quantity, 0, ',', '.', ) }}
@include('pharmacy.goods-receipts.partials.item-financial-fields', ['financialItem' => $oldItem, 'currentSellingPrice' => $item->drug->selling_price])
@include('pharmacy.goods-receipts.partials.invoice-fields') @include('pharmacy.goods-receipts.partials.price-increase-confirmation')
Batal
@endif @else
Penerimaan Langsung
@if ($companyProfileConfigurationError)
{{ $companyProfileConfigurationError }}
@endif @error ('company_profile')
{{ $message }}
@enderror
@csrf
@error ('supplier_id')
{{ $message }}
@enderror
Tujuan stok mengikuti satu Profil Perusahaan Apotek aktif yang telah dikonfigurasi.
@error ('receipt_date')
{{ $message }}
@enderror
@error ('notes')
{{ $message }}
@enderror
Rincian Barang
Harga beli terakhir akan diperbarui dari setiap penerimaan yang berhasil disimpan.
@error ('items')
{{ $message }}
@enderror
@foreach (old('items', [[]]) as $index => $itemData) @include('pharmacy.goods-receipts.partials.direct-item-row', ['index' => $index, 'itemData' => $itemData]) @endforeach
Barang Nomor Batch Kedaluwarsa Jumlah Harga Beli Keterangan Aksi
@include('pharmacy.goods-receipts.partials.invoice-fields') @include('pharmacy.goods-receipts.partials.price-increase-confirmation')
Batal
@endif @endsection @push('scripts') @endpush