|
|
@@ -38,18 +38,22 @@ |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th class="align-left">Produit</th> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value == 0): ?> |
|
|
|
<th>Prix unitaire</th> |
|
|
|
<?php else: ?> |
|
|
|
<th>Prix unitaire HT</th> |
|
|
|
<?php if(Yii::$app->controller->getClass() != 'DeliveryNote'): ?> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value == 0): ?> |
|
|
|
<th>Prix unitaire</th> |
|
|
|
<?php else: ?> |
|
|
|
<th>Prix unitaire HT</th> |
|
|
|
<?php endif; ?> |
|
|
|
<?php endif; ?> |
|
|
|
<th>Quantité</th> |
|
|
|
<th>Unité</th> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value == 0): ?> |
|
|
|
<th>Prix</th> |
|
|
|
<?php else: ?> |
|
|
|
<th>TVA</th> |
|
|
|
<th>Prix HT</th> |
|
|
|
<?php if(Yii::$app->controller->getClass() != 'DeliveryNote'): ?> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value == 0): ?> |
|
|
|
<th>Prix</th> |
|
|
|
<?php else: ?> |
|
|
|
<th>TVA</th> |
|
|
|
<th>Prix HT</th> |
|
|
|
<?php endif; ?> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
</tr> |
|
|
@@ -59,38 +63,44 @@ |
|
|
|
<?php foreach($product as $productOrder): ?> |
|
|
|
<tr> |
|
|
|
<td class="align-left"><?= Html::encode($productOrder->product->name) ?></td> |
|
|
|
<td class="align-center"><?= Price::format($productOrder->getPrice()) ?></td> |
|
|
|
<?php if(Yii::$app->controller->getClass() != 'DeliveryNote'): ?> |
|
|
|
<td class="align-center"><?= Price::format($productOrder->getPrice()) ?></td> |
|
|
|
<?php endif; ?> |
|
|
|
<td class="align-center"><?= $productOrder->quantity ?></td> |
|
|
|
<td class="align-center"><?= Product::strUnit($productOrder->unit, 'wording') ?></td> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value != 0): ?> |
|
|
|
<td class="align-center"><?= $productOrder->taxRate->value * 100 ?> %</td> |
|
|
|
<?php if(Yii::$app->controller->getClass() != 'DeliveryNote'): ?> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value != 0): ?> |
|
|
|
<td class="align-center"><?= $productOrder->taxRate->value * 100 ?> %</td> |
|
|
|
<?php endif; ?> |
|
|
|
<td class="align-center"><?= Price::format($productOrder->getPrice() * $productOrder->quantity) ?></td> |
|
|
|
<?php endif; ?> |
|
|
|
<td class="align-center"><?= Price::format($productOrder->getPrice() * $productOrder->quantity) ?></td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
<?php endforeach; ?> |
|
|
|
<?php endforeach; ?> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value != 0): ?> |
|
|
|
<tr> |
|
|
|
<td class="align-right" colspan="5"><strong>Total HT</strong></td> |
|
|
|
<td class="align-center"><?= Price::format($document->getAmount()) ?></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="align-right" colspan="5"><strong>TVA</strong></td> |
|
|
|
<td class="align-center"><?= Price::format($document->getAmountWithTax() - $document->getAmount()) ?></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="align-right" colspan="5"><strong>Total TTC</strong></td> |
|
|
|
<td class="align-center"><?= Price::format($document->getAmountWithTax()) ?></td> |
|
|
|
</tr> |
|
|
|
<?php else: ?> |
|
|
|
<?php if(Yii::$app->controller->getClass() != 'DeliveryNote'): ?> |
|
|
|
<?php if(GlobalParam::getCurrentProducer()->taxRate->value != 0): ?> |
|
|
|
<tr> |
|
|
|
<td class="align-right" colspan="4"> |
|
|
|
<strong>Total</strong><br /> |
|
|
|
TVA non applicable |
|
|
|
</td> |
|
|
|
<td class="align-right" colspan="5"><strong>Total HT</strong></td> |
|
|
|
<td class="align-center"><?= Price::format($document->getAmount()) ?></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="align-right" colspan="5"><strong>TVA</strong></td> |
|
|
|
<td class="align-center"><?= Price::format($document->getAmountWithTax() - $document->getAmount()) ?></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="align-right" colspan="5"><strong>Total TTC</strong></td> |
|
|
|
<td class="align-center"><?= Price::format($document->getAmountWithTax()) ?></td> |
|
|
|
</tr> |
|
|
|
<?php else: ?> |
|
|
|
<tr> |
|
|
|
<td class="align-right" colspan="4"> |
|
|
|
<strong>Total</strong><br /> |
|
|
|
TVA non applicable |
|
|
|
</td> |
|
|
|
<td class="align-center"><?= Price::format($document->getAmount()) ?></td> |
|
|
|
</tr> |
|
|
|
<?php endif; ?> |
|
|
|
<?php endif; ?> |
|
|
|
</tbody> |
|
|
|
</table> |