Procházet zdrojové kódy

Merge branch 'dev'

master
keun před 6 roky
rodič
revize
3851f2a22d
1 změnil soubory, kde provedl 6 přidání a 5 odebrání
  1. +6
    -5
      common/models/Commande.php

+ 6
- 5
common/models/Commande.php Zobrazit soubor

@@ -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;

Načítá se…
Zrušit
Uložit