|
|
|
|
|
|
|
|
<thead> |
|
|
<thead> |
|
|
<tr> |
|
|
<tr> |
|
|
<th class="align-left">Produit</th> |
|
|
<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; ?> |
|
|
<?php endif; ?> |
|
|
<th>Quantité</th> |
|
|
<th>Quantité</th> |
|
|
<th>Unité</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; ?> |
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
|
</tr> |
|
|
</tr> |
|
|
|
|
|
|
|
|
<?php foreach($product as $productOrder): ?> |
|
|
<?php foreach($product as $productOrder): ?> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="align-left"><?= Html::encode($productOrder->product->name) ?></td> |
|
|
<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"><?= $productOrder->quantity ?></td> |
|
|
<td class="align-center"><?= Product::strUnit($productOrder->unit, 'wording') ?></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; ?> |
|
|
<?php endif; ?> |
|
|
<td class="align-center"><?= Price::format($productOrder->getPrice() * $productOrder->quantity) ?></td> |
|
|
|
|
|
|
|
|
|
|
|
</tr> |
|
|
</tr> |
|
|
<?php endforeach; ?> |
|
|
<?php endforeach; ?> |
|
|
<?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> |
|
|
<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> |
|
|
<td class="align-center"><?= Price::format($document->getAmount()) ?></td> |
|
|
</tr> |
|
|
</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; ?> |
|
|
<?php endif; ?> |
|
|
</tbody> |
|
|
</tbody> |
|
|
</table> |
|
|
</table> |