Bläddra i källkod

Merge branch 'dev'

master
Guillaume 4 år sedan
förälder
incheckning
0fbd272f26
3 ändrade filer med 13 tillägg och 3 borttagningar
  1. +1
    -1
      backend/controllers/CronController.php
  2. +3
    -0
      backend/views/document/_form.php
  3. +9
    -2
      backend/views/document/download.php

+ 1
- 1
backend/controllers/CronController.php Visa fil

@@ -228,7 +228,7 @@ class CronController extends BackendController
'idProducer' => $producer->id,
'key' => '64ac0bdab7e9f5e48c4d991ec5201d57'
]);
$mail->attach(Yii::getAlias('@app/web/pdf/Orders-' . $date . '-' . $producer->id . '.pdf'));
$mail->attach(Yii::getAlias('@app/web/pdf/Commandes-' . $date . '-' . $producer->id . '.pdf'));
} else {
$subject = '[distrib] Aucune commande';
}

+ 3
- 0
backend/views/document/_form.php Visa fil

@@ -164,6 +164,9 @@ use common\models\Producer;
<?= Html::hiddenInput('id', $model->id); ?>
<button class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Valider le document</button>
</form>
<?php if(isset($model->user) && strlen($model->user->email) > 0): ?>
<a href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl().'/send', 'id' => $model->id]) ?>" class="btn btn-default"><span class="glyphicon glyphicon-send"></span> Envoyer le document</a>
<?php endif; ?>
</div>
</div>
</div>

+ 9
- 2
backend/views/document/download.php Visa fil

@@ -64,7 +64,15 @@
<?php foreach($document->getProductsOrders() as $product): ?>
<?php foreach($product as $productOrder): ?>
<tr>
<td class="align-left"><?= Html::encode($productOrder->product->name) ?></td>
<td class="align-left">
<?= Html::encode($productOrder->product->name) ?>
<?php if($productOrder->unit == 'piece' && isset($productOrder->product->weight) && $productOrder->product->weight): ?>
<span class="weight"> / <?= $productOrder->product->weight ?> g</span>
<?php endif; ?>
<?php if(strlen($productOrder->product->description)): ?>
<br /><small><?= Html::encode($productOrder->product->description) ?></small>
<?php endif; ?>
</td>
<?php if(Yii::$app->controller->getClass() != 'DeliveryNote'): ?>
<td class="align-center"><?= Price::format($productOrder->getPrice()) ?></td>
<?php endif; ?>
@@ -76,7 +84,6 @@
<?php endif; ?>
<td class="align-center"><?= Price::format($productOrder->getPrice() * $productOrder->quantity) ?></td>
<?php endif; ?>

</tr>
<?php endforeach; ?>
<?php endforeach; ?>

Laddar…
Avbryt
Spara