From 60167cd807df95ef1636981606c14fd6b0bceddf Mon Sep 17 00:00:00 2001 From: shancheas Date: Wed, 9 Oct 2024 12:49:34 +0700 Subject: [PATCH] fix: change bundling item edit from item_id to total_net_price --- .../usecases/managers/helpers/mapping-transaction.helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/transaction/transaction/domain/usecases/managers/helpers/mapping-transaction.helper.ts b/src/modules/transaction/transaction/domain/usecases/managers/helpers/mapping-transaction.helper.ts index b56f44f..3a6ab2e 100644 --- a/src/modules/transaction/transaction/domain/usecases/managers/helpers/mapping-transaction.helper.ts +++ b/src/modules/transaction/transaction/domain/usecases/managers/helpers/mapping-transaction.helper.ts @@ -196,7 +196,7 @@ export function mappingRevertTransaction(data, type) { ) ?? 0) * +item.qty; const totalAndBundlingRatio = total_price / bundlingTotalPrice; item.bundling_items = item.item.bundling_items?.map((bundling) => { - if (bundling.item_id) return bundling; + if (bundling.total_net_price) return bundling; const basePrice = (bundling.item_rates ?? bundling.base_price) *