fix: discount percent calculation
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build was killed Details

pull/101/head 20.1.73-alpha.1
shancheas 2024-09-22 01:09:54 +07:00
parent 22f4e732db
commit 437793a2a1
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ export function mappingRevertTransaction(data, type) {
const discountPercent = const discountPercent =
discount_value && +discount_value > 0 discount_value && +discount_value > 0
? +discount_value / +payment_sub_total ? +discount_value / +payment_sub_total
: discount_percentage ?? 0 / 100; : (discount_percentage ?? 0) / 100;
const discountValue = payment_sub_total * discountPercent; const discountValue = payment_sub_total * discountPercent;
Object.assign(data, { Object.assign(data, {