Merge pull request 'feat: recodpdf kg不换算吨' (#360) from fix_recordfdf into @hera/dev

Reviewed-on: daoyoucloud/tachycode#360
Reviewed-by: sealday <zhanglin@daoyoucloud.com>
This commit is contained in:
sealday 2024-03-13 14:43:15 +08:00
commit 9c03c9b1f6

View File

@ -271,13 +271,7 @@ export class RecordPdfService {
product_correlation.push(itemB);
}
});
const recordPdfData = [...product_correlation, ...no_product_fee, ...excludedFee].map((item) => {
return {
...item,
total: item.conversion_unit === 'KG' ? item.total / 1000 : item.total,
conversion_unit: item.conversion_unit === 'KG' ? '吨' : item.conversion_unit,
};
});
const recordPdfData = [...product_correlation, ...no_product_fee, ...excludedFee];
return await renderItV2({
detail: recordData,
record: recordPdfData, // 租金+费用,无关联费用