@php use App\Http\Controllers\Mod\ModSalesOrderCommissionParticipation;use App\Http\Controllers\ModFinancial;use App\Models\Profile;use Illuminate\Support\Facades\Crypt; $profile= Profile::user(); $id_hide = isset($id_hide)?$id_hide:null; $value_participation_result=0; $search = 1; $operator = isset($operator)?$operator:'-1'; $value_sum_total=0; @endphp @include('system-layouts.head')

Parceiro de negocios

{{-- / @include('mod-fin-commission-participation.formany-select')--}}
{{--
--}} {{-- --}} {{--
--}}
{{--
Lista todos os registro 2
--}}
@foreach($record_participation as $row ) @php $record_participation = ModSalesOrderCommissionParticipation::informationView([ 'idSalesOrderStatus'=>'3,9', // 9-Pedido concluido| quando os status instalacao e financeiro estiverem ok; 3-Pendente 'idSalesOrderProposalStatus'=>'5', // Conformação do aceite do cliente pelo VENDEDOR //'dateRange' => $date_range_edit, //'dateRangeName' => 'clientAcceptedDate,sellerDate', //'salesOrderValue'=>'0', //'salesOrderValueOperator'=>$operator, 'idUserParticipation'=> $row->idPartner, 'idStatusFinDebtPartner'=>11, //11-APAGAR; 12 - NÃO PAGAR //'idStatusFinDebtPaySeller'=>1, //lista somente quando o Vendedor foi PAGO 'idStatusReg'=>1, 'optionList'=>'g', 'optionListQtt'=>'a', ]); $value_sum=0; $value_participation_sum=0; $value_participation_sum_npg = 0; @endphp {{-- ANALIZAR VALORES DOS PARTICIPANTES --}} @foreach($record_participation as $row_participation) @php //SOMA DO VALOR DA PROPOSTA $value_sum += $row_participation->xValue; //SOMA DO VALOR DO PARCEIRO DA PROPOSTA $value_participation_sum=ModFinancial::porcentagem($value_sum,$row->finPercentage); @endphp @endforeach @if($row->idUserAttr >= 1) @php $profile_select = Profile::user($row->idUserAttr); $user_name = isset($profile_select->userName)?$profile_select->userName:null; @endphp @endif @if($value_participation_sum > $operator) {{-- TEM PROPOSTA --}} @endif @php $value_participation_result += $value_participation_sum;@endphp @endforeach
Indicação
participante no comissionamento da venda
Qtdd Valor Valor/Parceiro
ID: {{$row->idPartner}} | {{ $row->xName }}
| %: {{ ModFinancial::formatMoney($row->finPercentage,'pt_BR') }} | PIX: {{ $row->finPix }}
{{count($record_participation)}} {{-- --}} {{-- {{$parti_n}}--}} {{-- --}}
R$ @php $value_sum_total +=$value_sum; @endphp {{ModFinancial::formatMoney($value_sum,'pt_BR')}}
{{--
--}} {{-- --}} {{-- R$--}} {{-- {{ModFinancial::formatMoney($value_participation_sum_npg,'pt_BR')}}--}} {{-- --}} {{--
--}}
R$ {{ModFinancial::formatMoney($value_participation_sum,'pt_BR')}}

Resultado:

R$ {{ModFinancial::formatMoney($value_sum_total,'pt_BR')}}

R$ {{ModFinancial::formatMoney($value_participation_result,'pt_BR')}}

?
@include('system-layouts.layout-footer')