diff --git a/app/common/model/store/order/StoreOrderInterest.php b/app/common/model/store/order/StoreOrderInterest.php index fd715c88..c5dc74d9 100644 --- a/app/common/model/store/order/StoreOrderInterest.php +++ b/app/common/model/store/order/StoreOrderInterest.php @@ -27,6 +27,9 @@ class StoreOrderInterest extends BaseModel */ public function calculateInterest() { + if ($this->start_time == '0000-00-00 00:00:00') { + return 0; + } $days = ceil((time() - strtotime($this->start_time)) / 86400); $days = max($days ,0); $money = bcmul($this->total_price, ($this->rate / 100), 3);