|
|
@@ -62,6 +62,19 @@ class OrderClass extends BaseClass
|
|
|
public static function getDebtList($where)
|
|
|
{
|
|
|
$list = self::getAllList('*', $where, 'addTime DESC');
|
|
|
+
|
|
|
+ if (!empty($list)) {
|
|
|
+ foreach ($list as $key => $value) {
|
|
|
+ $debtPrice = $value['debtPrice'] ?? 0;
|
|
|
+ $remainDebtPrice = $value['remainDebtPrice'] ?? 0;
|
|
|
+ $hasPayDebt = 0;
|
|
|
+ if ($debtPrice > $remainDebtPrice) {
|
|
|
+ $hasPayDebt = bcsub($debtPrice, $remainDebtPrice, 2);
|
|
|
+ }
|
|
|
+ $list[$key]['hasPayDebt'] = floatval($hasPayDebt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$count = self::getCount($where);
|
|
|
return ['list' => $list, 'debtNum' => $count];
|
|
|
}
|