Skip to content

Commit

Permalink
bug(credit-note) fix total calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Apr 22, 2024
1 parent a69291f commit 15c6846
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/components/creditNote/CreditNoteFormCalculation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,10 @@ export const CreditNoteFormCalculation = ({
maxRefundableAmountCents: estimationData?.creditNoteEstimate.maxRefundableAmountCents || 0,
totalTaxIncluded: isError
? 0
: canOnlyCredit
? deserializeAmount(
estimationData?.creditNoteEstimate.maxCreditableAmountCents || 0,
currency,
)
: deserializeAmount(
estimationData?.creditNoteEstimate.maxRefundableAmountCents || 0,
currency,
),
: deserializeAmount(
estimationData?.creditNoteEstimate?.subTotalExcludingTaxesAmountCents || 0,
currency,
) + deserializeAmount(estimationData?.creditNoteEstimate.taxesAmountCents || 0, currency),
proRatedCouponAmount: isError
? 0
: deserializeAmount(
Expand Down

0 comments on commit 15c6846

Please sign in to comment.