
 
<?php $__env->startSection('title'); ?> Mise à jour d'un Creancier <?php $__env->stopSection(); ?>
 
<?php $__env->startSection('content'); ?>
 
<div class="col-lg-max col-lg-offset-1">
 
    <?php if($errors): ?>
        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class='bg-danger alert'><?php echo $error; ?></div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php endif; ?>
 
    <h2><i class='fa fa-banque'></i> Mise à jour du Creancier <?php echo str_pad($creancier->id, 6, "0", STR_PAD_LEFT); ?></h2>
 
    <?php echo Form::model($creancier, ['creancier' => 'form'
        , 'url' => '/tiers/creanciers/' . $creancier->id, 'method' => 'PUT', 'class' => 'form-horizontal']); ?>

    <?php echo Form::hidden('mode_frame',(isset($mandat)?true:false),['id'=>'mode_frame']); ?>


    <div class="form-group">
        <div class="col-xs-2">
            <?php echo Form::label('num_creancier', 'N°Créancier'); ?>

            <?php echo Form::text('num_creancier', $creancier->num_creancier, ['placeholder' => "Numéro de créancier", 'class' => 'form-control']); ?>

        </div>

        <div class="col-xs-4">
            <?php echo Form::label('nom', 'Nom'); ?>

            <?php echo Form::text('nom', $creancier->nom, ['placeholder' => "Nom", 'class' => 'form-control']); ?>

        </div>

        <div class="col-xs-2">
            <?php echo Form::label('prenom', 'Prénom'); ?>

            <?php echo Form::text('prenom', $creancier->prenom, ['placeholder' => "Prénom", 'class' => 'form-control']); ?>

        </div>

        <div class="col-xs-3">
            <?php echo Form::label('datenaiss', 'Date de naissance'); ?>

            <div class='input-group date' id='datepicker_datenaiss'>
                <?php echo Form::text('datenaiss', $creancier->datenaiss, ['placeholder' => 'Date', 'class' => 'form-control']); ?>

                <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
                <script type="text/javascript">
                    $(function () {
                        $('#datepicker_datenaiss').datepicker({
                            format: "dd/mm/yyyy",
                            language: "fr",
                            autoclose: true
                        });
                    });
                </script>
            </div>
        </div>
    </div>



    <div class="form-group">
        <div class="col-xs-2">
            <?php echo Form::label('idmandat', 'N°mandat'); ?>

            <?php echo Form::text('idmandat', (isset($mandat)?$mandat->id:null), 
            ['placeholder' => "Numéro de mandat", isset($mandat)?'readonly':'','class' => 'form-control']); ?>

        </div>
        <div class="col-xs-8">
            <?php echo Form::label('idimp_mdt', 'N°Imputation'); ?>

            <?php echo Form::select(
                'idimp_mdt',
                $imputations,
                $creancier->idimp_mdt,
                ['id'=>'typepmt','class' => 'selectpicker','data-width' => "100%"]
            ); ?>

        </div>
    </div>


    <div class="form-group">
        <div class="col-xs-4">
            <?php echo Form::label('bqcle_creancier', 'Banque'); ?>

            <?php echo 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%"
                ]); ?>

        </div>
        <div class="col-xs-3">
            <?php echo Form::label('compte', 'Compte'); ?>

            <?php echo Form::text('compte', $creancier->compte, ['placeholder' => "Compte", 'class' => 'form-control']); ?>

        </div>
        <div class="col-xs-2">
            <?php echo Form::label('montant', 'Montant'); ?>

            <?php echo Form::text('montant', $creancier->montant, ['placeholder' => "Montant", 'class' => 'form-control']); ?>

        </div>
        <div class="col-xs-2">
            <?php echo Form::label('typepmt', 'Type de paiement'); ?>

            <?php echo Form::select(
                'typepmt',
                ['BAN'=>'Banque','ESP' => 'Espèces','CHQ' => 'Chèque','TRE' => 'Trésor'],
                $creancier->typepmt,
                ['class' => 'selectpicker','data-width' => "100%"]
            ); ?>

        </div>
    </div>


    <div class='form-group'>
        <div class="col-xs-8">
        <?php echo Form::label('obs', 'Observations'); ?>

        <?php echo Form::textarea('obs', null, ['placeholder' => 'Observations', 'class' => 'form-control', 'rows'=>'2']); ?>

        </div>
    </div>


    <div class="col-sm-9">
        <div class='form-group'><br/>
            <?php echo Form::submit('Enregistrer les modifications', ['class' => 'btn btn-primary']); ?>

        </div>
    </div>
    <?php echo Form::close(); ?>

</div>
 

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre\resources\views/tiers/creanciers/edit.blade.php ENDPATH**/ ?>