
问题说明:总平台里供应商财务记录中可提现金额显示中未减掉已提现金额
修改文件:app/services/supplier/finance/SupplierExtractServices.php
修改方法:index()
public function index(array $where, array $whereData = [])
{
$list = $this->getStoreExtractList($where);
//待审核金额
$where['status'] = 0;
$extract_statistics['price'] = $this->dao->getExtractMoneyByWhere($where, 'extract_price');
//待转账金额
$where['status'] = 1;
$where['pay_status'] = 0;
$extract_statistics['unPayPrice'] = $this->dao->getExtractMoneyByWhere($where, 'extract_price');
//累计提现
$where['status'] = 1;
$where['pay_status'] = 1;
$extract_statistics['paidPrice'] = $this->dao->getExtractMoneyByWhere($where, 'extract_price');
$extract_statistics['price_count'] = 0;
//未提现金额
/** @var SupplierFlowingWaterServices $financeFlowServices */
$financeFlowServices = app()->make(SupplierFlowingWaterServices::class);
$whereData['is_take'] = 1;
$price_not = $financeFlowServices->getSumFinance(['supplier_id' => isset($where['supplier_id']) && $where['supplier_id'] ? $where['supplier_id'] : ''], $whereData);
$extract_statistics['price_not'] = max($price_not, 0);
//冻结中金额
$whereData['is_take'] = 0;
$freeze_price = $financeFlowServices->getFreezeSumFinance($whereData);
$extract_statistics['freeze_price'] = max($freeze_price, 0);
$extract_statistics['extract_min_price'] = sys_config('supplier_extract_min_price');
$extract_statistics['extract_max_price'] = sys_config('supplier_extract_max_price');
return compact('extract_statistics', 'list');
}修改文件:app/model/supplier/finance/SupplierExtract.php
修改方法:searchSupplierIdAttr()
public function searchSupplierIdAttr($query, $value)
{
if ($value) {
$query->where('supplier_id', $value);
}
}
