%PDF- %PDF-
Direktori : /var/www/pjc/resources/views/gestioneOre/ |
Current File : /var/www/pjc/resources/views/gestioneOre/vcommessa.blade.php |
<?php use App\Utility; ?> @extends('layouts.main') @section('content') <!-- START BREADCRUMB --> <ul class="breadcrumb"> <li><a href="">Home</a></li> <li> Commessa</li> <li class="active"> {{ $dati['id']}} </li> </ul> <!-- END BREADCRUMB --> <div class="row"> <div class="col-md-12"> @if (Session::has('message')) <div class="alert alert-success" role="alert"> <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> {{{ Session::get('message') }}}. </div> @endif <!-- <div class="row"> <div class="col-md-6"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Andamento Ore</h3> </div> <div class="panel-body"> <div id="morris-line-example" style="height: 300px;"></div> </div> </div> </div> <div class="col-md-3"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Ore per Settore</h3> </div> <div class="panel-body"> <div id="morris-donut-example" style="height: 300px;"></div> </div> </div> </div> </div> --> <div class="panel panel-colorful"> <div class="panel-heading ui-draggable-handle"> <h1 class="panel-title">Ore Commessa ({{ $dati['totOreDo']}} h / {{ Utility::totOre($commessa[0]->importo_c, '62.5') }} h) </h1> </div> <div class="row"> <div class="col-md-12"> <div class="progress-bar {{ Utility::statoPerc(Utility::percentuale($dati['totOreDo'],$dati['totOre'])) }} progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: {{ Utility::percentuale($dati['totOreDo'],$dati['totOre'])}}%"> <p class="text-left">{{ $dati['totOreDo'] }}/{{ $dati['totOre'] }} - {{ Utility::percentuale($dati['totOreDo'],$dati['totOre'])}}% </div> </div> <div> <div class="panel-body"> <div class="table-responsive"> <table class="table datatable"> <thead> <tr> <th>Data</th> <th>Utente</th> <th>Settore</th> <th>Descrizione</th> <th>Tempo</th> <th>Tempo Netto</th> <th>Azioni</th> </tr> </thead> <tbody> @foreach($dati['ore'] as $item) <tr> <td>{{ $item->data }}</td> <td>{{ $item->cognome }}</td> <td>{{ $item->settore }} </td> <td>{{ $item->descrizione }}</td> <td>{{ $item->tempo }}</td> <td>{{ $item->oreNette }}</td> <td> @if( (Session::get('idUtente') == 22) or (Session::get('idUtente') == 27)) <a href="{{ action('gestioneOre@updateOre',[$item->id])}}"><button class="btn btn-warning btn-condensed"><i class="fa fa-edit"></i></button></a> <a href="{{ action('gestioneOre@delete',[$item->id])}}"><button class="btn btn-danger btn-condensed"><i class="fa fa-trash-o"></i></button></a> @endif @if(($item->idUtente == Session::get('idUtente'))&&(Session::get('idUtente') != 22)) <a href="{{ action('gestioneOre@updateOre',[$item->id])}}"><button class="btn btn-warning btn-condensed"><i class="fa fa-edit"></i></button></a> <a href="{{ action('gestioneOre@delete',[$item->id])}}"><button class="btn btn-danger btn-condensed"><i class="fa fa-trash-o"></i></button></a> @endif </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> @if( (Session::get('idUtente') == 22) or (Session::get('idUtente') == 27)) <div class="panel panel-colorful"> <div class="panel-heading ui-draggable-handle"> <h1 class="panel-title">Movimenti Amministrativi</h1> </div> <div class="row"> <div class="row"> <div class="col-md-3"> <button class="btn btn-primary" data-toggle="modal" data-target="#acconto">Registra Acconto</button> <button class="btn btn-primary" data-toggle="modal" data-target="#saldo">Registra Saldo</button> </div> <div class="col-md-2"> <b>Stato:</b><br> {{ $dati['stato'][$dati['commessa'][0]->status]}} </div> <div class="col-md-2"> <b>Pagamento:</b><br> {{ $dati['commessa'][0]->tipoPagamento}} </div> <div class="col-md-2"> <b>Totale Commessa:</b><br> € {{ number_format( $commessa[0]->importo_c, 2, ',', '.') }} </div> <div class="col-md-2"> <b>Saldo:</b><br> € {{ number_format( $commessa[0]->importo_c - $dati['dato'] , 2, ',', '.') }} </div> </div> <div> <div class="panel-body"> <div class="table-responsive"> <table class="table datatable"> <thead> <tr> <th>Data</th> <th>Tipologia</th> <th>Importo</th> <th>Tipologia di Pagamento</th> <th>Fatturata?</th> <th>Azioni</th> </tr> </thead> <tbody> @foreach($dati['movimenti'] as $item) <tr> <td>{{ $item->data }}</td> <td>{{ $dati['tipologia'][$item->tipologia] }}</td> <td>€ {{ number_format($item->importo, 2, ',', '.') }} </td> <td>{{ strtoupper($item->pagamento) }}</td> <td> @if($item->fatturato) <i class="fa fa-check text-success"></i> @else <i class="fa fa-times text-danger"></i> @endif </td> <td> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> <div class="modal" id="acconto" tabindex="-1" role="dialog" aria-labelledby="defModalHead"> <div class="modal-dialog"> {{ Form::open(array('url' => 'gestioneore/addmovimento/', 'class' => 'form-horizontal')) }} <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="defModalHead">Richiesta Acconto</h4> </div> <div class="modal-body"> <div class="panel-body form-group-separated"> <div class="form-group"> <label class="col-md-3 col-xs-12 control-label">Importo</label> <div class="col-md-6 col-xs-12"> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-eur"></i></span> <input name="importo" type="text" class="form-control" required value="{{ number_format( $commessa[0]->importo_c - $dati['dato'] , 2, ',', '.') }}"> </div> <span class="help-block">Importo</span> </div> </div> <div class="form-group"> <label class="col-md-3 col-xs-12 control-label">Tipo di pagamento</label> <div class="col-md-6 col-xs-12"> <div class="input-group"> <span class="input-group-addon"><span class="fa fa-cogs"></span></span> <input name="pagamento" type="text" class="form-control" value="{{ $dati['commessa'][0]->tipoPagamento}}"> </div> <span class="help-block">Tipo di pagamento</span> </div> </div> <div class="form-group"> <label class="col-md-3 col-xs-12 control-label">Data </label> <div class="col-md-6 col-xs-12"> <div class="input-group"> <span class="input-group-addon"><span class="fa fa-calendar"></span></span> <input name="data" type="text" class="form-control datepicker" value=""> </div> <span class="help-block">Inserisci la data di fatturazione</span> </div> </div> </div> </div> <div class="modal-footer"> <input type="submit" class="btn btn-primary" value="Salva"> </div> <input type="hidden" name="commessa" value="{{ $commessa[0]->name }}"> <input type="hidden" name="fatturato" value="1"> <input type="hidden" name="tipologia" value="2"> {{ Form::close() }} </div> </div> </div> <div class="modal" id="saldo" tabindex="-1" role="dialog" aria-labelledby="defModalHead"> <div class="modal-dialog"> {{ Form::open(array('url' => 'gestioneore/addmovimento/', 'class' => 'form-horizontal')) }} <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="defModalHead">Richiesta di Saldo</h4> </div> <div class="modal-body"> <div class="panel-body form-group-separated"> <div class="form-group"> <label class="col-md-3 col-xs-12 control-label">Importo</label> <div class="col-md-6 col-xs-12"> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-eur"></i></span> <input name="importo" type="text" class="form-control" required value="{{ number_format( $commessa[0]->importo_c - $dati['dato'] , 2, ',', '.') }}"> </div> <span class="help-block">Importo</span> </div> </div> <div class="form-group"> <label class="col-md-3 col-xs-12 control-label">Tipo di pagamento</label> <div class="col-md-6 col-xs-12"> <div class="input-group"> <span class="input-group-addon"><span class="fa fa-cogs"></span></span> <input name="pagamento" type="text" class="form-control" value="{{ $dati['commessa'][0]->tipoPagamento}}"> </div> <span class="help-block">Tipo di pagamento</span> </div> </div> <div class="form-group"> <label class="col-md-3 col-xs-12 control-label">Data </label> <div class="col-md-6 col-xs-12"> <div class="input-group"> <span class="input-group-addon"><span class="fa fa-calendar"></span></span> <input name="data" type="text" class="form-control datepicker" value=""> </div> <span class="help-block">Inserisci la data di fatturazione</span> </div> </div> </div> </div> <div class="modal-footer"> <input type="submit" class="btn btn-primary" value="Salva"> </div> <input type="hidden" name="commessa" value="{{ $commessa[0]->name }}"> <input type="hidden" name="fatturato" value="1"> <input type="hidden" name="tipologia" value="1"> {{ Form::close() }} </div> </div> </div> @endif @stop