@extends('layouts.backend.index') @section('title', $label) @section('content')
@csrf
@php $old = old('work', []); $subtotal = 0; $ppn = 0; $pph = 0; $total = 0; @endphp @if (Auth::user()->entity->is_barang) @else @endif
@if (Auth::user()->entity->is_barang) @else @endif @php $old = old('items', []); @endphp @if (empty($old)) @if (Auth::user()->entity->is_barang) @endif @else @foreach ($old['id'] as $index => $i) @php $price = empty($old['price'][$index]) ? 0 : str_replace('.', '', $old['price'][$index]); $qty = empty($old['qty'][$index]) ? 0 : str_replace('.', '', $old['qty'][$index]); $total_work = $price * $qty; $subtotal += $total_work; @endphp @if (Auth::user()->entity->is_barang) @endif @endforeach @php if (old('ppn-checked') == 'ppn') { $ppn = ($subtotal * $ppn_percent) / 100; } if (old('pph-checked') == 'pph') { $pph = ($subtotal * $pph_percent) / 100; } $ppn = round($ppn); $pph = round($pph); $total = $subtotal + $ppn - $pph; @endphp @endif
Nama Item StokNama JasaHarga Satuan Jumlah Total #
@if ($index > 0) @endif
ADD

Sub Total : Rp {{ number_format($subtotal, 0, '', '.') }}
PPN : Rp {{ number_format($ppn, 0, '', '.') }}
PPH : Rp {{ number_format($pph, 0, '', '.') }}

Total : Rp {{ number_format($total, 0, '', '.') }}
@if (Auth::user()->entity->is_jasa)
Tambah karyawan untuk menentukan siapa yang akan mengerjakannya. Maks. 4 Orang
@if (@$errors->has('employee_id'))
@foreach ($errors->get('employee_id') as $message)
 {{ ucfirst($message) }}
@endforeach
@endif
@php $old = old('employee'); $count_employee = 0; @endphp @if (!empty($old)) @foreach ($old['id'] as $index => $i) @php $count_employee++; @endphp @endforeach @endif
Nama NIP Jabatan #
ADD
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush