修改利息计算的错误
This commit is contained in:
parent
996ed2d104
commit
dfd22ce55a
@ -27,6 +27,9 @@ class StoreOrderInterest extends BaseModel
|
|||||||
*/
|
*/
|
||||||
public function calculateInterest()
|
public function calculateInterest()
|
||||||
{
|
{
|
||||||
|
if ($this->start_time == '0000-00-00 00:00:00') {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
$days = ceil((time() - strtotime($this->start_time)) / 86400);
|
$days = ceil((time() - strtotime($this->start_time)) / 86400);
|
||||||
$days = max($days ,0);
|
$days = max($days ,0);
|
||||||
$money = bcmul($this->total_price, ($this->rate / 100), 3);
|
$money = bcmul($this->total_price, ($this->rate / 100), 3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user