瀏覽代碼

Merge branch 'dev'

prodstable
keun 6 年之前
父節點
當前提交
3851f2a22d
共有 1 個檔案被更改,包括 6 行新增5 行删除
  1. +6
    -5
      common/models/Commande.php

+ 6
- 5
common/models/Commande.php 查看文件

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

Loading…
取消
儲存