Browse Source

Correction bug date de dernière connexion

prodstable
keun 7 years ago
parent
commit
a801f9f06e
20 changed files with 293 additions and 181 deletions
  1. +2
    -13
      backend/controllers/BackendController.php
  2. +1
    -1
      backend/controllers/PaiementController.php
  3. +4
    -1
      backend/controllers/SiteController.php
  4. +12
    -3
      backend/views/site/index.php
  5. BIN
      backend/web/.sass-cache/c8fef7d48da4dc7f024edc2b0fada9d8d6de5dac/screen.scssc
  6. +175
    -146
      backend/web/css/screen.css
  7. +32
    -1
      backend/web/sass/screen.scss
  8. +22
    -0
      common/controllers/CommonController.php
  9. +6
    -13
      common/models/Commande.php
  10. +5
    -0
      common/models/User.php
  11. +3
    -0
      environments/demo/backend/web/index.php
  12. +3
    -0
      environments/demo/frontend/web/index.php
  13. +1
    -0
      environments/dev/backend/web/index.php
  14. +1
    -0
      environments/dev/frontend/web/index.php
  15. +3
    -0
      environments/prod/backend/web/index.php
  16. +3
    -0
      environments/prod/frontend/web/index.php
  17. +2
    -1
      frontend/controllers/CommandeController.php
  18. +14
    -0
      frontend/controllers/FrontendController.php
  19. +2
    -1
      frontend/controllers/SiteController.php
  20. +2
    -1
      frontend/controllers/UserController.php

+ 2
- 13
backend/controllers/BackendController.php View File

namespace backend\controllers; namespace backend\controllers;


use yii ; use yii ;
use common\models\Etablissement ;
use common\controllers\CommonController ;


class BackendController extends \yii\web\Controller
class BackendController extends CommonController
{ {
public function beforeAction($event)
{
if(!Yii::$app->user->isGuest &&
(Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_ESSAI_TERMINE ||
Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_RETARD))
{
$this->redirect(['paiement/index']) ;
}
return parent::beforeAction($event);
}
} }



+ 1
- 1
backend/controllers/PaiementController.php View File

/** /**
* ProduitController implements the CRUD actions for Produit model. * ProduitController implements the CRUD actions for Produit model.
*/ */
class PaiementController extends Controller
class PaiementController extends BackendController
{ {
var $enableCsrfValidation = false ; var $enableCsrfValidation = false ;

+ 4
- 1
backend/controllers/SiteController.php View File

// dernières commandes // dernières commandes
$commandes = Commande::findBy([ $commandes = Commande::findBy([
'type' => Commande::TYPE_USER,
'orderby' => 'date DESC', 'orderby' => 'date DESC',
'limit' => 15
'limit' => 15,
'condition' => 'commande.date > \''.date('Y-m-d 00:00:00').'\''
]) ; ]) ;
foreach($commandes as $c) foreach($commandes as $c)
$c->init() ; $c->init() ;

+ 12
- 3
backend/views/site/index.php View File

<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">
Dernières commandes
Dernières commandes clients
</h3> </h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<tbody> <tbody>
<?php foreach($commandes as $c): ?> <?php foreach($commandes as $c): ?>
<tr> <tr>
<td><?= date('d/m/Y', strtotime($c->production->date)) ?></td>
<td><?= $c->getStrUser(); ?></td>
<td class="date">
<div class="bloc-date">
<div class="jour"><?= strftime('%A', strtotime($c->production->date)) ?></div>
<div class="num"><?= date('d', strtotime($c->production->date)) ?></div>
<div class="mois"><?= strftime('%B', strtotime($c->production->date)) ?></div>
</div>
</td>
<td>
<?= $c->getStrUser(); ?><br />
<span class="small">Le <?= date('d/m/Y à G\hi', strtotime($c->date)) ?></span>
</td>
<td><?= $c->getResumePanier() ; ?></td> <td><?= $c->getResumePanier() ; ?></td>
<td><?= $c->getResumePointVente() ; ?></td> <td><?= $c->getResumePointVente() ; ?></td>
<td><?= $c->getStrMontant() ; ?></td> <td><?= $c->getStrMontant() ; ?></td>

BIN
backend/web/.sass-cache/c8fef7d48da4dc7f024edc2b0fada9d8d6de5dac/screen.scssc View File


+ 175
- 146
backend/web/css/screen.css View File

margin-left: 5px; margin-left: 5px;
} }
/* line 287, ../sass/screen.scss */ /* line 287, ../sass/screen.scss */
.site-index #dernieres-commandes .localite {
.site-index #dernieres-commandes .small, .site-index #dernieres-commandes .localite {
font-size: 12px; font-size: 12px;
color: gray; color: gray;
} }
.site-index #dernieres-commandes .commentaire { .site-index #dernieres-commandes .commentaire {
font-size: 12px; font-size: 12px;
} }
/* line 297, ../sass/screen.scss */
/* line 295, ../sass/screen.scss */
.site-index #dernieres-commandes .date {
text-align: center;
}
/* line 298, ../sass/screen.scss */
.site-index #dernieres-commandes .date .bloc-date {
width: 50%;
margin: 0px auto;
padding-top: 0px;
}
/* line 306, ../sass/screen.scss */
.site-index #dernieres-commandes .date .jour {
text-transform: capitalize;
line-height: 13px;
font-size: 10px;
text-transform: uppercase;
}
/* line 313, ../sass/screen.scss */
.site-index #dernieres-commandes .date .num {
font-size: 23px;
line-height: 28px;
font-weight: bold;
}
/* line 319, ../sass/screen.scss */
.site-index #dernieres-commandes .date .mois {
text-transform: uppercase;
line-height: 13px;
font-size: 15px;
}
/* line 328, ../sass/screen.scss */
.site-index #facturation h2 { .site-index #facturation h2 {
font-size: 25px; font-size: 25px;
text-align: center; text-align: center;
} }
/* line 303, ../sass/screen.scss */
/* line 334, ../sass/screen.scss */
.site-index #facturation .mois-en-cours .montant span { .site-index #facturation .mois-en-cours .montant span {
background-color: white; background-color: white;
color: #333; color: #333;
border: solid 1px gray; border: solid 1px gray;
} }
/* line 310, ../sass/screen.scss */
/* line 341, ../sass/screen.scss */
.site-index #facturation .montant { .site-index #facturation .montant {
margin-top: 35px; margin-top: 35px;
text-align: center; text-align: center;
} }
/* line 313, ../sass/screen.scss */
/* line 344, ../sass/screen.scss */
.site-index #facturation .montant span { .site-index #facturation .montant span {
font-size: 22px; font-size: 22px;
color: white; color: white;
border-radius: 5px; border-radius: 5px;
} }


/* line 333, ../sass/screen.scss */
/* line 364, ../sass/screen.scss */
#page-commande h1 .btn-group { #page-commande h1 .btn-group {
float: right; float: right;
} }
/* line 338, ../sass/screen.scss */
/* line 369, ../sass/screen.scss */
#page-commande #col-left, #page-commande #col-right { #page-commande #col-left, #page-commande #col-right {
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
} }
/* line 342, ../sass/screen.scss */
/* line 373, ../sass/screen.scss */
#page-commande #col-right { #page-commande #col-right {
padding-left: 20px; padding-left: 20px;
} }
/* line 346, ../sass/screen.scss */
/* line 377, ../sass/screen.scss */
#page-commande #jours-production { #page-commande #jours-production {
display: none; display: none;
} }
/* line 352, ../sass/screen.scss */
/* line 383, ../sass/screen.scss */
#page-commande #calendar h2 { #page-commande #calendar h2 {
font-size: 20px; font-size: 20px;
position: relative; position: relative;
top: 3px; top: 3px;
} }
/* line 358, ../sass/screen.scss */
/* line 389, ../sass/screen.scss */
#page-commande #calendar .fc-header-title { #page-commande #calendar .fc-header-title {
margin-left: 10px; margin-left: 10px;
} }
/* line 364, ../sass/screen.scss */
/* line 395, ../sass/screen.scss */
#page-commande #calendar .dayWithEvent { #page-commande #calendar .dayWithEvent {
background-color: #fee48d; background-color: #fee48d;
cursor: pointer; cursor: pointer;
} }
/* line 368, ../sass/screen.scss */
/* line 399, ../sass/screen.scss */
#page-commande #calendar .fc-event-container { #page-commande #calendar .fc-event-container {
display: none; display: none;
} }
/* line 369, ../sass/screen.scss */
/* line 400, ../sass/screen.scss */
#page-commande #calendar .fc-today { #page-commande #calendar .fc-today {
border-bottom: solid 1px #C9302C; border-bottom: solid 1px #C9302C;
background-color: white; background-color: white;
} }
/* line 373, ../sass/screen.scss */
/* line 404, ../sass/screen.scss */
#page-commande #calendar .fc-today.dayWithEvent { #page-commande #calendar .fc-today.dayWithEvent {
background-color: #fee48d; background-color: #fee48d;
} }
/* line 378, ../sass/screen.scss */
/* line 409, ../sass/screen.scss */
#page-commande #calendar .fc-day { #page-commande #calendar .fc-day {
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
} }
/* line 381, ../sass/screen.scss */
/* line 412, ../sass/screen.scss */
#page-commande #calendar .fc-day:hover { #page-commande #calendar .fc-day:hover {
-moz-box-shadow: 0px 0px 2px black inset; -moz-box-shadow: 0px 0px 2px black inset;
-webkit-box-shadow: 0px 0px 2px black inset; -webkit-box-shadow: 0px 0px 2px black inset;
box-shadow: 0px 0px 2px black inset; box-shadow: 0px 0px 2px black inset;
} }
/* line 386, ../sass/screen.scss */
/* line 417, ../sass/screen.scss */
#page-commande #calendar .current-date { #page-commande #calendar .current-date {
-moz-box-shadow: 0px 0px 2px black inset; -moz-box-shadow: 0px 0px 2px black inset;
-webkit-box-shadow: 0px 0px 2px black inset; -webkit-box-shadow: 0px 0px 2px black inset;
box-shadow: 0px 0px 2px black inset; box-shadow: 0px 0px 2px black inset;
} }
/* line 390, ../sass/screen.scss */
/* line 421, ../sass/screen.scss */
#page-commande #calendar .fc-day-number { #page-commande #calendar .fc-day-number {
float: none; float: none;
padding-top: 2px; padding-top: 2px;
} }
/* line 398, ../sass/screen.scss */
/* line 429, ../sass/screen.scss */
#page-commande #bloc-production .label { #page-commande #bloc-production .label {
float: right; float: right;
font-size: 13px; font-size: 13px;
} }
/* line 403, ../sass/screen.scss */
/* line 434, ../sass/screen.scss */
#page-commande #bloc-production .btn-success { #page-commande #bloc-production .btn-success {
background-color: #5cb85c; background-color: #5cb85c;
border-color: #4cae4c; border-color: #4cae4c;
} }
/* line 408, ../sass/screen.scss */
/* line 439, ../sass/screen.scss */
#page-commande #bloc-production #productions-point-vente { #page-commande #bloc-production #productions-point-vente {
margin-top: 15px; margin-top: 15px;
padding: 10px; padding: 10px;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
border-radius: 5px; border-radius: 5px;
} }
/* line 414, ../sass/screen.scss */
/* line 445, ../sass/screen.scss */
#page-commande #bloc-production #productions-point-vente label { #page-commande #bloc-production #productions-point-vente label {
display: block; display: block;
font-weight: normal; font-weight: normal;
} }
/* line 419, ../sass/screen.scss */
/* line 450, ../sass/screen.scss */
#page-commande #bloc-production #productions-point-vente .checkbox-list { #page-commande #bloc-production #productions-point-vente .checkbox-list {
margin-left: 10px; margin-left: 10px;
margin-top: 10px; margin-top: 10px;
} }
/* line 432, ../sass/screen.scss */
/* line 463, ../sass/screen.scss */
#page-commande #produits-production .overflow table { #page-commande #produits-production .overflow table {
width: 100%; width: 100%;
} }
/* line 436, ../sass/screen.scss */
/* line 467, ../sass/screen.scss */
#page-commande #produits-production .overflow thead, #page-commande #produits-production .overflow tbody, #page-commande #produits-production .overflow tr, #page-commande #produits-production .overflow td, #page-commande #produits-production .overflow th { #page-commande #produits-production .overflow thead, #page-commande #produits-production .overflow tbody, #page-commande #produits-production .overflow tr, #page-commande #produits-production .overflow td, #page-commande #produits-production .overflow th {
display: block; display: block;
} }
/* line 438, ../sass/screen.scss */
/* line 469, ../sass/screen.scss */
#page-commande #produits-production .overflow tr:after { #page-commande #produits-production .overflow tr:after {
content: ' '; content: ' ';
display: block; display: block;
visibility: hidden; visibility: hidden;
clear: both; clear: both;
} }
/* line 445, ../sass/screen.scss */
/* line 476, ../sass/screen.scss */
#page-commande #produits-production .overflow thead th { #page-commande #produits-production .overflow thead th {
height: 30px; height: 30px;
/*text-align: left;*/ /*text-align: left;*/
} }
/* line 451, ../sass/screen.scss */
/* line 482, ../sass/screen.scss */
#page-commande #produits-production .overflow tbody { #page-commande #produits-production .overflow tbody {
height: 500px; height: 500px;
overflow-y: auto; overflow-y: auto;
} }
/* line 459, ../sass/screen.scss */
/* line 490, ../sass/screen.scss */
#page-commande #produits-production .overflow thead th { #page-commande #produits-production .overflow thead th {
width: 32%; width: 32%;
float: left; float: left;
} }
/* line 464, ../sass/screen.scss */
/* line 495, ../sass/screen.scss */
#page-commande #produits-production .overflow tbody td { #page-commande #produits-production .overflow tbody td {
width: 33%; width: 33%;
float: left; float: left;
} }
/* line 469, ../sass/screen.scss */
/* line 500, ../sass/screen.scss */
#page-commande #produits-production .overflow .td-produit { #page-commande #produits-production .overflow .td-produit {
width: 60%; width: 60%;
} }
/* line 472, ../sass/screen.scss */
/* line 503, ../sass/screen.scss */
#page-commande #produits-production .overflow .td-actif, #page-commande #produits-production .overflow .td-max { #page-commande #produits-production .overflow .td-actif, #page-commande #produits-production .overflow .td-max {
width: 20%; width: 20%;
text-align: center; text-align: center;
} }
/* line 478, ../sass/screen.scss */
/* line 509, ../sass/screen.scss */
#page-commande #produits-production .overflow thead .td-produit { #page-commande #produits-production .overflow thead .td-produit {
width: 57%; width: 57%;
} }
/* line 484, ../sass/screen.scss */
/* line 515, ../sass/screen.scss */
#page-commande #produits-production input.quantite-max { #page-commande #produits-production input.quantite-max {
background-color: white; background-color: white;
border: 1px solid #e0e0e0; border: 1px solid #e0e0e0;
text-align: center; text-align: center;
width: 50px; width: 50px;
} }
/* line 492, ../sass/screen.scss */
/* line 523, ../sass/screen.scss */
#page-commande #produits-production td label { #page-commande #produits-production td label {
font-weight: normal; font-weight: normal;
} }
/* line 498, ../sass/screen.scss */
/* line 529, ../sass/screen.scss */
#page-commande #btn-export-commandes, #page-commande #btn-export-commandes,
#page-commande #btn-commande-auto { #page-commande #btn-commande-auto {
float: right; float: right;
right: -7px; right: -7px;
padding: 2px 5px; padding: 2px 5px;
} }
/* line 507, ../sass/screen.scss */
/* line 538, ../sass/screen.scss */
#page-commande #btn-export-commandes { #page-commande #btn-export-commandes {
color: white; color: white;
margin-left: 10px; margin-left: 10px;
padding: 1px 5px; padding: 1px 5px;
} }
/* line 515, ../sass/screen.scss */
/* line 546, ../sass/screen.scss */
#page-commande #bloc-totaux .table-produits .depasse { #page-commande #bloc-totaux .table-produits .depasse {
color: #b32815; color: #b32815;
} }
/* line 519, ../sass/screen.scss */
/* line 550, ../sass/screen.scss */
#page-commande #bloc-totaux .table-produits .total strong span { #page-commande #bloc-totaux .table-produits .total strong span {
font-weight: normal; font-weight: normal;
font-size: 13px; font-size: 13px;
} }
/* line 528, ../sass/screen.scss */
/* line 559, ../sass/screen.scss */
#page-commande #commandes-points-vente .tab-pane { #page-commande #commandes-points-vente .tab-pane {
padding-top: 20px; padding-top: 20px;
} }
/* line 535, ../sass/screen.scss */
/* line 566, ../sass/screen.scss */
#page-commande #commandes-points-vente .recap-pv.no-commande .recettes { #page-commande #commandes-points-vente .recap-pv.no-commande .recettes {
display: none; display: none;
} }
/* line 539, ../sass/screen.scss */
/* line 570, ../sass/screen.scss */
#page-commande #commandes-points-vente .recap-pv .recettes { #page-commande #commandes-points-vente .recap-pv .recettes {
float: right; float: right;
color: #BB8757; color: #BB8757;
position: relative; position: relative;
top: -3px; top: -3px;
} }
/* line 553, ../sass/screen.scss */
/* line 584, ../sass/screen.scss */
#page-commande #commandes-points-vente .alert.commentaire { #page-commande #commandes-points-vente .alert.commentaire {
display: none; display: none;
} }
/* line 557, ../sass/screen.scss */
/* line 588, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes { #page-commande #commandes-points-vente ul.liste-commandes {
margin-top: 10px; margin-top: 10px;
list-style-type: none; list-style-type: none;
width: 100%; width: 100%;
overflow-y: scroll; overflow-y: scroll;
} }
/* line 569, ../sass/screen.scss */
/* line 600, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes.no-commande { #page-commande #commandes-points-vente ul.liste-commandes.no-commande {
display: none; display: none;
} }
/* line 573, ../sass/screen.scss */
/* line 604, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li { #page-commande #commandes-points-vente ul.liste-commandes li {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
/* line 576, ../sass/screen.scss */
/* line 607, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a { #page-commande #commandes-points-vente ul.liste-commandes li a {
text-align: left; text-align: left;
-moz-border-radius: 0px; -moz-border-radius: 0px;
padding: 7px; padding: 7px;
color: #333; color: #333;
} }
/* line 584, ../sass/screen.scss */
/* line 615, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a .montant { #page-commande #commandes-points-vente ul.liste-commandes li a .montant {
float: right; float: right;
color: #BB8757; color: #BB8757;
font-weight: bold; font-weight: bold;
} }
/* line 589, ../sass/screen.scss */
/* line 620, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a .montant.paye { #page-commande #commandes-points-vente ul.liste-commandes li a .montant.paye {
color: #5cb85c; color: #5cb85c;
color: #519951; color: #519951;
} }
/* line 595, ../sass/screen.scss */
/* line 626, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a .glyphicon-comment { #page-commande #commandes-points-vente ul.liste-commandes li a .glyphicon-comment {
color: #BB8757; color: #BB8757;
} }
/* line 599, ../sass/screen.scss */
/* line 630, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a:hover, #page-commande #commandes-points-vente ul.liste-commandes li a:active, #page-commande #commandes-points-vente ul.liste-commandes li a.active { #page-commande #commandes-points-vente ul.liste-commandes li a:hover, #page-commande #commandes-points-vente ul.liste-commandes li a:active, #page-commande #commandes-points-vente ul.liste-commandes li a.active {
text-decoration: none; text-decoration: none;
background-color: #FCF8E3; background-color: #FCF8E3;
-webkit-transition: all 0.1s; -webkit-transition: all 0.1s;
transition: all 0.1s; transition: all 0.1s;
} }
/* line 613, ../sass/screen.scss */
/* line 644, ../sass/screen.scss */
#page-commande #commandes-points-vente .creer-commande, #page-commande #commandes-points-vente .creer-commande,
#page-commande #commandes-points-vente .commandes-auto { #page-commande #commandes-points-vente .commandes-auto {
width: 100%; width: 100%;
margin-bottom: 10px; margin-bottom: 10px;
} }
/* line 619, ../sass/screen.scss */
/* line 650, ../sass/screen.scss */
#page-commande #commandes-points-vente .bloc-commande { #page-commande #commandes-points-vente .bloc-commande {
padding-top: 20px; padding-top: 20px;
margin-top: 20px; margin-top: 20px;
display: none; display: none;
} }
/* line 625, ../sass/screen.scss */
/* line 656, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user { #page-commande #commandes-points-vente .title-user {
display: none; display: none;
font-size: 19px; font-size: 19px;
margin-top: 0px; margin-top: 0px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
} }
/* line 631, ../sass/screen.scss */
/* line 662, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-remove, #page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-remove,
#page-commande #commandes-points-vente .title-user .btn-cancel, #page-commande #commandes-points-vente .title-user .btn-save { #page-commande #commandes-points-vente .title-user .btn-cancel, #page-commande #commandes-points-vente .title-user .btn-save {
float: right; float: right;
position: relative; position: relative;
top: -6px; top: -6px;
} }
/* line 638, ../sass/screen.scss */
/* line 669, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-cancel { #page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-cancel {
margin-right: 10px; margin-right: 10px;
} }
/* line 642, ../sass/screen.scss */
/* line 673, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .buttons-save-cancel { #page-commande #commandes-points-vente .title-user .buttons-save-cancel {
display: none; display: none;
} }
/* line 646, ../sass/screen.scss */
/* line 677, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .choix-user { #page-commande #commandes-points-vente .title-user .choix-user {
display: none; display: none;
} }
/* line 649, ../sass/screen.scss */
/* line 680, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .choix-user .form-control { #page-commande #commandes-points-vente .title-user .choix-user .form-control {
width: 200px; width: 200px;
display: inline; display: inline;
} }
/* line 657, ../sass/screen.scss */
/* line 688, ../sass/screen.scss */
#page-commande #commandes-points-vente table.table-produits .td-commande { #page-commande #commandes-points-vente table.table-produits .td-commande {
text-align: center; text-align: center;
} }
/* line 660, ../sass/screen.scss */
/* line 691, ../sass/screen.scss */
#page-commande #commandes-points-vente table.table-produits input.form-control { #page-commande #commandes-points-vente table.table-produits input.form-control {
text-align: center; text-align: center;
} }
/* line 666, ../sass/screen.scss */
/* line 697, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-produit, #page-commande #commandes-points-vente .td-produit,
#page-commande #commandes-points-vente .th-produit { #page-commande #commandes-points-vente .th-produit {
width: 70%; width: 70%;
} }
/* line 671, ../sass/screen.scss */
/* line 702, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-commande, #page-commande #commandes-points-vente .td-commande,
#page-commande #commandes-points-vente .th-commande { #page-commande #commandes-points-vente .th-commande {
width: 30%; width: 30%;
text-align: center; text-align: center;
} }
/* line 677, ../sass/screen.scss */
/* line 708, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-produit { #page-commande #commandes-points-vente .td-produit {
text-transform: uppercase; text-transform: uppercase;
} }
/* line 681, ../sass/screen.scss */
/* line 712, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-commande { #page-commande #commandes-points-vente .td-commande {
font-weight: bold; font-weight: bold;
} }
/* line 685, ../sass/screen.scss */
/* line 716, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-total { #page-commande #commandes-points-vente .td-total {
font-size: 18px; font-size: 18px;
text-align: center; text-align: center;
} }
/* line 689, ../sass/screen.scss */
/* line 720, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-total span { #page-commande #commandes-points-vente .td-total span {
padding: 2px 10px; padding: 2px 10px;
background-color: #BB8757; background-color: #BB8757;
-webkit-border-radius: 8px; -webkit-border-radius: 8px;
border-radius: 8px; border-radius: 8px;
} }
/* line 699, ../sass/screen.scss */
/* line 730, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-paiement .buttons-credit { #page-commande #commandes-points-vente .td-paiement .buttons-credit {
float: right; float: right;
} }
/* line 705, ../sass/screen.scss */
/* line 736, ../sass/screen.scss */
#page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_user, #page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_user,
#page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_etablissement { #page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_etablissement {
display: none; display: none;
} }
/* line 712, ../sass/screen.scss */
/* line 743, ../sass/screen.scss */
#page-commande #commandes-points-vente .panel-commande-automatique .jours .form-group { #page-commande #commandes-points-vente .panel-commande-automatique .jours .form-group {
float: left; float: left;
margin-right: 10px; margin-right: 10px;
} }
/* line 721, ../sass/screen.scss */
/* line 752, ../sass/screen.scss */
#page-commande #old-commandes { #page-commande #old-commandes {
display: none; display: none;
} }
/* line 725, ../sass/screen.scss */
/* line 756, ../sass/screen.scss */
#page-commande .form-commandes-point-vente { #page-commande .form-commandes-point-vente {
margin-top: 20px; margin-top: 20px;
} }
/* line 729, ../sass/screen.scss */
/* line 760, ../sass/screen.scss */
#page-commande .form-commandes-point-vente table { #page-commande .form-commandes-point-vente table {
border-bottom: solid 1px #e0e0e0; border-bottom: solid 1px #e0e0e0;
} }
/* line 733, ../sass/screen.scss */
/* line 764, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .title-point-vente { #page-commande .form-commandes-point-vente .title-point-vente {
background-color: #fff8e2; background-color: #fff8e2;
border-left: solid 3px #BB8757; border-left: solid 3px #BB8757;
text-align: left; text-align: left;
padding: 10px; padding: 10px;
} }
/* line 741, ../sass/screen.scss */
/* line 772, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .title-totaux { #page-commande .form-commandes-point-vente .title-totaux {
text-align: center; text-align: center;
} }
/* line 745, ../sass/screen.scss */
/* line 776, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .border-left { #page-commande .form-commandes-point-vente .border-left {
border-left: solid 1px #e0e0e0; border-left: solid 1px #e0e0e0;
} }
/* line 749, ../sass/screen.scss */
/* line 780, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .border-right { #page-commande .form-commandes-point-vente .border-right {
border-right: solid 1px #e0e0e0; border-right: solid 1px #e0e0e0;
} }
/* line 753, ../sass/screen.scss */
/* line 784, ../sass/screen.scss */
#page-commande .form-commandes-point-vente input.quantite { #page-commande .form-commandes-point-vente input.quantite {
width: 30px; width: 30px;
background-color: white; background-color: white;
border: solid 1px #e0e0e0; border: solid 1px #e0e0e0;
text-align: center; text-align: center;
} }
/* line 761, ../sass/screen.scss */
/* line 792, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .td-produit { #page-commande .form-commandes-point-vente .td-produit {
text-align: center; text-align: center;
} }
/* line 765, ../sass/screen.scss */
/* line 796, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .submit-pv { #page-commande .form-commandes-point-vente .submit-pv {
float: right; float: right;
} }
/* line 769, ../sass/screen.scss */
/* line 800, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .select-user { #page-commande .form-commandes-point-vente .select-user {
background-color: #F9F9F9; background-color: #F9F9F9;
border: solid 1px #e0e0e0; border: solid 1px #e0e0e0;
} }
/* line 774, ../sass/screen.scss */
/* line 805, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .date-commande { #page-commande .form-commandes-point-vente .date-commande {
font-size: 12px; font-size: 12px;
} }
/* line 778, ../sass/screen.scss */
/* line 809, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .datepicker, #page-commande .form-commandes-point-vente .text { #page-commande .form-commandes-point-vente .datepicker, #page-commande .form-commandes-point-vente .text {
background-color: white; background-color: white;
border: solid 1px #e0e0e0; border: solid 1px #e0e0e0;
margin-top: 3px; margin-top: 3px;
width: 100px; width: 100px;
} }
/* line 786, ../sass/screen.scss */
/* line 817, ../sass/screen.scss */
#page-commande .form-commandes-point-vente td.center { #page-commande .form-commandes-point-vente td.center {
text-align: center; text-align: center;
} }
/* line 792, ../sass/screen.scss */
/* line 823, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .depasse { #page-commande .form-commandes-point-vente .depasse {
color: #b32815; color: #b32815;
} }
/* line 796, ../sass/screen.scss */
/* line 827, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .total strong span { #page-commande .form-commandes-point-vente .total strong span {
font-weight: normal; font-weight: normal;
font-size: 13px; font-size: 13px;
} }
/* line 801, ../sass/screen.scss */
/* line 832, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .vrac { #page-commande .form-commandes-point-vente .vrac {
display: none; display: none;
} }
/* line 805, ../sass/screen.scss */
/* line 836, ../sass/screen.scss */
#page-commande .form-commandes-point-vente td.client { #page-commande .form-commandes-point-vente td.client {
text-align: left; text-align: left;
padding: 3px; padding: 3px;
} }
/* line 808, ../sass/screen.scss */
/* line 839, ../sass/screen.scss */
#page-commande .form-commandes-point-vente td.client .date-commande { #page-commande .form-commandes-point-vente td.client .date-commande {
color: gray; color: gray;
} }
/* line 815, ../sass/screen.scss */
/* line 846, ../sass/screen.scss */
#page-commande .table-header-rotated { #page-commande .table-header-rotated {
border-top: 0px; border-top: 0px;
border-left: 0px; border-left: 0px;
width: 100%; width: 100%;
width: auto; width: auto;
} }
/* line 822, ../sass/screen.scss */
/* line 853, ../sass/screen.scss */
#page-commande .table-header-rotated .total strong { #page-commande .table-header-rotated .total strong {
border-bottom: solid 1px gray; border-bottom: solid 1px gray;
} }
/* line 827, ../sass/screen.scss */
/* line 858, ../sass/screen.scss */
#page-commande .table-header-rotated th.row-header { #page-commande .table-header-rotated th.row-header {
width: auto; width: auto;
} }
/* line 831, ../sass/screen.scss */
/* line 862, ../sass/screen.scss */
#page-commande .table-header-rotated td { #page-commande .table-header-rotated td {
width: 40px; width: 40px;
border-top: 1px solid #dddddd; border-top: 1px solid #dddddd;
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
} }
/* line 840, ../sass/screen.scss */
/* line 871, ../sass/screen.scss */
#page-commande .table-header-rotated th.rotate-45 { #page-commande .table-header-rotated th.rotate-45 {
font-weight: normal; font-weight: normal;
height: 80px; height: 80px;
line-height: 1; line-height: 1;
border: 0px none; border: 0px none;
} }
/* line 854, ../sass/screen.scss */
/* line 885, ../sass/screen.scss */
#page-commande .table-header-rotated th.rotate-45 > div { #page-commande .table-header-rotated th.rotate-45 > div {
background-color: #F5F5F5; background-color: #F5F5F5;
position: relative; position: relative;
border-right: 1px solid #dddddd; border-right: 1px solid #dddddd;
border-top: 1px solid #dddddd; border-top: 1px solid #dddddd;
} }
/* line 871, ../sass/screen.scss */
/* line 902, ../sass/screen.scss */
#page-commande .table-header-rotated th.rotate-45 span { #page-commande .table-header-rotated th.rotate-45 span {
-ms-transform: skew(45deg, 0deg) rotate(315deg); -ms-transform: skew(45deg, 0deg) rotate(315deg);
-moz-transform: skew(45deg, 0deg) rotate(315deg); -moz-transform: skew(45deg, 0deg) rotate(315deg);
text-align: left; text-align: left;
} }


/* line 892, ../sass/screen.scss */
/* line 923, ../sass/screen.scss */
#email-masse-form #ids-users { #email-masse-form #ids-users {
line-height: 30px; line-height: 30px;
} }
/* line 894, ../sass/screen.scss */
/* line 925, ../sass/screen.scss */
#email-masse-form #ids-users .label { #email-masse-form #ids-users .label {
text-transform: capitalize; text-transform: capitalize;
} }


/* line 902, ../sass/screen.scss */
/* line 933, ../sass/screen.scss */
.produit-create #jours-production .form-group, .produit-update #jours-production .form-group { .produit-create #jours-production .form-group, .produit-update #jours-production .form-group {
float: left; float: left;
margin-right: 15px; margin-right: 15px;
} }
/* line 906, ../sass/screen.scss */
/* line 937, ../sass/screen.scss */
.produit-create #jours-production .form-group label, .produit-update #jours-production .form-group label { .produit-create #jours-production .form-group label, .produit-update #jours-production .form-group label {
font-weight: normal; font-weight: normal;
} }
/* line 911, ../sass/screen.scss */
/* line 942, ../sass/screen.scss */
.produit-create .field-produit-id_etablissement, .produit-update .field-produit-id_etablissement { .produit-create .field-produit-id_etablissement, .produit-update .field-produit-id_etablissement {
display: none; display: none;
} }


/* line 916, ../sass/screen.scss */
/* line 947, ../sass/screen.scss */
.table-striped > tbody > tr:nth-of-type(2n) { .table-striped > tbody > tr:nth-of-type(2n) {
background-color: white; background-color: white;
} }


/* line 921, ../sass/screen.scss */
/* line 952, ../sass/screen.scss */
.wrap .produit-index .td-photo { .wrap .produit-index .td-photo {
max-width: 100px; max-width: 100px;
width: 100px; width: 100px;
} }
/* line 925, ../sass/screen.scss */
/* line 956, ../sass/screen.scss */
.wrap .produit-index .photo-produit { .wrap .produit-index .photo-produit {
max-width: 100px; max-width: 100px;
} }
/* line 929, ../sass/screen.scss */
/* line 960, ../sass/screen.scss */
.wrap .produit-index .ui-state-highlight { .wrap .produit-index .ui-state-highlight {
height: 75px; height: 75px;
background-color: #F8F1DD; background-color: #F8F1DD;
} }


/* communiquer */ /* communiquer */
/* line 937, ../sass/screen.scss */
/* line 968, ../sass/screen.scss */
.communiquer-mode-emploi { .communiquer-mode-emploi {
border: solid 1px #e0e0e0; border: solid 1px #e0e0e0;
padding: 10px; padding: 10px;
margin-bottom: 30px; margin-bottom: 30px;
font-family: "myriadpro-regular"; font-family: "myriadpro-regular";
} }
/* line 945, ../sass/screen.scss */
/* line 976, ../sass/screen.scss */
.communiquer-mode-emploi .header .logo { .communiquer-mode-emploi .header .logo {
float: left; float: left;
width: 75px; width: 75px;
padding-right: 20px; padding-right: 20px;
padding-top: 10px; padding-top: 10px;
} }
/* line 951, ../sass/screen.scss */
/* line 982, ../sass/screen.scss */
.communiquer-mode-emploi .header .logo img { .communiquer-mode-emploi .header .logo img {
width: 75px; width: 75px;
} }
/* line 957, ../sass/screen.scss */
/* line 988, ../sass/screen.scss */
.communiquer-mode-emploi .header h1 { .communiquer-mode-emploi .header h1 {
font-family: "comfortaaregular"; font-family: "comfortaaregular";
font-size: 40px; font-size: 40px;
margin-bottom: 0px; margin-bottom: 0px;
font-weight: normal; font-weight: normal;
} }
/* line 965, ../sass/screen.scss */
/* line 996, ../sass/screen.scss */
.communiquer-mode-emploi .header h2 { .communiquer-mode-emploi .header h2 {
margin-top: 0px; margin-top: 0px;
font-family: "myriadpro-regular"; font-family: "myriadpro-regular";
left: 2px; left: 2px;
font-weight: normal; font-weight: normal;
} }
/* line 976, ../sass/screen.scss */
/* line 1007, ../sass/screen.scss */
.communiquer-mode-emploi h3 { .communiquer-mode-emploi h3 {
font-family: "comfortaalight"; font-family: "comfortaalight";
font-family: "myriadpro-regular"; font-family: "myriadpro-regular";
margin-bottom: 0px; margin-bottom: 0px;
} }


/* line 986, ../sass/screen.scss */
/* line 1017, ../sass/screen.scss */
.communiquer-mode-emploi-encart { .communiquer-mode-emploi-encart {
width: 420px; width: 420px;
margin-top: 20px; margin-top: 20px;
} }
/* line 990, ../sass/screen.scss */
/* line 1021, ../sass/screen.scss */
.communiquer-mode-emploi-encart .header .logo { .communiquer-mode-emploi-encart .header .logo {
width: 60px; width: 60px;
margin-right: 20px; margin-right: 20px;
padding-top: 5px; padding-top: 5px;
} }
/* line 995, ../sass/screen.scss */
/* line 1026, ../sass/screen.scss */
.communiquer-mode-emploi-encart .header .logo img { .communiquer-mode-emploi-encart .header .logo img {
width: 60px; width: 60px;
} }
/* line 1001, ../sass/screen.scss */
/* line 1032, ../sass/screen.scss */
.communiquer-mode-emploi-encart .header h1 { .communiquer-mode-emploi-encart .header h1 {
margin-bottom: 3px; margin-bottom: 3px;
} }
/* line 1010, ../sass/screen.scss */
/* line 1041, ../sass/screen.scss */
.communiquer-mode-emploi-encart h3 { .communiquer-mode-emploi-encart h3 {
margin-top: 15px; margin-top: 15px;
margin-bottom: 15px; margin-bottom: 15px;
} }


/* line 1016, ../sass/screen.scss */
/* line 1047, ../sass/screen.scss */
.bloc-mode-emploi-pdf { .bloc-mode-emploi-pdf {
width: 49.9%; width: 49.9%;
float: left; float: left;
border-bottom: dotted 1px gray; border-bottom: dotted 1px gray;
} }


/* line 1022, ../sass/screen.scss */
/* line 1053, ../sass/screen.scss */
.bloc-mode-emploi-border { .bloc-mode-emploi-border {
border-right: dotted 1px gray; border-right: dotted 1px gray;
border-bottom: dotted 1px gray; border-bottom: dotted 1px gray;
} }


/* line 1027, ../sass/screen.scss */
/* line 1058, ../sass/screen.scss */
.communiquer-mode-emploi-pdf { .communiquer-mode-emploi-pdf {
border: 0px none; border: 0px none;
-moz-border-radius: 0px; -moz-border-radius: 0px;
margin-bottom: 0px; margin-bottom: 0px;
padding: 20px 0px 20px 30px; padding: 20px 0px 20px 30px;
} }
/* line 1035, ../sass/screen.scss */
/* line 1066, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header .logo { .communiquer-mode-emploi-pdf .header .logo {
float: left; float: left;
width: 55px; width: 55px;
padding-right: 15px; padding-right: 15px;
padding-top: 10px; padding-top: 10px;
} }
/* line 1041, ../sass/screen.scss */
/* line 1072, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header .logo img { .communiquer-mode-emploi-pdf .header .logo img {
width: 55px; width: 55px;
} }
/* line 1045, ../sass/screen.scss */
/* line 1076, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header h1 { .communiquer-mode-emploi-pdf .header h1 {
font-size: 32px; font-size: 32px;
} }
/* line 1048, ../sass/screen.scss */
/* line 1079, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header h2 { .communiquer-mode-emploi-pdf .header h2 {
font-size: 16px; font-size: 16px;
} }
/* line 1053, ../sass/screen.scss */
/* line 1084, ../sass/screen.scss */
.communiquer-mode-emploi-pdf h3 { .communiquer-mode-emploi-pdf h3 {
font-weight: normal; font-weight: normal;
} }


/* line 1058, ../sass/screen.scss */
/* line 1089, ../sass/screen.scss */
.bloc-mode-emploi-bottom { .bloc-mode-emploi-bottom {
border-bottom: 0px none; border-bottom: 0px none;
border-bottom: solid 1px white; border-bottom: solid 1px white;
} }


/* commandes auto */ /* commandes auto */
/* line 1068, ../sass/screen.scss */
/* line 1099, ../sass/screen.scss */
.commandeauto-form #bloc-select-user { .commandeauto-form #bloc-select-user {
padding-left: 0px; padding-left: 0px;
} }
/* line 1072, ../sass/screen.scss */
/* line 1103, ../sass/screen.scss */
.commandeauto-form #or-user { .commandeauto-form #or-user {
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
} }
/* line 1075, ../sass/screen.scss */
/* line 1106, ../sass/screen.scss */
.commandeauto-form #or-user span { .commandeauto-form #or-user span {
position: relative; position: relative;
top: 24px; top: 24px;
} }
/* line 1081, ../sass/screen.scss */
/* line 1112, ../sass/screen.scss */
.commandeauto-form .field-commandeautoform-id_etablissement { .commandeauto-form .field-commandeautoform-id_etablissement {
display: none; display: none;
} }
/* line 1085, ../sass/screen.scss */
/* line 1116, ../sass/screen.scss */
.commandeauto-form .jours .form-group { .commandeauto-form .jours .form-group {
float: left; float: left;
margin-right: 20px; margin-right: 20px;
} }
/* line 1092, ../sass/screen.scss */
/* line 1123, ../sass/screen.scss */
.commandeauto-form .produits .table { .commandeauto-form .produits .table {
width: 500px; width: 500px;
} }
/* line 1095, ../sass/screen.scss */
/* line 1126, ../sass/screen.scss */
.commandeauto-form .produits .quantite { .commandeauto-form .produits .quantite {
text-align: center; text-align: center;
} }


/* points de vente */ /* points de vente */
/* line 1104, ../sass/screen.scss */
/* line 1135, ../sass/screen.scss */
.point-vente-form #pointvente-users { .point-vente-form #pointvente-users {
display: none; display: none;
height: 500px; height: 500px;
overflow-y: scroll; overflow-y: scroll;
} }
/* line 1108, ../sass/screen.scss */
/* line 1139, ../sass/screen.scss */
.point-vente-form #pointvente-users label { .point-vente-form #pointvente-users label {
font-weight: normal; font-weight: normal;
display: block; display: block;
} }
/* line 1112, ../sass/screen.scss */
/* line 1143, ../sass/screen.scss */
.point-vente-form #pointvente-users .commentaire { .point-vente-form #pointvente-users .commentaire {
display: none; display: none;
margin-left: 17px; margin-left: 17px;
width: 200px; width: 200px;
} }
/* line 1120, ../sass/screen.scss */
/* line 1151, ../sass/screen.scss */
.point-vente-form #jours-livraison .form-group { .point-vente-form #jours-livraison .form-group {
float: left; float: left;
margin-right: 15px; margin-right: 15px;
} }
/* line 1124, ../sass/screen.scss */
/* line 1155, ../sass/screen.scss */
.point-vente-form #jours-livraison .form-group label { .point-vente-form #jours-livraison .form-group label {
font-weight: normal; font-weight: normal;
} }


/* utilisateurs */ /* utilisateurs */
/* line 1134, ../sass/screen.scss */
/* line 1165, ../sass/screen.scss */
.user-index .input-group { .user-index .input-group {
width: 180px; width: 180px;
} }
/* line 1137, ../sass/screen.scss */
/* line 1168, ../sass/screen.scss */
.user-index .input-group .input-credit { .user-index .input-group .input-credit {
text-align: center; text-align: center;
} }


/* facturation */ /* facturation */
/* line 1145, ../sass/screen.scss */
/* line 1176, ../sass/screen.scss */
#estimation-facture { #estimation-facture {
padding: 20px; padding: 20px;
background-color: #F9F9F9; background-color: #F9F9F9;
} }
/* line 1149, ../sass/screen.scss */
/* line 1180, ../sass/screen.scss */
#estimation-facture h2 { #estimation-facture h2 {
font-family: "myriadpro-it"; font-family: "myriadpro-it";
} }
/* line 1153, ../sass/screen.scss */
/* line 1184, ../sass/screen.scss */
#estimation-facture .montant span { #estimation-facture .montant span {
font-size: 25px; font-size: 25px;
color: white; color: white;
padding-top: 7px; padding-top: 7px;
font-family: "myriadpro-regular"; font-family: "myriadpro-regular";
} }
/* line 1164, ../sass/screen.scss */
/* line 1195, ../sass/screen.scss */
#estimation-facture label { #estimation-facture label {
text-transform: uppercase; text-transform: uppercase;
font-family: "myriadpro-light"; font-family: "myriadpro-light";
font-size: 20px; font-size: 20px;
} }
/* line 1169, ../sass/screen.scss */
/* line 1200, ../sass/screen.scss */
#estimation-facture label span { #estimation-facture label span {
font-size: 16px; font-size: 16px;
} }
/* line 1174, ../sass/screen.scss */
/* line 1205, ../sass/screen.scss */
#estimation-facture #etablissement-prix_libre { #estimation-facture #etablissement-prix_libre {
width: 100px; width: 100px;
height: 60px; height: 60px;

+ 32
- 1
backend/web/sass/screen.scss View File

} }
#dernieres-commandes { #dernieres-commandes {
.localite {
.small, .localite {
font-size: 12px ; font-size: 12px ;
color: gray ; color: gray ;
} }
.commentaire { .commentaire {
font-size: 12px ; font-size: 12px ;
} }
.date {
text-align: center ;
.bloc-date {
width: 50% ;
margin: 0px auto ;
padding-top: 0px ;
}
.jour {
text-transform: capitalize ;
line-height: 13px ;
font-size: 10px ;
text-transform: uppercase ;
}
.num {
font-size: 23px ;
line-height: 28px ;
font-weight: bold ;
}
.mois {
text-transform: uppercase ;
line-height: 13px ;
font-size: 15px ;
}
}
} }
#facturation { #facturation {

+ 22
- 0
common/controllers/CommonController.php View File

<?php

namespace common\controllers;

use yii ;

class CommonController extends \yii\web\Controller
{
public function beforeAction($event)
{
if(!Yii::$app->user->isGuest)
{
Yii::$app->user->identity->updateDerniereConnexion() ;
}
return parent::beforeAction($event);
}
}

?>

+ 6
- 13
common/models/Commande.php View File

public static function findBy($params = []) public static function findBy($params = [])
{ {
if(!isset($params['id_etablissement'])) if(!isset($params['id_etablissement']))
$params['id_etablissement'] = Yii::$app->user->identity->id_etablissement ; $params['id_etablissement'] = Yii::$app->user->identity->id_etablissement ;
->joinWith(['production','user']) ->joinWith(['production','user'])
->where(['production.id_etablissement' => $params['id_etablissement']]) ; ->where(['production.id_etablissement' => $params['id_etablissement']]) ;
if(isset($params['condition']))
$commandes = $commandes->andWhere($params['condition']);
if(isset($params['date'])) if(isset($params['date']))
$commandes = $commandes->andWhere(['production.date' => $params['date']]); $commandes = $commandes->andWhere(['production.date' => $params['date']]);
/*$orderby = 'date' ;
if(isset($params['orderby']))
$orderby = $params['orderby'] ;
if(isset($params['order']))
$commandes = $commandes->orderBy($orderby.' '.$params['order']);
else
$commandes = $commandes->orderBy($orderby.' ASC');*/
if(isset($params['type']))
$commandes = $commandes->andWhere(['commande.type' => $params['type']]);
if(isset($params['orderby'])) if(isset($params['orderby']))
{
$commandes = $commandes->orderBy($params['orderby']); $commandes = $commandes->orderBy($params['orderby']);
}
else {
else
$commandes = $commandes->orderBy('date ASC'); $commandes = $commandes->orderBy('date ASC');
}
if(isset($params['limit'])) if(isset($params['limit']))
$commandes = $commandes->limit($params['limit']) ; $commandes = $commandes->limit($params['limit']) ;

+ 5
- 0
common/models/User.php View File

return 0 ; return 0 ;
} }
public function updateDerniereConnexion() {
$this->date_derniere_connexion = date('Y-m-d H:i:s') ;
$this->save() ;
}
} }

+ 3
- 0
environments/demo/backend/web/index.php View File

require(__DIR__ . '/../config/main-local.php') require(__DIR__ . '/../config/main-local.php')
); );


date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config); $application = new yii\web\Application($config);
$application->run(); $application->run();

+ 3
- 0
environments/demo/frontend/web/index.php View File

require(__DIR__ . '/../config/main-local.php') require(__DIR__ . '/../config/main-local.php')
); );


date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config); $application = new yii\web\Application($config);
$application->run(); $application->run();

+ 1
- 0
environments/dev/backend/web/index.php View File

$application = new yii\web\Application($config); $application = new yii\web\Application($config);


date_default_timezone_set('Europe/Paris'); date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');


$application->run(); $application->run();

+ 1
- 0
environments/dev/frontend/web/index.php View File

$application = new yii\web\Application($config); $application = new yii\web\Application($config);


date_default_timezone_set('Europe/Paris'); date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');


$application->run(); $application->run();

+ 3
- 0
environments/prod/backend/web/index.php View File

require(__DIR__ . '/../config/main-local.php') require(__DIR__ . '/../config/main-local.php')
); );


date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config); $application = new yii\web\Application($config);
$application->run(); $application->run();

+ 3
- 0
environments/prod/frontend/web/index.php View File

require(__DIR__ . '/../config/main-local.php') require(__DIR__ . '/../config/main-local.php')
); );


date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config); $application = new yii\web\Application($config);
$application->run(); $application->run();

+ 2
- 1
frontend/controllers/CommandeController.php View File

use yii\web\NotFoundHttpException ; use yii\web\NotFoundHttpException ;
use common\models\ProductionPointVente ; use common\models\ProductionPointVente ;
use yii\base\UserException ; use yii\base\UserException ;
use frontend\controllers\FrontendController;


class CommandeController extends \yii\web\Controller {
class CommandeController extends FrontendController {


public function behaviors() { public function behaviors() {
return [ return [

+ 14
- 0
frontend/controllers/FrontendController.php View File

<?php

namespace frontend\controllers;

use yii ;
use common\controllers\CommonController ;

class FrontendController extends CommonController
{
}

?>

+ 2
- 1
frontend/controllers/SiteController.php View File

use yii\filters\VerbFilter; use yii\filters\VerbFilter;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use yii\helpers\Html; use yii\helpers\Html;
use frontend\controllers\FrontendController;


use dosamigos\leaflet\types\LatLng; use dosamigos\leaflet\types\LatLng;
use dosamigos\leaflet\layers\Marker; use dosamigos\leaflet\layers\Marker;
/** /**
* Site controller * Site controller
*/ */
class SiteController extends Controller
class SiteController extends FrontendController
{ {
/** /**
* @inheritdoc * @inheritdoc

+ 2
- 1
frontend/controllers/UserController.php View File

use yii\web\NotFoundHttpException; use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter; use yii\filters\VerbFilter;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use frontend\controllers\FrontendController;


/** /**
* UserController implements the CRUD actions for User model. * UserController implements the CRUD actions for User model.
*/ */
class UserController extends Controller
class UserController extends FrontendController
{ {
public function behaviors() public function behaviors()
{ {

Loading…
Cancel
Save