Explorar el Código

Merge branch 'dev' of https://forge.laclic.fr/Laclic/Opendistrib into dev

refactoring
Guillaume hace 2 años
padre
commit
84502ad552
Se han modificado 5 ficheros con 18 adiciones y 14 borrados
  1. +2
    -2
      backend/views/delivery-note/index.php
  2. +2
    -2
      backend/views/document/_form.php
  3. +11
    -7
      backend/views/document/download.php
  4. +2
    -2
      backend/views/invoice/index.php
  5. +1
    -1
      backend/web/js/vuejs/document-form.js

+ 2
- 2
backend/views/delivery-note/index.php Ver fichero

@@ -130,9 +130,9 @@ $this->addButton(['label' => 'Nouveau bon de livraison <span class="glyphicon gl
]) : '');
},
'update' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
'title' => 'Modifier', 'class' => 'btn btn-default'
]) : '');
]);
},
'delete' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [

+ 2
- 2
backend/views/document/_form.php Ver fichero

@@ -195,7 +195,7 @@ use common\models\Producer;
<input type="text" class="form-control input-price"
v-model="productAddPrice" @change="formatProductAddPrice"/>
<span class="input-group-addon"><span
class="glyphicon glyphicon-euro"></span> <span v-if="taxRateProducer != 0">TTC</span></span>
class="glyphicon glyphicon-euro"></span> <span v-if="taxRateProducer != 0">HT</span></span>
</div>
</div>
<div class="col-md-3">
@@ -221,7 +221,7 @@ use common\models\Producer;
<input type="text" class="form-control input-price" readonly
:value="formatPrice(productAddPrice * productAddQuantity)"/>
<span class="input-group-addon"><span
class="glyphicon glyphicon-euro"></span> <span v-if="taxRateProducer != 0">TTC</span></span>
class="glyphicon glyphicon-euro"></span> <span v-if="taxRateProducer != 0">HT</span></span>
</div>
<button class="btn btn-primary" value="Ajouter"
@click="submitProductAdd">Ajouter

+ 11
- 7
backend/views/document/download.php Ver fichero

@@ -16,7 +16,11 @@ $displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$a
<div class="address"><?= $producer->getFullAddress(true) ; ?></div>
</div>
<div class="user">
<?php if($document->address && strlen($document->address) > 0): ?>
<?= nl2br($document->address) ?>
<?php else: ?>
<?= $document->user->getFullAddress(true) ; ?>
<?php endif; ?>
</div>
</div>

@@ -36,6 +40,13 @@ $displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$a
</div>
</div>

<?php if(strlen($document->comment)): ?>
<div class="block-infos">
<strong>Commentaire</strong><br />
<?= Html::encode($document->comment) ?>
</div>
<?php endif; ?>

<div id="block-products">
<?php if(count($document->orders) > 0) : ?>
<table class="table table-bordered">
@@ -141,13 +152,6 @@ $displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$a
<?php endif; ?>
</div>

<?php if(strlen($document->comment)): ?>
<div class="block-infos">
<strong>Commentaire</strong><br />
<?= Html::encode($document->comment) ?>
</div>
<?php endif; ?>

<?php
$fieldProducerDocumentInfo = 'document_infos_'.str_replace('deliverynote','delivery_note',strtolower($document->getClass())) ; ?>
<?php if(strlen($producer->$fieldProducerDocumentInfo)): ?>

+ 2
- 2
backend/views/invoice/index.php Ver fichero

@@ -121,9 +121,9 @@ $this->addButton(['label' => 'Nouvelle facture <span class="glyphicon glyphicon-
]);
},
'update' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
'title' => 'Modifier', 'class' => 'btn btn-default'
]) : '');
]);
},
'delete' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [

+ 1
- 1
backend/web/js/vuejs/document-form.js Ver fichero

@@ -141,7 +141,7 @@ var app = new Vue({
changeProductAdd: function(event) {
var idProduct = event.currentTarget.value ;
this.productAddId = idProduct ;
this.productAddPrice = parseFloat(this.productsArray[idProduct].price_with_tax).toFixed(2) ;
this.productAddPrice = parseFloat(this.productsArray[idProduct].price).toFixed(2) ;
this.productAddQuantity = this.getStepProductAdd() ;
},
changeQuantityProductAdd: function(quantity) {

Cargando…
Cancelar
Guardar