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

Edit Production Costs: {{ $production->batch_no }}

Back
@if($errors->any())
Please fix the following errors:
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if(session('error'))
{{ session('error') }}
@endif
Note: You can only edit the additional production costs. Raw materials and output quantities cannot be changed. To modify those, delete this batch and create a new one.
@csrf @method('PUT')

Raw Materials Input (Read Only)

@foreach($production->inputItems as $index => $item) @endforeach
# Item Quantity Rate Amount
{{ $index + 1 }} {{ $item->item->name }} {{ number_format($item->quantity, 3) }} {{ $item->item->unit }} Rs. {{ number_format($item->rate, 2) }} Rs. {{ number_format($item->amount, 2) }}
Total Raw Material Cost: Rs. {{ number_format($production->raw_material_cost, 2) }}

Finished Goods Output (Read Only)

@foreach($production->outputItems as $index => $item) @endforeach
# Item Quantity
{{ $index + 1 }} {{ $item->item->name }} {{ number_format($item->quantity, 3) }} {{ $item->item->unit }}
Total Output: {{ number_format($production->output_quantity, 3) }} KG

Additional Production Costs (Editable)

Updated Cost Calculation

Raw Material Cost
Rs. {{ number_format($production->raw_material_cost, 2) }}
Additional Costs
Rs. {{ number_format($production->total_cost - $production->raw_material_cost, 2) }}
Total Cost
Rs. {{ number_format($production->total_cost, 2) }}
Output Qty
{{ number_format($production->output_quantity, 3) }} KG
NEW COST/UNIT
Rs. {{ number_format($production->cost_per_unit, 2) }}
Cancel
@endsection