fix(pre-planting): Decimal -> Number in totalAmount reduce
This commit is contained in:
parent
cd73b2dec4
commit
1431c89684
|
|
@ -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
|
||||||
|
|
||||||
// 生成北京时间日期
|
// 生成北京时间日期
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue