|
|
@@ -248,17 +248,17 @@ class Commande extends \yii\db\ActiveRecord |
|
|
|
public function getStatutPaiement() |
|
|
|
{ |
|
|
|
// à rembourser |
|
|
|
if($this->montant - $this->montant_paye < 0) |
|
|
|
if($this->getMontant() - $this->getMontantPaye() < 0) |
|
|
|
{ |
|
|
|
return self::STATUT_SURPLUS ; |
|
|
|
} |
|
|
|
// payé |
|
|
|
elseif($this->montant - $this->montant_paye < 0.001) |
|
|
|
elseif($this->getMontant() - $this->getMontantPaye() < 0.001) |
|
|
|
{ |
|
|
|
return self::STATUT_PAYEE ; |
|
|
|
} |
|
|
|
// reste à payer |
|
|
|
elseif($this->montant - $this->montant_paye > 0.01) |
|
|
|
elseif($this->getMontant() - $this->getMontantPaye() > 0.01) |
|
|
|
{ |
|
|
|
return self::STATUT_IMPAYEE ; |
|
|
|
} |