<?php $__env->startSection('content'); ?>

<section class="content-header">
                <h1>Intervento</h1>
                <ol class="breadcrumb">
                    <li>
                        <a href="<?php echo e(route('home')); ?>">
                            <i class="livicon" data-name="home" data-size="14" data-color="#000"></i>
                            Home
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo e(URL::to('admin/intervento')); ?>">
                            Intervento
                        </a>
                    </li>
                    <li class="active">Modifica</li>
                </ol>
            </section>
            <section class="content">

<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">

    <?php if(count($errors->all()) > 0): ?>
        <div class="alert alert-danger" role="alert">
            <p><b>OOOPS!</b></p>
            <ul>
                <?php foreach($errors->all() as $e): ?>
                <li><?php echo e($e); ?></li>
                <?php endforeach; ?>
            </ul>
        </div>
    <?php endif; ?>

    <?php echo Form::model($datiRecuperati, 
        ['method' => 'put', 'url' =>'admin/intervento/'. $datiRecuperati['id'], "class" => "form-horizontal" ]); ?>


    <div class="form-group">
        <?php echo Form::submit('Aggiorna', ['class' => 'btn btn-success']); ?>

        <a class="btn btn-default" href="<?php echo e(URL::to('admin/intervento')); ?>"><span class="glyphicon glyphicon-ban-circle"></span> Annulla</a>
    </div>
    
    <?php echo $__env->make('admin.intervento.form', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

    <div class="form-group">
        <?php echo Form::submit('Aggiorna', ['class' => 'btn btn-success']); ?>

        <a class="btn btn-default" href="<?php echo e(URL::to('admin/intervento')); ?>"><span class="glyphicon glyphicon-ban-circle"></span> Annulla</a>
    </div>
    
    <?php echo Form::close(); ?>

    
</div>
                
            </section>
 <?php $__env->stopSection(); ?>
 
 
 
 <?php /* page level scripts */ ?>
<?php $__env->startSection('footer_scripts'); ?>

    <!-- page level js starts-->
 <script>
  $(function() {
      $('.money').change( function() {
          var importo_ticket;
          var spesa_tecnico;
          var margine_ticket;
          
          importo_ticket = parseFloat($('#importo_ticket').val());
          spesa_tecnico = parseFloat($('#spesa_tecnico').val());
          
          margine_ticket = importo_ticket - spesa_tecnico;
          
          //---Formatto
          importo_ticket = importo_ticket.toFixed(2);
          spesa_tecnico = spesa_tecnico.toFixed(2);
          margine_ticket = margine_ticket.toFixed(2);
          
          $('#importo_ticket').val(importo_ticket);
          $('#spesa_tecnico').val(spesa_tecnico);
          $('#margine_ticket').val(margine_ticket);
      });
  });
</script>
    <!--page level js ends-->
    
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>