@extends('layouts.master') @section('title') Mise à jour d'un Creancier @stop @section('content')
@if ($errors) @foreach ($errors->all() as $error)
{!! $error !!}
@endforeach @endif

Mise à jour du Creancier {!! str_pad($creancier->id, 6, "0", STR_PAD_LEFT) !!}

{!! Form::model($creancier, ['creancier' => 'form' , 'url' => '/tiers/creanciers/' . $creancier->id, 'method' => 'PUT', 'class' => 'form-horizontal']) !!} {!! Form::hidden('mode_frame',(isset($mandat)?true:false),['id'=>'mode_frame']); !!}
{!! Form::label('num_creancier', 'N°Créancier') !!} {!! Form::text('num_creancier', $creancier->num_creancier, ['placeholder' => "Numéro de créancier", 'class' => 'form-control']) !!}
{!! Form::label('nom', 'Nom') !!} {!! Form::text('nom', $creancier->nom, ['placeholder' => "Nom", 'class' => 'form-control']) !!}
{!! Form::label('prenom', 'Prénom') !!} {!! Form::text('prenom', $creancier->prenom, ['placeholder' => "Prénom", 'class' => 'form-control']) !!}
{!! Form::label('datenaiss', 'Date de naissance') !!}
{!! Form::text('datenaiss', $creancier->datenaiss, ['placeholder' => 'Date', 'class' => 'form-control']) !!}
{!! Form::label('idmandat', 'N°mandat') !!} {!! Form::text('idmandat', (isset($mandat)?$mandat->id:null), ['placeholder' => "Numéro de mandat", isset($mandat)?'readonly':'','class' => 'form-control']) !!}
{!! Form::label('idimp_mdt', 'N°Imputation') !!} {!! Form::select( 'idimp_mdt', $imputations, $creancier->idimp_mdt, ['id'=>'typepmt','class' => 'selectpicker','data-width' => "100%"] ) !!}
{!! Form::label('bqcle_creancier', 'Banque') !!} {!! Form::select( 'bqcle_creancier', array(""=>" ")+DB::table('banques')->orderby(db::raw("nom"))->pluck(db::raw("CONCAT(id,' ',nom) as nom"), 'id')->toArray(), $creancier->bqcle_creancier, ['id'=>'bqcle_creancier', 'class' => 'selectpicker', 'data-width' => "100%" ]) !!}
{!! Form::label('compte', 'Compte') !!} {!! Form::text('compte', $creancier->compte, ['placeholder' => "Compte", 'class' => 'form-control']) !!}
{!! Form::label('montant', 'Montant') !!} {!! Form::text('montant', $creancier->montant, ['placeholder' => "Montant", 'class' => 'form-control']) !!}
{!! Form::label('typepmt', 'Type de paiement') !!} {!! Form::select( 'typepmt', ['BAN'=>'Banque','ESP' => 'Espèces','CHQ' => 'Chèque','TRE' => 'Trésor'], $creancier->typepmt, ['class' => 'selectpicker','data-width' => "100%"] ) !!}
{!! Form::label('obs', 'Observations') !!} {!! Form::textarea('obs', null, ['placeholder' => 'Observations', 'class' => 'form-control', 'rows'=>'2']) !!}

{!! Form::submit('Enregistrer les modifications', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@stop