fix: 结算表本期明细显示数量为0的内容 (#796)

Co-authored-by: sealday <zhanglin@daoyoucloud.com>
Reviewed-on: daoyoucloud/tachybase#796
Co-authored-by: wjh <wwwjh0710@163.com>
Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
wjh 2024-04-22 16:26:52 +08:00 committed by sealday
parent f0472afcb5
commit 75b4dae712
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"@hera/plugin-rental": patch
---
结算单本期明细显示数据为0的内容

View File

@ -668,7 +668,7 @@ export class SettlementService {
const recordsCategoryFeeItem = feeData(createFeesDatas, settlementAbout, 'category'); const recordsCategoryFeeItem = feeData(createFeesDatas, settlementAbout, 'category');
const recordsProductFeeItem = feeData(createFeesDatas, settlementAbout, 'product'); const recordsProductFeeItem = feeData(createFeesDatas, settlementAbout, 'product');
//本期信息 //本期信息
let createDatas = [ const createDatas = [
...createCategoryDatasItem.list, ...createCategoryDatasItem.list,
...createProductDatasItem.list, ...createProductDatasItem.list,
...recordsCategoryFeeItem, ...recordsCategoryFeeItem,
@ -677,7 +677,6 @@ export class SettlementService {
createDatas.sort((a, b) => { createDatas.sort((a, b) => {
return new Date(a.date).getTime() - new Date(b.date).getTime(); return new Date(a.date).getTime() - new Date(b.date).getTime();
}); });
createDatas = createDatas.filter((value) => value.name.includes('$$') || value.count);
//筛选历史结存 //筛选历史结存
createCategoryDatasItem.history = createCategoryDatasItem.history?.filter((value) => value.count); createCategoryDatasItem.history = createCategoryDatasItem.history?.filter((value) => value.count);
createProductDatasItem.history = createProductDatasItem.history?.filter( createProductDatasItem.history = createProductDatasItem.history?.filter(