fix(pre-planting): Decimal -> Number in totalAmount reduce

This commit is contained in:
hailin 2026-02-28 11:01:37 -08:00
parent cd73b2dec4
commit 1431c89684
1 changed files with 1 additions and 1 deletions

View File

@ -417,7 +417,7 @@ export class PrePlantingApplicationService {
where: { orderNo: { in: merge.sourceOrderNos } }, where: { orderNo: { in: merge.sourceOrderNos } },
select: { totalAmount: true }, select: { totalAmount: true },
}); });
const greenPointsAmount = sourceOrders.reduce((sum, o) => sum + o.totalAmount, 0); const greenPointsAmount = sourceOrders.reduce((sum, o) => sum + Number(o.totalAmount), 0);
const totalAmount = Math.round(greenPointsAmount * 1.1 * 100) / 100; // 含税 CNY const totalAmount = Math.round(greenPointsAmount * 1.1 * 100) / 100; // 含税 CNY
// 生成北京时间日期 // 生成北京时间日期