@extends('layouts.app') @section('content')

Finish Good : create

Page for create Finish Good

PO Buyer No : {{ $poBuyerInvoice->po->no }}
PO Buyer Date : {{ $poBuyerInvoice->po->formatted_date }}
Invoice No : {{ $poBuyerInvoice->no }}
Invoice Date : {{ $poBuyerInvoice->date }}
Buyer Code : {{ $poBuyerInvoice->buyer_code }}
Invoice PIC : {{ $poBuyerInvoice->createdBy->full_contact }}
BC Type : {{ $poBuyerInvoice->bc_data['type'] }}
BC No : {{ $poBuyerInvoice->bc_data['no'] }}
BC Date : {{ $poBuyerInvoice->bc_data['date'] }}
Nomor Polisi : {{ $poBuyerInvoice->bc_data['nopol'] }}
Pengangkut : {{ $poBuyerInvoice->bc_data['pengangkut'] }}
Forwarder : {{ $poBuyerInvoice->bc_data['forwarder'] }}
Nama Kapal : {{ $poBuyerInvoice->bc_data['nama_kapal'] }}
AWB : {{ $poBuyerInvoice->bc_data['awb'] }}
ETA : {{ $poBuyerInvoice->bc_data['eta'] }}
ETD : {{ $poBuyerInvoice->bc_data['etd'] }}
No Karantina : {{ $poBuyerInvoice->bc_data['no_karantina'] }}
Tanggal Karantina : {{ $poBuyerInvoice->bc_data['tanggal_karantina'] }}
No Kontainer : {{ $poBuyerInvoice->bc_data['no_kontainer'] }}
Jumlah Kontainer : {{ $poBuyerInvoice->bc_data['jumlah_kontainer'] }}
Create Delivery Order
You only can take from Divisi where "is_finish_good" are true
@csrf
@error('license_plate')
{{ $message }}
@enderror
@error('driver')
{{ $message }}
@enderror
@foreach ($poBuyerInvoice->details as $detail) @endforeach
Material Fullname Material Code Material Name Material Type Material UoM Qty Total Qty Delivered Qty Delivered
{{ $detail->material->formatted_material }} {{ $detail->material_code }} {{ $detail->material->name }} {{ $detail->material->material_type_code }} {{ $detail->material->uom_code }} {{ $detail->qty }} {{ $detail->qty_send }} @error('qty.' . $detail->id)
{{ $message }}
@enderror
@error('qty')
{{ $message }}
@enderror
@error('take_from_divisi')
{{ $message }}
@enderror

Are you sure want to create this ? .

List Delivery Order

Below is the list of Delivery Order that you have created on this page.

@foreach ($poBuyerInvoice->finishGoods as $finishGood) @php $details = $finishGood->details; @endphp @endforeach
No Date Material Fullname Material Code Material Name Material UoM Qty Send PIC Take From License Plate Driver Stock Status Action
{{ $finishGood->no }} {{ $finishGood->date }} @foreach ($details as $fullname) @endforeach
{{ $fullname->material->formatted_material }}
@foreach ($details as $material) @endforeach
{{ $material->material_code }}
@foreach ($details as $material) @endforeach
{{ $material->material->name }}
@foreach ($details as $uom) @endforeach
{{ $uom->material->uom_code }}
@foreach ($details as $qty) @endforeach
{{ $qty->qty }}
{{ $finishGood->createdBy->full_contact }} {{ $finishGood->take_from_divisi }} {{ $finishGood->license_plate }} {{ $finishGood->driver }} @foreach ($details as $stock) @php $lastStock = \App\Models\Stock::getCurrentStock( $finishGood->take_from_divisi, $stock->material_code, ); @endphp @endforeach
{{ $lastStock }}
@switch($finishGood->status) @case(false) Not complete @break @case(true) Complete @break @default @endswitch
    @switch($finishGood->status) @case(false)
  • Are you sure want to finish this ?

    Once finish you cannot edit or remove and your stock card will update

    @csrf @method('PUT')
  • Are you sure want to delete this ?

    @csrf @method('DELETE')
  • @break @case(true) @break @default @endswitch

Are you sure want to finish this ?

Once you finished, you cannot add more Delivery Order and status will change to complete

All Finish Good with Not complete status will change to Complete

And will decrease stock from Stock Card for all this Material Code

@csrf @method('PUT')
@endsection @section('js') @endsection