@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
@if(in_array('supadm', $users_rules)) @endif
@csrf
@csrf

BILL OF QUANTITY

PROJECT NAME : {{ $project->proyek ?? '-' }}
LOCATION : {{ $project->lokasi ?? '-' }}
OWNER NAME : {{ $project->pemilik ?? '-' }}
SALES NAME : {{ $project->sales ?? '-' }}
PV CAPACITY : {{ isset($project->pv_capacity) ? number_format($project->pv_capacity, 0, ',', '.') . ' Wp' : '-' }}
INVERTER CAPACITY : {{ isset($project->inverter_capacity) ? number_format($project->inverter_capacity, 0, ',', '.') . ' W' : '-' }}
FOREX : {{ isset($project->forex) ? number_format($project->forex, 2, ',', '.') : '-' }} IDR/$
EPC COST
@php $totalMaterialSellingPrice = 0; $totalMaterialDifference = 0; @endphp @foreach ($boqItemsGrouped as $kategoriCode => $items) @php $kategoriNo = $loop->iteration; $totalRupiah = $items->sum('amount_rupiah'); $usd_per_wp_cat = 0; if($project->pv_capacity && $project->forex){ $usd_per_wp_cat = ($totalRupiah / $project->forex) / $project->pv_capacity; } $totalSellingPrice = $items->sum(function($item) { $sellingPriceUnit = $item->selling_price_unit ?? 0; return $sellingPriceUnit * ($item->amount_unit ?? 0); }); $totalDifference = $items->sum(function($item) { $sellingPriceUnit = $item->selling_price_unit ?? 0; $sellingPriceTotal = $sellingPriceUnit * ($item->amount_unit ?? 0); return $sellingPriceTotal - ($item->amount_rupiah ?? 0); }); $totalMaterialSellingPrice += $totalSellingPrice; $totalMaterialDifference += $totalDifference; @endphp {{-- Header Kategori --}} {{-- Kosong agar Total IDR jatuh di kolom 10 --}} {{-- Selling Price kosong untuk header --}} {{-- Detail Item --}} @foreach ($items as $item) @php $detailNo = $kategoriNo . '.' . $loop->iteration; $usd_per_wp = 0; if($project->pv_capacity && $project->forex){ $usd_per_wp = ($item->amount_rupiah / $project->forex) / $project->pv_capacity; } @endphp @php $sellingPriceUnit = $item->selling_price_unit ?? 0; $sellingPriceTotal = $sellingPriceUnit * ($item->amount_unit ?? 0); $difference = $sellingPriceTotal - ($item->amount_rupiah ?? 0); @endphp @endforeach @endforeach {{-- Hidden holder for discount value used by JS --}}
Code No Items Supply By Brand Specification Qty Unit Price/Unit (IDR) Total (IDR) Selling Price/Unit Total Selling Price Difference $/Wp Remarks
{{ $items->first()->kategori_code }} {{ $kategoriNo }} {{ $items->first()->kategori }} {{ number_format($totalRupiah, 2, ',', '.') }} {{ number_format($totalSellingPrice, 2, ',', '.') }} {{ number_format($totalDifference, 2, ',', '.') }} {{ number_format($usd_per_wp_cat, 3, ',', '.') }}
{{ $item->detail_kategori_code }} {{ $detailNo }} {{ $item->detail_kategori }} {{ $item->supplier_name ?? '-' }} {{ $item->brand ?? '-' }} {{ $item->spesifikasi ?? '-' }} {{ number_format($item->amount_unit, 2, ',', '.') }} {{ $item->unit ?? '-' }}{{ number_format($item->amount_rupiah_unit, 2, ',', '.') }} {{ number_format($item->amount_rupiah, 2, ',', '.') }} {{ number_format($sellingPriceTotal, 2, ',', '.') }} {{ number_format($difference, 2, ',', '.') }} {{number_format($usd_per_wp, 3, ',', '.')}}
TOTAL MATERIAL PRICES {{ number_format($totals['total_material_rupiah'] ?? 0, 2, ',', '.') }} {{ number_format($totalMaterialSellingPrice, 2, ',', '.') }} {{ number_format($totalMaterialDifference, 2, ',', '.') }} {{ number_format($totals['total_material_usd_wp'] ?? 0, 3, ',', '.') }}
DISCOUNT {{ number_format($totals['discount_usd_wp'] ?? 0, 3, ',', '.') }}
TOTAL PRICE AFTER DISCOUNT {{ number_format(($totals['total_material_rupiah'] ?? 0) - ($totals['discount_idr'] ?? 0), 2, ',', '.') }} {{ number_format((($totals['total_material_rupiah'] ?? 0) - ($totals['discount_idr'] ?? 0)) / ($project->forex ?? 1) / ($project->pv_capacity ?? 1), 3, ',', '.') }}
TERM OF PAYMENTS
@if(isset($term_of_payments) && $term_of_payments->count() > 0)
    @foreach($term_of_payments as $term)
  • {{ $term->tterm_or_payments }}
  • @endforeach
@else

-

@endif
@endsection @push('js') @endpush