Pārlūkot izejas kodu

Merge branch 'dev'

prodstable
keun pirms 6 gadiem
vecāks
revīzija
3851f2a22d
1 mainītis faili ar 6 papildinājumiem un 5 dzēšanām
  1. +6
    -5
      common/models/Commande.php

+ 6
- 5
common/models/Commande.php Parādīt failu

@@ -225,14 +225,15 @@ class Commande extends \yii\db\ActiveRecord {
}

public function getStatutPaiement() {
// à rembourser
if ($this->getMontant() - $this->getMontantPaye() <= 0.01) {
return self::STATUT_SURPLUS;
}
// payé
elseif ($this->getMontant() - $this->getMontantPaye() < 0.01) {
if ($this->getMontant() - $this->getMontantPaye() < 0.01 &&
$this->getMontant() - $this->getMontantPaye() >= 0) {
return self::STATUT_PAYEE;
}
// à rembourser
elseif ($this->getMontant() - $this->getMontantPaye() <= -0.01) {
return self::STATUT_SURPLUS;
}
// reste à payer
elseif ($this->getMontant() - $this->getMontantPaye() >= 0.01) {
return self::STATUT_IMPAYEE;

Notiek ielāde…
Atcelt
Saglabāt