@if($mode!="create")
{!! html()->text('num_creancier', ($mode!="show")?str_pad($creancier->num_creancier, 5, "0", STR_PAD_LEFT):$creancier->num_creancier) ->placeholder("Numéro de créancier") ->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control']) !!}
@endif
{!! html()->label('Nom','nom') !!} {!! html()->text('nom', null)->placeholder("Nom") ->attributes([($mode=="show"?'disabled':''), 'class' => 'identifiants form-control']) !!}
{!! html()->label('Prénom','prenom') !!} {!! html()->text('prenom', null)->placeholder("Prénom") ->attributes([($mode=="show"?'disabled':''), 'class' => 'identifiants form-control']) !!}
{!! html()->label( 'Date de naissance','datepicker_datenaiss') !!}
{!! html()->text('datenaiss', null) ->placeholder('Date')->attributes([($mode=="show"?'disabled':''),'class' => 'form-control']) !!}
{!! html()->label( 'N°mandat','idmandat') !!} {!! html()->text('idmandat', (isset($mandat->id)?$mandat->id:null)) ->placeholder("Numéro de mandat") ->attributes([( ($mode=="edit") && (!isset($frame) || !$frame) )?'':'readonly', 'class' => 'form-control']) !!}
{!! html()->label( 'N°Imputation','idimp_mdt') !!} {!! html()->select('idimp_mdt',$imputations,null) ->placeholder('A définir') ->attributes([($mode=="show"?'disabled':''),'class' => 'form-control']) !!}
{!! html()->label( 'Banque','bqcle_creancier') !!} {!! html()->select('bqcle_creancier',DB::table('banques')->where('active','=','1')->orderby('nom','ASC')->pluck(db::raw("CONCAT(nom,' (',id,')') as nom"), 'id')->toArray(),null) ->placeholder('A définir') ->attributes([($mode=="show"?'disabled':''),'class' => 'form-control']) !!}
{!! html()->label( 'Compte','compte') !!} {!! html()->text('compte', null)->placeholder("Compte")->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control']) !!}
{!! html()->label( 'Montant','montant') !!} {!! html()->text('montant', null)->placeholder("Montant")->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control']) !!}
{!! html()->label( 'Type de paiement','typepmt') !!} {!! html()->select('typepmt',['BAN'=>'Banque','ESP' => 'Espèces','CHQ' => 'Chèque','TRE' => 'Trésor'],null) ->placeholder('A définir') ->attributes([($mode=="show"?'disabled':''),'class' => 'form-control']) !!}
{!! html()->label( 'Observations','obs') !!} {!! html()->textarea('obs', null)->placeholder('Observations') ->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control', 'rows'=>'2']) !!}
@if(isset($frame) && $frame)
@if($mode=="show") @if($user->hasRole("ADMINISTRATEUR") || $user->can("CRE_MAJ")) @if(!$frame) Modifier @endif @endif @else {!! html()->button('Enregistrer')->value('Enregistrer')->type('submit')->attributes(['class' => 'btn btn-primary']) !!} @endif @if(!$frame) Retour @endif
@else @if( ($mode=="show")&& (isset($mandat->id)) && ($creancier->IsModifiable && ($user->hasRole("ADMINISTRATEUR") || $user->can("CRE_MAJ"))) ) Modifier @endif @endif