@@ -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, [ |
@@ -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 |
@@ -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)): ?> |
@@ -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, [ |
@@ -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) { |