fix: 修改结算单报错问题 (#998)

Reviewed-on: daoyoucloud/tachybase#998
Co-authored-by: wjh <wwwjh0710@163.com>
Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
wjh 2024-05-16 16:48:45 +08:00 committed by sealday
parent 28b107ee49
commit 87245462e2

View File

@ -536,7 +536,9 @@ export class SettlementService {
dayjs(item.date).isBetween(ruleItem.start_date, ruleItem.end_date, 'day', '[]') && dayjs(item.date).isBetween(ruleItem.start_date, ruleItem.end_date, 'day', '[]') &&
dayjs(item.date).isSameOrAfter(settlementAbout.start_date) dayjs(item.date).isSameOrAfter(settlementAbout.start_date)
) { ) {
const feeItem = item?.record_items.filter((value) => value.product_id === rule.fee_product_id); const feeItem = item?.record_items.filter(
(value) => value && value.product_id === rule.fee_product_id,
);
if (feeItem.length) { if (feeItem.length) {
feeItem.forEach((value) => { feeItem.forEach((value) => {
if (category === '其他') { if (category === '其他') {