fix(store_cash_finance_flow): 调整支出类型的金额显示

- 在 StoreCashFinanceFlowLists 类中,针对类型为 1(支出)的项,将 cash_price 和 receivable 字段前添加负号
- 优化了金额的显示逻辑,使支出项在列表中正确显示为负数
This commit is contained in:
mkm 2025-02-11 14:05:15 +08:00
parent 66b74b6e7c
commit adb1291a83

View File

@ -55,6 +55,10 @@ class StoreCashFinanceFlowLists extends BaseAdminDataLists implements ListsSearc
if ($item->admin_id > 0) {
$item->admin_name = Admin::where('id', $item->admin_id)->value('name');
}
if($item->type==1){
$item->cash_price='-'. $item->cash_price;
$item->receivable='-'. $item->receivable;
}
})
->toArray();
}