Bladeren bron

[Backend] Documents : optimisation chargement #839

refactoring
Guillaume Bourgeois 1 jaar geleden
bovenliggende
commit
cc90359f14
8 gewijzigde bestanden met toevoegingen van 11 en 8 verwijderingen
  1. +2
    -0
      backend/controllers/DistributionController.php
  2. +2
    -1
      backend/controllers/DocumentController.php
  3. +2
    -2
      backend/views/document/_form.php
  4. +1
    -1
      backend/web/css/screen.css
  5. +1
    -1
      backend/web/sass/_adminlte.scss
  6. +1
    -1
      common/models/DeliveryNote.php
  7. +1
    -1
      common/models/Invoice.php
  8. +1
    -1
      common/models/Quotation.php

+ 2
- 0
backend/controllers/DistributionController.php Bestand weergeven

@@ -345,6 +345,8 @@ class DistributionController extends BackendController
// bons de livraison
$deliveryNotesArray = DeliveryNote::searchAll([
'distribution.date' => $date,
], [
'join_with' => ['user AS user_delivery_note', 'orders', 'producer']
]);
$deliveryNotesByPointSaleArray = [];
foreach ($deliveryNotesArray as $deliveryNote) {

+ 2
- 1
backend/controllers/DocumentController.php Bestand weergeven

@@ -375,7 +375,8 @@ class DocumentController extends BackendController

if ($classDocument == 'Invoice') {
$options = [
'orderby' => 'distribution.date ASC'
'orderby' => 'distribution.date ASC',
'join_with' => ['user AS user_delivery_note', 'orders', 'producer']
];
$deliveryNotesCreateArray = DeliveryNote::searchAll([
'id_user' => $user->id,

+ 2
- 2
backend/views/document/_form.php Bestand weergeven

@@ -208,11 +208,11 @@ use common\models\Producer;
<span class="info-box-icon bg-blue"><i class="fa fa-download"></i></span>
<div class="info-box-content">
<a href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/download', 'id' => $model->id]) ?>"
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-download-alt"></span> Télécharger</a>
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-download-alt"></span> Télécharger (PDF)</a>

<?php if($model->isStatusValid()): ?>
<a href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/regenerate', 'id' => $model->id]) ?>"
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-repeat"></span> Regénérer</a>
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-repeat"></span> Regénérer (PDF)</a>
<?php endif; ?>

<?php if ($model->getClass() == 'Invoice' && Producer::getConfig('option_export_evoliz')): ?>

+ 1
- 1
backend/web/css/screen.css Bestand weergeven

@@ -1657,7 +1657,7 @@ body.skin-black .content-wrapper .alert a.btn {
body.skin-black .content-wrapper .alert .close {
font-size: 30px;
position: relative;
top: -25px;
top: -15px;
text-decoration: none;
color: white;
opacity: 0.6;

+ 1
- 1
backend/web/sass/_adminlte.scss Bestand weergeven

@@ -142,7 +142,7 @@ body.skin-black {
.close {
font-size: 30px;
position: relative;
top: -25px;
top: -15px;
text-decoration: none;
color: white;
opacity: 0.6;

+ 1
- 1
common/models/DeliveryNote.php Bestand weergeven

@@ -84,7 +84,7 @@ class DeliveryNote extends Document
{
return [
'with' => [],
'join_with' => ['user AS user_delivery_note', 'orders', 'producer'],
'join_with' => ['user AS user_delivery_note', 'producer'],
'orderby' => 'date ASC',
'attribute_id_producer' => 'delivery_note.id_producer'
];

+ 1
- 1
common/models/Invoice.php Bestand weergeven

@@ -85,7 +85,7 @@ class Invoice extends Document
{
return [
'with' => [],
'join_with' => ['user AS user_invoice', 'orders', 'producer'],
'join_with' => ['user AS user_invoice', 'producer'],
'orderby' => 'date ASC',
'attribute_id_producer' => 'invoice.id_producer'
];

+ 1
- 1
common/models/Quotation.php Bestand weergeven

@@ -82,7 +82,7 @@ class Quotation extends Document
{
return [
'with' => [],
'join_with' => ['user AS user_quotation', 'orders', 'producer'],
'join_with' => ['user AS user_quotation', 'producer'],
'orderby' => 'date ASC',
'attribute_id_producer' => 'quotation.id_producer'
];

Laden…
Annuleren
Opslaan