Browse Source

[Backend] Commandes : méthode de calcul du prix TTC

refactoring
Guillaume Bourgeois 2 years ago
parent
commit
4fc3824168
2 changed files with 5 additions and 3 deletions
  1. +3
    -1
      backend/views/distribution/index.php
  2. +2
    -2
      common/models/Order.php

+ 3
- 1
backend/views/distribution/index.php View File

{{ order.pointSale.name }} {{ order.pointSale.name }}
</template> </template>
</td> </td>
<td class="column-amount">{{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+'&nbsp;€' }}</td>
<td class="column-amount">
{{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+'&nbsp;€' }}
</td>
<td class="column-state-payment"> <td class="column-state-payment">
<div class="input-group"> <div class="input-group">
<span class="label label-success input-group-addon" v-if="order.amount_paid == order.amount">payé</span> <span class="label label-success input-group-addon" v-if="order.amount_paid == order.amount">payé</span>

+ 2
- 2
common/models/Order.php View File



public function getAmountWithTax($type = self::AMOUNT_TOTAL, $format = false) public function getAmountWithTax($type = self::AMOUNT_TOTAL, $format = false)
{ {
$amount = $this->amount_with_tax;
$amount = $this->amount + $this->getTotalVat($type);
if ($type == self::INVOICE_AMOUNT_TOTAL && $this->invoice_amount) { if ($type == self::INVOICE_AMOUNT_TOTAL && $this->invoice_amount) {
$amount = $this->invoice_amount_with_tax;
$amount = $this->invoice_amount + $this->getTotalVat($type);
} }


return $this->_getAmountGeneric($type, $amount, $format); return $this->_getAmountGeneric($type, $amount, $format);

Loading…
Cancel
Save