Browse Source

[Administration] Commandes admin : page générale des dernières commandes passées sur Souke

feature/rotating_product
Guillaume Bourgeois 5 months ago
parent
commit
d1c1d88276
21 changed files with 354 additions and 174 deletions
  1. +13
    -0
      backend/config/main.php
  2. +2
    -1
      backend/controllers/admin/CommunicateAdminController.php
  3. +2
    -3
      backend/controllers/admin/DashboardAdminController.php
  4. +2
    -1
      backend/controllers/admin/FeatureAdminController.php
  5. +3
    -2
      backend/controllers/admin/OnlineAdminController.php
  6. +79
    -0
      backend/controllers/admin/OrderAdminController.php
  7. +2
    -2
      backend/controllers/admin/ProducerAdminController.php
  8. +2
    -4
      backend/controllers/admin/SettingAdminController.php
  9. +5
    -4
      backend/controllers/admin/StatsAdminController.php
  10. +2
    -1
      backend/controllers/admin/SupportAdminController.php
  11. +2
    -1
      backend/controllers/admin/TaxRateAdminController.php
  12. +2
    -1
      backend/controllers/admin/UserAdminController.php
  13. +1
    -7
      backend/views/dashboard/index.php
  14. +6
    -0
      backend/views/layouts/left.php
  15. +111
    -0
      backend/views/order-admin/index.php
  16. +4
    -11
      backend/views/user/orders.php
  17. +98
    -94
      backend/web/css/screen.css
  18. +5
    -0
      backend/web/sass/_adminlte.scss
  19. +3
    -1
      common/components/ActiveRecordCommon.php
  20. +1
    -0
      domain/Order/Order/OrderSearch.php
  21. +9
    -41
      domain/Order/Order/OrderSolver.php

+ 13
- 0
backend/config/main.php View File

'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'name' => 'distrib', 'name' => 'distrib',
'controllerNamespace' => 'backend\controllers', 'controllerNamespace' => 'backend\controllers',
'controllerMap' => [
'dashboard-admin' => 'backend\controllers\admin\DashboardAdminController',
'communicate-admin' => 'backend\controllers\admin\CommunicatedAdminController',
'feature-admin' => 'backend\controllers\admin\FeatureAdminController',
'online-admin' => 'backend\controllers\admin\OnlineAdminController',
'producer-admin' => 'backend\controllers\admin\ProducerAdminController',
'setting-admin' => 'backend\controllers\admin\SettingAdminController',
'stats-admin' => 'backend\controllers\admin\StatsAdminController',
'support-admin' => 'backend\controllers\admin\SupportAdminController',
'tax-rate-admin' => 'backend\controllers\admin\TaxRateAdminController',
'user-admin' => 'backend\controllers\admin\UserAdminController',
'order-admin' => 'backend\controllers\admin\OrderAdminController',
],
'defaultRoute' => 'dashboard/index', 'defaultRoute' => 'dashboard/index',
'bootstrap' => ['log'], 'bootstrap' => ['log'],
'modules' => [], 'modules' => [],

backend/controllers/CommunicateAdminController.php → backend/controllers/admin/CommunicateAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use backend\controllers\BackendController;
use backend\models\MailForm; use backend\models\MailForm;
use domain\User\User\User; use domain\User\User\User;
use yii\filters\AccessControl; use yii\filters\AccessControl;

backend/controllers/DashboardAdminController.php → backend/controllers/admin/DashboardAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use common\helpers\Price;
use backend\controllers\BackendController;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use yii\filters\VerbFilter;


class DashboardAdminController extends BackendController class DashboardAdminController extends BackendController
{ {

backend/controllers/FeatureAdminController.php → backend/controllers/admin/FeatureAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use backend\controllers\BackendController;
use common\helpers\Ajax; use common\helpers\Ajax;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use yii\helpers\Html; use yii\helpers\Html;

backend/controllers/OnlineAdminController.php → backend/controllers/admin/OnlineAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use yii\filters\VerbFilter;
use backend\controllers\BackendController;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use yii\filters\VerbFilter;


class OnlineAdminController extends BackendController class OnlineAdminController extends BackendController
{ {

+ 79
- 0
backend/controllers/admin/OrderAdminController.php View File

<?php

/**
* Copyright Souke (2018)
*
* contact@souke.fr
*
* Ce logiciel est un programme informatique servant à aider les producteurs
* à distribuer leur production en circuits courts.
*
* Ce logiciel est régi par la licence CeCILL soumise au droit français et
* respectant les principes de diffusion des logiciels libres. Vous pouvez
* utiliser, modifier et/ou redistribuer ce programme sous les conditions
* de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
* sur le site "http://www.cecill.info".
*
* En contrepartie de l'accessibilité au code source et des droits de copie,
* de modification et de redistribution accordés par cette licence, il n'est
* offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
* seule une responsabilité restreinte pèse sur l'auteur du programme, le
* titulaire des droits patrimoniaux et les concédants successifs.
*
* A cet égard l'attention de l'utilisateur est attirée sur les risques
* associés au chargement, à l'utilisation, à la modification et/ou au
* développement et à la reproduction du logiciel par l'utilisateur étant
* donné sa spécificité de logiciel libre, qui peut le rendre complexe à
* manipuler et qui le réserve donc à des développeurs et des professionnels
* avertis possédant des connaissances informatiques approfondies. Les
* utilisateurs sont donc invités à charger et tester l'adéquation du
* logiciel à leurs besoins dans des conditions permettant d'assurer la
* sécurité de leurs systèmes et ou de leurs données et, plus généralement,
* à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.
*
* Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
* pris connaissance de la licence CeCILL, et que vous en avez accepté les
* termes.
*/

namespace backend\controllers\admin;

use backend\controllers\BackendController;
use domain\Order\Order\OrderSearch;
use domain\User\User\UserSearch;
use Yii;
use yii\filters\AccessControl;

class OrderAdminController extends BackendController
{
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::class,
'rules' => [
[
'allow' => true,
'roles' => ['@'],
'matchCallback' => function ($rule, $action) {
return $this->getUserModule()
->getAuthorizationChecker()
->isGrantedAsAdministrator($this->getUserCurrent());
}
]
],
],
];
}

public function actionIndex()
{
$searchModel = new OrderSearch();
$dataProvider = $searchModel->search(array_merge(\Yii::$app->request->queryParams));

return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
}

backend/controllers/ProducerAdminController.php → backend/controllers/admin/ProducerAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use backend\controllers\BackendController;
use common\helpers\Ajax; use common\helpers\Ajax;
use common\helpers\Alwaysdata; use common\helpers\Alwaysdata;
use domain\Order\Order\Order; use domain\Order\Order\Order;
use domain\Order\Order\OrderRepositoryQuery; use domain\Order\Order\OrderRepositoryQuery;
use domain\Order\OrderStatus\OrderStatus;
use domain\Producer\Producer\Producer; use domain\Producer\Producer\Producer;
use domain\Product\Product\Product; use domain\Product\Product\Product;
use Yii; use Yii;

backend/controllers/SettingAdminController.php → backend/controllers/admin/SettingAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use backend\controllers\BackendController;
use backend\forms\AdminSettingsForm; use backend\forms\AdminSettingsForm;
use common\helpers\Ajax;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use yii\helpers\Html;
use yii\web\NotFoundHttpException;


/** /**
* UserController implements the CRUD actions for User model. * UserController implements the CRUD actions for User model.

backend/controllers/StatsAdminController.php → backend/controllers/admin/StatsAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use yii\filters\AccessControl;
use Yii;
use DateTime;
use backend\controllers\BackendController;
use DateInterval; use DateInterval;
use DatePeriod; use DatePeriod;
use DateTime;
use Yii;
use yii\filters\AccessControl;


class StatsAdminController extends BackendController class StatsAdminController extends BackendController
{ {

backend/controllers/SupportAdminController.php → backend/controllers/admin/SupportAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use backend\controllers\SupportController;
use domain\Ticket\Ticket\Ticket; use domain\Ticket\Ticket\Ticket;
use domain\Ticket\Ticket\TicketSearch; use domain\Ticket\Ticket\TicketSearch;
use yii\filters\AccessControl; use yii\filters\AccessControl;

backend/controllers/TaxRateAdminController.php → backend/controllers/admin/TaxRateAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use backend\controllers\BackendController;
use domain\Config\TaxRate\TaxRate; use domain\Config\TaxRate\TaxRate;
use yii\data\ActiveDataProvider; use yii\data\ActiveDataProvider;
use yii\filters\AccessControl; use yii\filters\AccessControl;

backend/controllers/UserAdminController.php → backend/controllers/admin/UserAdminController.php View File

* termes. * termes.
*/ */


namespace backend\controllers;
namespace backend\controllers\admin;


use backend\controllers\BackendController;
use domain\User\User\UserSearch; use domain\User\User\UserSearch;
use Yii; use Yii;
use yii\filters\AccessControl; use yii\filters\AccessControl;

+ 1
- 7
backend/views/dashboard/index.php View File



<tr class="<?= $orderModule->getHistoryClass($order) ; ?>"> <tr class="<?= $orderModule->getHistoryClass($order) ; ?>">
<td class="history"> <td class="history">
<?= $orderModule->getSolver()->getLabelOrderStatus($order); ?>
<?php
$lastOrderStatusHistory = $orderModule->getSolver()->getLastOrderStatusHistory($order);
if($lastOrderStatusHistory) {
echo '<br /><span class="small gray">'.$lastOrderStatusHistory->getDate()->format('d/m/Y à H:i').'</span>';
}
?>
<?= $orderModule->getSolver()->getLabelOrderStatus($order, true); ?>
</td> </td>
<td class="infos"> <td class="infos">
<?= $orderModule->getSolver()->getLabelOrigin($order, true); ?> <?= $orderModule->getSolver()->getLabelOrigin($order, true); ?>

+ 6
- 0
backend/views/layouts/left.php View File

'url' => ['/user-admin/email-deliverability'], 'url' => ['/user-admin/email-deliverability'],
'visible' => $isUserCurrentGrantedAsAdministrator 'visible' => $isUserCurrentGrantedAsAdministrator
], ],
[
'label' => 'Commandes',
'icon' => 'calendar',
'url' => ['order-admin/index'],
'visible' => $isUserCurrentGrantedAsAdministrator,
],
[ [
'label' => 'Statistiques', 'label' => 'Statistiques',
'icon' => 'line-chart', 'icon' => 'line-chart',

+ 111
- 0
backend/views/order-admin/index.php View File

<?php

/**
* Copyright Souke (2018)
*
* contact@souke.fr
*
* Ce logiciel est un programme informatique servant à aider les producteurs
* à distribuer leur production en circuits courts.
*
* Ce logiciel est régi par la licence CeCILL soumise au droit français et
* respectant les principes de diffusion des logiciels libres. Vous pouvez
* utiliser, modifier et/ou redistribuer ce programme sous les conditions
* de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
* sur le site "http://www.cecill.info".
*
* En contrepartie de l'accessibilité au code source et des droits de copie,
* de modification et de redistribution accordés par cette licence, il n'est
* offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
* seule une responsabilité restreinte pèse sur l'auteur du programme, le
* titulaire des droits patrimoniaux et les concédants successifs.
*
* A cet égard l'attention de l'utilisateur est attirée sur les risques
* associés au chargement, à l'utilisation, à la modification et/ou au
* développement et à la reproduction du logiciel par l'utilisateur étant
* donné sa spécificité de logiciel libre, qui peut le rendre complexe à
* manipuler et qui le réserve donc à des développeurs et des professionnels
* avertis possédant des connaissances informatiques approfondies. Les
* utilisateurs sont donc invités à charger et tester l'adéquation du
* logiciel à leurs besoins dans des conditions permettant d'assurer la
* sécurité de leurs systèmes et ou de leurs données et, plus généralement,
* à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.
*
* Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
* pris connaissance de la licence CeCILL, et que vous en avez accepté les
* termes.
*/

use common\components\View;
use yii\grid\GridView;
use yii\helpers\Html;

/**
* @var View $this
*/

$userModule = $this->getUserModule();
$orderModule = $this->getOrderModule();

$this->setTitle('Commandes') ;
$this->addBreadcrumb('Commandes') ;

?>

<div class="order-admin-index">
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'label' => 'Statut',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getLabelOrderStatus($order, true);
}
],
[
'label' => 'Producteur',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return Html::encode($order->distribution->producer->name);
}
],
[
'label' => 'Origine',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getLabelOrigin($order, true);;
}
],
[
'attribute' => 'distribution.date',
'label' => 'Distribution',
'value' => function ($order) {
return date('d/m/Y',strtotime($order->distribution->date));
}
],
[
'label' => 'Point de vente',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getPointSaleSummary($order);
}
],
[
'label' => 'Produits',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getRepository()->getCartSummary($order);
}
],
[
'label' => 'Montant',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
$orderModule->initOrder($order);
return $orderModule->getRepository()->getAmountSummary($order);
}
]
],
]); ?>
</div>

+ 4
- 11
backend/views/user/orders.php View File

'label' => 'Origine', 'label' => 'Origine',
'format' => 'raw', 'format' => 'raw',
'value' => function ($order) use ($orderModule) { 'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getLabelOrigin($order);;
return $orderModule->getSolver()->getLabelOrigin($order, true);;
} }
], ],
[ [
'label' => 'Point de vente', 'label' => 'Point de vente',
'format' => 'raw', 'format' => 'raw',
'value' => function ($order) use ($orderModule) { 'value' => function ($order) use ($orderModule) {
return $orderModule->getPointSaleSummary($order);
return $orderModule->getSolver()->getPointSaleSummary($order);
} }
], ],
/*[
'label' => 'Historique',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getHistorySummary($order);
}
],*/
[ [
'label' => 'Produits', 'label' => 'Produits',
'format' => 'raw', 'format' => 'raw',
'value' => function ($order) use ($orderModule) { 'value' => function ($order) use ($orderModule) {
return $orderModule->getCartSummary($order);
return $orderModule->getRepository()->getCartSummary($order);
} }
], ],
[ [
'format' => 'raw', 'format' => 'raw',
'value' => function ($order) use ($orderModule) { 'value' => function ($order) use ($orderModule) {
$orderModule->initOrder($order); $orderModule->initOrder($order);
return $orderModule->getAmountSummary($order);
return $orderModule->getRepository()->getAmountSummary($order);
} }
], ],
[ [

+ 98
- 94
backend/web/css/screen.css View File

color: gray; color: gray;
font-style: italic; font-style: italic;
} }
/* line 50, ../sass/_adminlte.scss */
/* line 49, ../sass/_adminlte.scss */
body.skin-black .locality {
color: gray;
}
/* line 55, ../sass/_adminlte.scss */
body.skin-black .main-header .dropdown-toggle::after { body.skin-black .main-header .dropdown-toggle::after {
display: none; display: none;
} }
/* line 54, ../sass/_adminlte.scss */
/* line 59, ../sass/_adminlte.scss */
body.skin-black .main-header .logo { body.skin-black .main-header .logo {
background-color: white; background-color: white;
font-family: 'highvoltageregular'; font-family: 'highvoltageregular';
font-size: 23px; font-size: 23px;
position: relative; position: relative;
} }
/* line 60, ../sass/_adminlte.scss */
/* line 65, ../sass/_adminlte.scss */
body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus { body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus {
background-color: white; background-color: white;
text-decoration: none; text-decoration: none;
} }
/* line 65, ../sass/_adminlte.scss */
/* line 70, ../sass/_adminlte.scss */
body.skin-black .main-header .logo img { body.skin-black .main-header .logo img {
position: relative; position: relative;
max-width: 300px; max-width: 300px;
max-height: 300px; max-height: 300px;
height: auto; height: auto;
} }
/* line 73, ../sass/_adminlte.scss */
/* line 78, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-lg img { body.skin-black .main-header .logo .logo-lg img {
width: 90px; width: 90px;
top: -2px; top: -2px;
} }
/* line 79, ../sass/_adminlte.scss */
/* line 84, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-mini img { body.skin-black .main-header .logo .logo-mini img {
width: 50px; width: 50px;
} }
/* line 84, ../sass/_adminlte.scss */
/* line 89, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar { body.skin-black .main-header .navbar {
display: block; display: block;
background-color: white; background-color: white;
padding: 0px; padding: 0px;
} }
/* line 89, ../sass/_adminlte.scss */
/* line 94, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel { body.skin-black .main-header .navbar .producer-panel {
position: relative; position: relative;
float: left; float: left;
padding-left: 50px; padding-left: 50px;
margin-left: 7px; margin-left: 7px;
} }
/* line 96, ../sass/_adminlte.scss */
/* line 101, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel.without-logo { body.skin-black .main-header .navbar .producer-panel.without-logo {
padding-left: 10px; padding-left: 10px;
} }
/* line 100, ../sass/_adminlte.scss */
/* line 105, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo { body.skin-black .main-header .navbar .producer-panel .logo {
position: absolute; position: absolute;
top: 5px; top: 5px;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
} }
/* line 112, ../sass/_adminlte.scss */
/* line 117, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo .img-logo { body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
position: absolute; position: absolute;
top: 50%; top: 50%;
max-width: 35px; max-width: 35px;
max-height: 35px; max-height: 35px;
} }
/* line 122, ../sass/_adminlte.scss */
/* line 127, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title { body.skin-black .main-header .navbar .producer-panel .title {
position: relative; position: relative;
top: 2px; top: 2px;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 127, ../sass/_adminlte.scss */
/* line 132, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a { body.skin-black .main-header .navbar .producer-panel .title a {
color: #333; color: #333;
} }
/* line 130, ../sass/_adminlte.scss */
/* line 135, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a:hover { body.skin-black .main-header .navbar .producer-panel .title a:hover {
text-decoration: underline; text-decoration: underline;
} }
/* line 135, ../sass/_adminlte.scss */
/* line 140, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title .producer-id { body.skin-black .main-header .navbar .producer-panel .title .producer-id {
color: gray; color: gray;
font-size: 13px; font-size: 13px;
} }
/* line 142, ../sass/_adminlte.scss */
/* line 147, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .sidebar-toggle { body.skin-black .main-header .navbar .sidebar-toggle {
color: #333; color: #333;
} }
/* line 146, ../sass/_adminlte.scss */
/* line 151, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support { body.skin-black .main-header .navbar .link-support {
float: left; float: left;
padding: 15px 15px; padding: 15px 15px;
border-right: solid 1px #e0e0e0; border-right: solid 1px #e0e0e0;
color: #333; color: #333;
} }
/* line 152, ../sass/_adminlte.scss */
/* line 157, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support:hover { body.skin-black .main-header .navbar .link-support:hover {
text-decoration: none; text-decoration: none;
color: #F39C12; color: #F39C12;
} }
/* line 158, ../sass/_adminlte.scss */
/* line 163, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .nav { body.skin-black .main-header .navbar .navbar-custom-menu .nav {
display: block; display: block;
} }
/* line 162, ../sass/_adminlte.scss */
/* line 167, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a, body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a,
body.skin-black .main-header .navbar .navbar-right > li > a { body.skin-black .main-header .navbar .navbar-right > li > a {
border-left: solid 1px #e0e0e0; border-left: solid 1px #e0e0e0;
color: #333; color: #333;
} }
/* line 168, ../sass/_adminlte.scss */
/* line 173, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus, body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus,
body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus, body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus,
body.skin-black .main-header .navbar .nav > .active > a { body.skin-black .main-header .navbar .nav > .active > a {
color: #F39C12; color: #F39C12;
} }
/* line 174, ../sass/_adminlte.scss */
/* line 179, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .dropdown-menu { body.skin-black .main-header .navbar .dropdown-menu {
-moz-box-shadow: 0px 0px 4px gray; -moz-box-shadow: 0px 0px 4px gray;
-webkit-box-shadow: 0px 0px 4px gray; -webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray; box-shadow: 0px 0px 4px gray;
} }
/* line 179, ../sass/_adminlte.scss */
/* line 184, ../sass/_adminlte.scss */
body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle { body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle {
border-right: solid 1px #e0e0e0; border-right: solid 1px #e0e0e0;
} }
/* line 183, ../sass/_adminlte.scss */
/* line 188, ../sass/_adminlte.scss */
body.skin-black .main-header .link-control-sidebar { body.skin-black .main-header .link-control-sidebar {
display: none; display: none;
} }
/* line 188, ../sass/_adminlte.scss */
/* line 193, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu { body.skin-black .main-header .notifications-menu ul.menu {
max-height: 300px; max-height: 300px;
} }
/* line 191, ../sass/_adminlte.scss */
/* line 196, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a { body.skin-black .main-header .notifications-menu ul.menu li a {
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;
} }
/* line 195, ../sass/_adminlte.scss */
/* line 200, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 { body.skin-black .main-header .notifications-menu ul.menu li a h5 {
margin-bottom: 2px; margin-bottom: 2px;
} }
/* line 198, ../sass/_adminlte.scss */
/* line 203, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 small { body.skin-black .main-header .notifications-menu ul.menu li a h5 small {
float: right; float: right;
} }
/* line 203, ../sass/_adminlte.scss */
/* line 208, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a p { body.skin-black .main-header .notifications-menu ul.menu li a p {
margin-left: 10px; margin-left: 10px;
} }
/* line 214, ../sass/_adminlte.scss */
/* line 219, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu { body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu {
width: 400px; width: 400px;
} }
/* line 218, ../sass/_adminlte.scss */
/* line 223, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer { body.skin-black .main-header .navbar .nav li.producer-menu .search-producer {
margin: 10px; margin: 10px;
width: 94%; width: 94%;
} }
/* line 223, ../sass/_adminlte.scss */
/* line 228, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results { body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results {
display: none; display: none;
} }
/* line 226, ../sass/_adminlte.scss */
/* line 231, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert { body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert {
margin-bottom: 0px; margin-bottom: 0px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
padding: 15px 15px 10px 15px; padding: 15px 15px 10px 15px;
} }
/* line 234, ../sass/_adminlte.scss */
/* line 239, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .label { body.skin-black .main-header .navbar .nav li.producer-menu .label {
position: relative; position: relative;
top: -2px; top: -2px;
left: 0px; left: 0px;
} }
/* line 240, ../sass/_adminlte.scss */
/* line 245, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline { body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline {
color: #F39C12; color: #F39C12;
} }
/* line 244, ../sass/_adminlte.scss */
/* line 249, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .offline { body.skin-black .main-header .navbar .nav li.producer-menu .offline {
display: none; display: none;
} }
/* line 248, ../sass/_adminlte.scss */
/* line 253, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu a { body.skin-black .main-header .navbar .nav li.producer-menu a {
color: #333; color: #333;
} }
/* line 252, ../sass/_adminlte.scss */
/* line 257, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .producer-id { body.skin-black .main-header .navbar .nav li.producer-menu .producer-id {
position: relative; position: relative;
top: 4px; top: 4px;
font-size: 12px; font-size: 12px;
float: right; float: right;
} }
/* line 263, ../sass/_adminlte.scss */
/* line 268, ../sass/_adminlte.scss */
body.skin-black .sidebar .sidebar-menu > li.header { body.skin-black .sidebar .sidebar-menu > li.header {
color: #899397; color: #899397;
} }
/* line 267, ../sass/_adminlte.scss */
/* line 272, ../sass/_adminlte.scss */
body.skin-black .sidebar .label { body.skin-black .sidebar .label {
padding-top: 5px; padding-top: 5px;
position: relative; position: relative;
top: -3px; top: -3px;
} }
/* line 274, ../sass/_adminlte.scss */
/* line 279, ../sass/_adminlte.scss */
body.skin-black .sidebar-menu > li.active > a { body.skin-black .sidebar-menu > li.active > a {
border-color: #F39C12; border-color: #F39C12;
} }
/* line 279, ../sass/_adminlte.scss */
/* line 284, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel { body.skin-black section.sidebar .user-panel {
text-align: center; text-align: center;
} }
/* line 282, ../sass/_adminlte.scss */
/* line 287, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .image { body.skin-black section.sidebar .user-panel .image {
margin-bottom: 3px; margin-bottom: 3px;
} }
/* line 286, ../sass/_adminlte.scss */
/* line 291, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .title { body.skin-black section.sidebar .user-panel .title {
font-weight: bold; font-weight: bold;
color: white; color: white;
} }
/* line 293, ../sass/_adminlte.scss */
/* line 298, ../sass/_adminlte.scss */
body.skin-black .content-wrapper { body.skin-black .content-wrapper {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
/* line 296, ../sass/_adminlte.scss */
/* line 301, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header { body.skin-black .content-wrapper .content-header {
background-color: #F5F5F5; background-color: #F5F5F5;
padding-bottom: 15px; padding-bottom: 15px;
border-bottom: solid 1px #e0e0e0; border-bottom: solid 1px #e0e0e0;
border-top: solid 1px #e0e0e0; border-top: solid 1px #e0e0e0;
} }
/* line 302, ../sass/_adminlte.scss */
/* line 307, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header .btn { body.skin-black .content-wrapper .content-header .btn {
padding: 3px 6px; padding: 3px 6px;
font-size: 10px; font-size: 10px;
font-family: Arial; font-family: Arial;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 309, ../sass/_adminlte.scss */
/* line 314, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header h1 { body.skin-black .content-wrapper .content-header h1 {
font-family: 'myriadpro-light'; font-family: 'myriadpro-light';
font-size: 20px; font-size: 20px;
} }
/* line 315, ../sass/_adminlte.scss */
/* line 320, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left { body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px; padding-left: 0px;
} }
/* line 319, ../sass/_adminlte.scss */
/* line 324, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right { body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px; padding-right: 0px;
} }
/* line 323, ../sass/_adminlte.scss */
/* line 328, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a { body.skin-black .content-wrapper a {
color: #e08e0b; color: #e08e0b;
} }
/* line 326, ../sass/_adminlte.scss */
/* line 331, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a.disable { body.skin-black .content-wrapper a.disable {
pointer-events: none; pointer-events: none;
cursor: default; cursor: default;
} }
/* line 332, ../sass/_adminlte.scss */
/* line 337, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label { body.skin-black .content-wrapper .label {
padding-top: 4px; padding-top: 4px;
padding-bottom: 1px; padding-bottom: 1px;
} }
/* line 337, ../sass/_adminlte.scss */
/* line 342, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn { body.skin-black .content-wrapper .btn {
color: white; color: white;
} }
/* line 341, ../sass/_adminlte.scss */
/* line 346, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default { body.skin-black .content-wrapper .btn-default {
color: #333; color: #333;
background-color: white; background-color: white;
} }
/* line 346, ../sass/_adminlte.scss */
/* line 351, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary { body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12; background-color: #F39C12;
color: white; color: white;
border-color: #F39C12; border-color: #F39C12;
} }
/* line 353, ../sass/_adminlte.scss */
/* line 358, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge { body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px; margin-left: 4px;
background-color: #e0e0e0; background-color: #e0e0e0;
color: #444; color: #444;
} }
/* line 360, ../sass/_adminlte.scss */
/* line 365, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content { body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd; border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd; border-bottom: solid 1px #ddd;
padding: 30px 15px 15px 15px; padding: 30px 15px 15px 15px;
background-color: white; background-color: white;
} }
/* line 368, ../sass/_adminlte.scss */
/* line 373, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert { body.skin-black .content-wrapper .alert {
position: relative; position: relative;
} }
/* line 371, ../sass/_adminlte.scss */
/* line 376, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a { body.skin-black .content-wrapper .alert a {
color: white; color: white;
} }
/* line 374, ../sass/_adminlte.scss */
/* line 379, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn { body.skin-black .content-wrapper .alert a.btn {
color: #333; color: #333;
text-decoration: none; text-decoration: none;
} }
/* line 379, ../sass/_adminlte.scss */
/* line 384, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close { body.skin-black .content-wrapper .alert .close {
font-size: 30px; font-size: 30px;
position: absolute; position: absolute;
color: white; color: white;
opacity: 0.6; opacity: 0.6;
} }
/* line 388, ../sass/_adminlte.scss */
/* line 393, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover { body.skin-black .content-wrapper .alert .close:hover {
opacity: 1; opacity: 1;
} }
/* line 393, ../sass/_adminlte.scss */
/* line 398, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert.alert-dark { body.skin-black .content-wrapper .alert.alert-dark {
background-color: #ece4d8; background-color: #ece4d8;
color: black; color: black;
} }
/* line 400, ../sass/_adminlte.scss */
/* line 405, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 { body.skin-black .content-wrapper .small-box h3 {
font-size: 28px; font-size: 28px;
font-family: 'Source Sans Pro',sans-serif; font-family: 'Source Sans Pro',sans-serif;
} }
/* line 405, ../sass/_adminlte.scss */
/* line 410, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .icon { body.skin-black .content-wrapper .small-box .icon {
top: -2px; top: -2px;
} }
/* line 409, ../sass/_adminlte.scss */
/* line 414, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer { body.skin-black .content-wrapper .small-box .small-box-footer {
color: white; color: white;
padding-top: 6px; padding-top: 6px;
padding-bottom: 2px; padding-bottom: 2px;
} }
/* line 418, ../sass/_adminlte.scss */
/* line 423, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa { body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px; margin-right: 7px;
} }
/* line 421, ../sass/_adminlte.scss */
/* line 426, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a { body.skin-black .content-wrapper .callout a {
color: white; color: white;
} }
/* line 424, ../sass/_adminlte.scss */
/* line 429, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn { body.skin-black .content-wrapper .callout .btn {
color: #333; color: #333;
text-decoration: none; text-decoration: none;
} }
/* line 431, ../sass/_adminlte.scss */
/* line 436, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th { body.skin-black .content-wrapper .table th {
font-size: 13px; font-size: 13px;
} }
/* line 434, ../sass/_adminlte.scss */
/* line 439, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions { body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 172px; width: 172px;
text-align: right; text-align: right;
} }
/* line 438, ../sass/_adminlte.scss */
/* line 443, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small { body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px; font-size: 12px;
} }
/* line 442, ../sass/_adminlte.scss */
/* line 447, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td { body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td {
border: 1px solid #ddd; border: 1px solid #ddd;
} }
/* line 451, ../sass/_adminlte.scss */
/* line 456, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td { body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td {
border-bottom-width: 2px; border-bottom-width: 2px;
} }
/* line 457, ../sass/_adminlte.scss */
/* line 462, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus { body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus {
background-color: #F39C12; background-color: #F39C12;
border: solid 1px #F39C12; border: solid 1px #F39C12;
color: white; color: white;
} }
/* line 463, ../sass/_adminlte.scss */
/* line 468, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span { body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12; color: #F39C12;
} }
/* line 465, ../sass/_adminlte.scss */
/* line 470, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover { body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a; color: #c87f0a;
} }
/* line 470, ../sass/_adminlte.scss */
/* line 475, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu { body.skin-black .content-wrapper .submenu {
margin-bottom: 25px; margin-bottom: 25px;
} }
/* line 474, ../sass/_adminlte.scss */
/* line 479, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions { body.skin-black .content-wrapper .form-actions {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 10; z-index: 10;
border-top: solid 1px #e0e0e0; border-top: solid 1px #e0e0e0;
} }
/* line 487, ../sass/_adminlte.scss */
/* line 492, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button { body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px; margin-left: 10px;
} }
/* line 492, ../sass/_adminlte.scss */
/* line 497, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons { body.skin-black .content-wrapper .form-buttons {
margin-top: 25px; margin-top: 25px;
text-align: right; text-align: right;
} }
/* line 499, ../sass/_adminlte.scss */
/* line 504, ../sass/_adminlte.scss */
body.skin-black .main-footer a { body.skin-black .main-footer a {
color: #F39C12; color: #F39C12;
} }
/* line 504, ../sass/_adminlte.scss */
/* line 509, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize { body.skin-black .gridview-pagesize {
float: right; float: right;
margin-bottom: 8px; margin-bottom: 8px;
} }
/* line 509, ../sass/_adminlte.scss */
/* line 514, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar { body.skin-black #yii-debug-toolbar {
bottom: 64px; bottom: 64px;
} }


/* line 514, ../sass/_adminlte.scss */
/* line 519, ../sass/_adminlte.scss */
body.login-page { body.login-page {
background: none; background: none;
background-color: white; background-color: white;
} }
/* line 518, ../sass/_adminlte.scss */
/* line 523, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo { body.login-page .login-box .login-logo {
text-align: center; text-align: center;
font-family: 'worksans_bold'; font-family: 'worksans_bold';
} }
/* line 522, ../sass/_adminlte.scss */
/* line 527, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img { body.login-page .login-box .login-logo img {
width: 150px; width: 150px;
} }
/* line 528, ../sass/_adminlte.scss */
/* line 533, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body, body.login-page .login-box .login-box-body,
body.login-page .login-box .login-box-body input#loginform-email, body.login-page .login-box .login-box-body input#loginform-email,
body.login-page .login-box .login-box-body input#loginform-password, body.login-page .login-box .login-box-body input#loginform-password,
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
font-size: 14px; font-size: 14px;
} }
/* line 535, ../sass/_adminlte.scss */
/* line 540, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12; background-color: #F39C12;
border-color: #F39C12; border-color: #F39C12;
padding: 5px 10px; padding: 5px 10px;
margin-bottom: 15px; margin-bottom: 15px;
} }
/* line 541, ../sass/_adminlte.scss */
/* line 546, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active { body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a; background-color: #f4a62a;
border-color: #F39C12; border-color: #F39C12;
} }
/* line 547, ../sass/_adminlte.scss */
/* line 552, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a { body.login-page .login-box .login-box-body a {
color: #F39C12; color: #F39C12;
} }
/* line 549, ../sass/_adminlte.scss */
/* line 554, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover { body.login-page .login-box .login-box-body a:hover {
color: #f4a62a; color: #f4a62a;
} }
/* line 554, ../sass/_adminlte.scss */
/* line 559, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .checkbox label input { body.login-page .login-box .login-box-body .checkbox label input {
position: relative; position: relative;
top: 0px; top: 0px;

+ 5
- 0
backend/web/sass/_adminlte.scss View File

font-style: italic; font-style: italic;
} }


// Points de vente
.locality {
color: gray;
}

.main-header { .main-header {


.dropdown-toggle::after { .dropdown-toggle::after {

+ 3
- 1
common/components/ActiveRecordCommon.php View File

$pk = $class::tableName() . '.' . $pk[0]; $pk = $class::tableName() . '.' . $pk[0];


if (isset($options['attribute_id_producer']) && strlen($options['attribute_id_producer']) if (isset($options['attribute_id_producer']) && strlen($options['attribute_id_producer'])
&& !isset($params[$options['attribute_id_producer']]) && !\Yii::$app->user->isGuest
&& !isset($params[$options['attribute_id_producer']])
&& !\Yii::$app->user->isGuest
&& !isset($options['ignore_id_producer'])
) { ) {
$params[$options['attribute_id_producer']] = GlobalParam::getCurrentProducerId(); $params[$options['attribute_id_producer']] = GlobalParam::getCurrentProducerId();
} }

+ 1
- 0
domain/Order/Order/OrderSearch.php View File

} }


$query = Order::searchQuery($paramsSearch, [ $query = Order::searchQuery($paramsSearch, [
'ignore_id_producer' => true,
'orderby' => 'distribution.date DESC' 'orderby' => 'distribution.date DESC'
]); ]);

+ 9
- 41
domain/Order/Order/OrderSolver.php View File

return 'commande-create'; return 'commande-create';
} }


/**
* Retourne l'historique de la commande (ajoutée, modifiée, supprimée) au format HTML.
*/
//getStrHistory
public function getHistorySummary(Order $order): string
{
$arr = [
'class' => 'create',
'glyphicon' => 'plus',
'str' => 'Ajoutée',
'date' => $order->date
];

if (!is_null($order->date_update)) {
$arr = [
'class' => 'update',
'glyphicon' => 'pencil',
'str' => 'Modifiée',
'date' => $order->date_update
];
}
if ($this->isOrderStatusCanceled($order)) {
$arr = [
'class' => 'delete',
'glyphicon' => 'remove',
'str' => 'Annulée',
'date' => $this->getOrderStatusHistoryByOrderStatusAlias($order,OrderStatus::ALIAS_CANCELED)
->getDate()->format('Y-m-d H:i:s')
];
}

$html = '<div class="small"><span class="' . $arr['class'] . '">'
. '<span class="glyphicon glyphicon-' . $arr['glyphicon'] . '"></span> '
. $arr['str'] . '</span> le <strong>'
. date('d/m/Y à G\hi', strtotime($arr['date'])) . '</strong></div>';

return $html;
}

public function getPaymentLabelAmountRemainingSurplus(Order $order): string public function getPaymentLabelAmountRemainingSurplus(Order $order): string
{ {
$amountPaid = $this->getOrderAmountPaid($order); $amountPaid = $this->getOrderAmountPaid($order);
return '<br><span class="payment-detail-remaining-surplus">'.$text.'</span>'; return '<br><span class="payment-detail-remaining-surplus">'.$text.'</span>';
} }


public function getLabelOrderStatus(Order $order): string
public function getLabelOrderStatus(Order $order, bool $withDateLastOrderStatus = false): string
{ {
$orderStatusCssClass = $this->getOrderStatusCssClass($order); $orderStatusCssClass = $this->getOrderStatusCssClass($order);
$orderStatusLabel = $this->getOrderStatusLabel($order); $orderStatusLabel = $this->getOrderStatusLabel($order);
$orderStatusHistorySummaryTitleTag = $this->getOrderStatusHistorySummaryTitleTag($order); $orderStatusHistorySummaryTitleTag = $this->getOrderStatusHistorySummaryTitleTag($order);
return '<span class="label label-'.$orderStatusCssClass.'" title="'.$orderStatusHistorySummaryTitleTag.'">'.$orderStatusLabel.'</span>';
$html = '<span class="label label-'.$orderStatusCssClass.'" title="'.$orderStatusHistorySummaryTitleTag.'">'.$orderStatusLabel.'</span>';

$lastOrderStatusHistory = $this->getLastOrderStatusHistory($order);
if($withDateLastOrderStatus && $lastOrderStatusHistory) {
$html .= '<br /><span class="small gray">'.$lastOrderStatusHistory->getDate()->format('d/m/Y à H:i').'</span>';
}

return $html;
} }


/** /**

Loading…
Cancel
Save