浏览代码

[Backend] Documents : optimisation chargement #839

refactoring
Guillaume Bourgeois 1年前
父节点
当前提交
cc90359f14
共有 8 个文件被更改,包括 11 次插入8 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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'
];

正在加载...
取消
保存