소스 검색

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…
취소
저장