Type 'DecimalJsLike' is not assignable to type 'Value'.
My models:
I need to calculate price for an entire order (sum of
The type of
But I am getting an error inside a loop:
What should I do?
I need to calculate price for an entire order (sum of
priceNetto of all order items) to generate paymentId. So I have a loop:The type of
orderItemCreateManyOrderInput is of course Prisma.OrderItemCreateManyOrderInput[], because I have to create Order with all OrderItems after generating paymentId.But I am getting an error inside a loop:
Type 'DecimalJsLike' is not assignable to type 'Value'. in finalPrice.add(item.priceNetto);, because item.priceNetto is of type 'string | number | Decimal | DecimalJsLike'. What should I do?
ORM