@extends('layouts.main') @push('styles') @endpush @section('content')
| {{ __('payments.item') }} | {{ __('payments.vendor') }} | {{ __('payments.quantity') }} | {{ __('payments.staff') }} | {{ __('payments.date') }} | {{ __('payments.unit_cost') }} | {{ __('payments.amount') }} |
|---|---|---|---|---|---|---|
|
@php
$bill = \Streamline\Models\HospitalBill::find($item->bill_id);
$items = explode(',', $bill->item_ids);
$quantities = explode(',', $bill->item_quantities);
@endphp
@if($bill->bill_type == 'DRU')
@for($x = 0; $x < count($items); $x++)
{{ get_name($items[$x], 'id', 'name', 'drugs') }} @endfor @elseif($bill->bill_type == 'SUN') @for($x = 0; $x < count($items); $x++) {{ get_name($items[$x], 'id', 'name', 'sundries') }} @endfor @elseif($bill->bill_type == 'DEN') @for($x = 0; $x < count($items); $x++) {{ get_name($items[$x], 'id', 'name', 'dentals') }} @endfor @elseif($bill->bill_type == 'RAD') @for($x = 0; $x < count($items); $x++) {{ get_name($items[$x], 'id', 'name', 'radiologies') }} @endfor @elseif($bill->bill_type == 'LAB') @for($x = 0; $x < count($items); $x++) {{ get_name($items[$x], 'id', 'name', 'labs') }} @endfor @elseif($bill->bill_type == 'GEN') @for($x = 0; $x < count($items); $x++) {{ get_name($items[$x], 'id', 'name', 'general_items') }} @endfor @elseif($bill->bill_type == 'PAY') @for($x = 0; $x < count($items); $x++) {{ get_name($items[$x], 'id', 'name', 'payment_items') }} @endfor @endif |
{{ get_name($item->vendor, 'id', 'name', 'suppliers') }} | {{ get_full_name($item->created_by, 'id', 'first_name', 'last_name', 'users') }} | {{ streamline_date_time_short($item->created_at) }} |
@for($x = 0; $x < count($items); $x++)
{{ $quantities[$x]." units" }} @endfor |
@if($bill->bill_type == 'DRU')
@for($x = 0; $x < count($items); $x++)
{{ ugandan_shillings(get_name($items[$x], 'id', 'cost_price', 'drugs')) }} @endfor @elseif($bill->bill_type == 'SUN') @for($x = 0; $x < count($items); $x++) {{ ugandan_shillings(get_name($items[$x], 'id', 'cost_price', 'sundries')) }} @endfor @elseif($bill->bill_type == 'DEN') @for($x = 0; $x < count($items); $x++) {{ ugandan_shillings(get_name($items[$x], 'id', 'cost_price', 'dentals')) }} @endfor @elseif($bill->bill_type == 'RAD') @for($x = 0; $x < count($items); $x++) {{ ugandan_shillings(get_name($items[$x], 'id', 'cost_price', 'radiologies')) }} @endfor @elseif($bill->bill_type == 'LAB') @for($x = 0; $x < count($items); $x++) {{ ugandan_shillings(get_name($items[$x], 'id', 'cost_price', 'labs')) }} @endfor @elseif($bill->bill_type == 'GEN') @for($x = 0; $x < count($items); $x++) {{ ugandan_shillings(get_name($items[$x], 'id', 'unit_cost', 'general_items')) }} @endfor @elseif($bill->bill_type == 'PAY') @for($x = 0; $x < count($items); $x++) {{ ugandan_shillings(get_name($items[$x], 'id', 'unit_cost', 'payment_items')) }} @endfor @endif |
{{ ugandan_shillings($item->amount) }} |
| {{ __('payments.total') }} | {{ ugandan_shillings($total) }} |
|
{{ __('payments.item') }}
{{ __('payments.quantity') }}
{{ __('payments.unit_cost') }}
{{ __('payments.amount') }}
{{ __('payments.expense_account') }}
{{ __('payments.payable_account') }}
{{ __('payments.action') }}
|
|---|
|
{{ Form::select('item_id[]', $payment_items, $items[$i], ['class' => 'form-control compulsory', 'id'=>"item_$i"]) }}
{{ Form::number('quantity[]', (is_null($item_quantity[$i]) ? 1 : $item_quantity[$i]), ['class' => 'form-control compulsory qty', 'id'=>"quantity_$i"]) }}
{{ Form::number('unit_cost[]', ($item_subtotals[$i] / $item_quantity[$i]), ['class' => 'form-control compulsory unit_cost', 'id'=>"unit_cost_$i"]) }}
{{ Form::number('amount[]', $item_subtotals[$i], ['class' => 'form-control amount', 'id'=>"amount_$i"]) }}
{{ Form::text('expense_acc_name[]', isset($chart_of_accounts[$expense_accounts[$i]]) ? $chart_of_accounts[$expense_accounts[$i]] : '', ['class' => 'form-control', 'id'=>"expense_acc_name_$i", 'readonly']) }}
{{ Form::text('payable_acc_name[]', $chart_of_accounts[$payable_accounts[$i]], ['class' => 'form-control', 'id'=>"payable_acc_name_$i", 'readonly']) }}
@if($i == 0)
@else
@endif
|