Create Transaction

@if($marketplace_transaction)
Invoice No : {{ $marketplace_transaction->invoice_no }}
@endif
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if (Session::has('success'))
{{ Session::get('success') }}
@endif
{{ csrf_field() }}
@php $invoice_no = old('invoice_no'); $buyer = old('buyer'); $invoice_no = old('invoice_no'); $due_date = old('due_date'); $due_date_custom = old('custom_value'); $npwp = old('npwp_value'); $nik = old('nik_value'); $nama_tanda_tangan = old('nama_tanda_tangan'); if($marketplace_transaction) { $buyer = $marketplace_transaction->buyer_name; $invoice_no = $marketplace_transaction->invoice_no; $due_date = $marketplace_transaction->due_date; $due_date_custom = $marketplace_transaction->due_date; $npwp = $marketplace_transaction->npwp; $nik = $marketplace_transaction->nik; $nama_tanda_tangan = $marketplace_transaction->sign_name; } @endphp
{{--
--}}
              
    
    
{{--
--}}
@if($marketplace_transaction) @php $data_information = $marketplace_transaction->item()->whereNull('parent_id')->get()->map(function($row) { return [ 'total_buying_price' => json_decode($row->total_data_information, true)['total_buying_price'], 'total_selling_price' => $row->total_selling_price, ]; })->pipe(function($row) { return collect([ 'grandtotal_buying_price' => $row->sum('total_buying_price'), 'grandtotal_selling_price' => $row->sum('total_selling_price'), ]); }); $sum_cost = 0; if($marketplace_transaction->cost_all) { foreach(json_decode($marketplace_transaction->cost_all, true) as $key => $cost) { $sum_cost += $cost[key($cost)]; } } $total_different = ($data_information['grandtotal_selling_price'] - $data_information['grandtotal_buying_price']) - $sum_cost; @endphp

Summary

@php $total_buying_price = $total_selling_price = 0; @endphp @forelse($marketplace_transaction->item()->whereNull('parent_id')->get() as $no => $item) @php $data_information = json_decode($item->total_data_information, true); $total_buying_price += $data_information['total_buying_price']; $total_selling_price += $item->total_selling_price; @endphp @empty @endforelse @if($marketplace_transaction->item()->whereNull('parent_id')->count() > 0) {{-- --}} @php $total_additional_fee = 0; @endphp @if($marketplace_transaction->additional_fee) @foreach(json_decode($marketplace_transaction->additional_fee, true) as $label => $fee) @php $total_additional_fee += $fee; @endphp @endforeach {{-- --}} @endif @endif
Select Brand Certificate Quantity Total Weight (Gram) Seller Total Buying Price (Rp) Total Selling Price (Rp) Detail
{{ $item->resell_item->item_brand->brand_name == 'Jewelry Other' ? 'LM Other' : $item->resell_item->item_brand->brand_name }}
{{ $item->resell_item->weight }} Gram
  • {{ $item->resell_item->plu }}
  • @foreach($item->item_group as $item_group)
  • {{ $item_group->resell_item->plu }}
  • @endforeach
{{ $data_information['total_qty'] }} {{ $data_information['total_weight'] }} {{ $item->resell_item->invoice->standby_user->name }} {{ number_format($data_information['total_buying_price']) }}
{{ number_format($item->total_selling_price) }} |
Detail
Data not found
TOTAL{{ number_format($total_buying_price) }}{{ number_format($total_selling_price) }}
{{ ucwords($label) }} {{ number_format($fee) }}
GRAND TOTAL{{ number_format($marketplace_transaction->grand_total) }}
@if($marketplace_transaction->item()->whereNull('parent_id')->count() > 0)    Create Invoice   @endif
@endif