merchant-backoffice

ZZZ: Inactive/Deprecated
Log | Files | Refs | Submodules | README

commit f9cc132158775b3b7526d7f0b8021134efeeef41
parent 1437cf7c97514621001f9a4becad03a9b5ef6056
Author: Sebastian <sebasjm@gmail.com>
Date:   Thu, 21 Oct 2021 12:07:40 -0300

fix when price is undefined

Diffstat:
Mpackages/frontend/src/paths/instance/orders/create/CreatePage.tsx | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx b/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx @@ -237,6 +237,7 @@ export function CreatePage({ onCreate, onBack, instanceConfig, instanceInventory }, zero) const totalPriceProducts = productList.reduce((prev, cur) => { + if (!cur.price) return zero const p = Amounts.parseOrThrow(cur.price) return Amounts.add(prev, Amounts.mult(p, cur.quantity).amount).amount }, zero)